summaryrefslogtreecommitdiffstats
path: root/src/parsers.h
Commit message (Collapse)AuthorAgeFilesLines
* switch the core ninja parser to use re2c for the lexerEvan Martin2011-12-291-78/+19
| | | | | | | | | - Delete the old "Tokenizer" code. - Write separate tests for the lexer distinct from the parser. - Switch the parser to use the new code. - New lexer error output has file:line numbers so e.g. Emacs can jump your editor to the syntax error. - The EvalEnv ($-interpolation) code is now part of the lexer as well.
* remove makefile parsing code, use depfile code insteadEvan Martin2011-12-071-21/+1
|
* use StringPiece for makefile depsEvan Martin2011-09-121-2/+5
| | | | | | | | | | | | Because of this, MakefileParser now returns pointers into the source makefile string rather than allocating new strings. Despite needing to take the result and stuff it into a new string anyway to canonicalize it, this takes another 50ms or so off the null Chrome build, likely due to the vector used in MakefileParser changing to a type that doesn't use any allocations. (I also experimented with making the vector reserve an initial size but didn't see any performance impact.)
* Implement default target statementsPeter Collingbourne2011-08-311-0/+1
| | | | | | This introduces a new directive, the default target statement, which may be used to control the list of targets built by default (i.e. if no target is named on the command line).
* don't track line/column until you encounter an error, then re-parseEvan Martin2011-07-261-23/+10
| | | | | | This speeds up the common case (where you don't need a line number) at the small expense of the uncommon case (for error messages, you do need a line number). And it's less code.
* switch to $ as the line continuation charEvan Martin2011-05-271-5/+12
| | | | | This means that backslashes are passed through without interpretation, allowing us to support Windows paths without worrying about escaping.
* refactor let parsing, passing another testEvan Martin2011-05-241-3/+11
|
* refactor parser, check in some failing testsEvan Martin2011-05-231-2/+20
|
* drop reserved words 'build'/'rule'/'subninja'/etc.Evan Martin2011-05-011-5/+2
| | | | | | | Instead, parse them as normal words, which makes them work as paths. We instead rely on the *position* (i.e., we start a statement with a keyword and not a path) to distinguish the keyword 'build' from the file 'build'.
* fix warnings on Mac 10.5Arnaud Gelas2011-04-301-0/+1
| | | | structures had virtual functions but not virtual destructors
* add doxygen-compatibile comments to most classesEvan Martin2011-04-291-3/+7
|
* include location of error in parse error messages in EvalEnv stringsAlexei Svitkine2011-04-261-1/+3
| | | | | E.g. when parsing "foo = ${bar", point at the correct location of the missing curly brace.
* add copyrightsEvan Martin2011-02-061-0/+14
|
* ignore whitespace in makefilesEvan Martin2011-02-041-2/+6
|
* refactor parse error messagesEvan Martin2011-02-041-0/+2
|
* allow implicit depsEvan Martin2011-01-231-0/+1
|
* add an include statementEvan Martin2011-01-151-1/+4
|
* remove vestigal builddirEvan Martin2011-01-151-1/+0
|
* immediately evaluate variables in top-level bindingsEvan Martin2010-12-211-1/+3
|
* Merge remote branch 'origin/master'Evan Martin2010-12-191-2/+2
|\
| * simplify token representation, speeding up parseEvan Martin2010-12-171-2/+2
| |
* | remove special builddirEvan Martin2010-12-191-4/+0
|/
* move src into subdirEvan Martin2010-12-051-0/+101