summaryrefslogtreecommitdiffstats
path: root/src/parsers.cc
Commit message (Collapse)AuthorAgeFilesLines
* comment fixNico Weber2012-05-131-1/+1
|
* Response filesunknown2012-02-091-0/+7
|
* parse $:Peter Kuemmel2012-01-291-0/+1
| | | | | '$:' is a valid string now, it expands to ':' update error messages and show a hint when something went wrong.
* add a '-d stats' flag for detailed timingsEvan Martin2012-01-051-0/+2
| | | | | | 1) Add a system for recording detailed timing info of functions. 2) Add a -d flag for requesting debug info at runtime, with the above as the first user.
* test error message of ManifestParser::LoadEvan Martin2012-01-051-1/+4
| | | | Fixes the other half of issue #187.
* Add a space to unexpected token errors.Evan Jones2012-01-041-1/+1
|
* more privateEvan Martin2011-12-301-4/+2
|
* switch the core ninja parser to use re2c for the lexerEvan Martin2011-12-291-447/+170
| | | | | | | | | - 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.
* Merge pull request #146 from nornagon/escape-spacesEvan Martin2011-12-201-0/+3
|\ | | | | Escape spaces
| * Allow '$ ' to escape spaces in identifiers.Jeremy Apthorp2011-11-211-0/+3
| |
* | remove makefile parsing code, use depfile code insteadEvan Martin2011-12-071-44/+3
|/
* Implement restat rulesPeter Collingbourne2011-10-241-0/+6
| | | | | | | | | | | | | | | | | A restat rule is a rule which is capable of pruning the build tree depending on the timestamps of its outputs before and after a build. After a restat rule is rebuilt, Ninja will re-stat each output file to obtain its current timestamp. If the timestamp is unchanged from when Ninja initially stat'ed the file before starting the build, Ninja will mark that output file as clean, and recursively for each reverse dependency of the output file, recompute its dirty status. Ninja then stores the most recent timestamp of any input file in the build log entry associated with the output file. This timestamp will be treated by future invocations of Ninja as the output file's modification time instead of the output file's actual modification time for the purpose of deciding whether it is dirty (but not whether its reverse dependencies are dirty).
* Implement generator rulesPeter Collingbourne2011-10-151-0/+6
| | | | | | | | | | | | | Introduce a rule attribute "generator" which, if present, specifies that this rule is used to re-invoke the generator program. Files built using generator rules are treated specially in two ways: firstly, they will not be rebuilt if the command line changes; and secondly, they are not cleaned by default. A command line flag "-g" is introduced for the clean tool, which causes it to remove generator files. Fixes issue #102.
* make CanonicalizePath report an error on empty pathEvan Martin2011-10-061-2/+4
| | | | Fixes part of issue 121, but the fix exposed a further issue.
* use StringPiece for makefile depsEvan Martin2011-09-121-3/+12
| | | | | | | | | | | | 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.)
* optimize IsIdentCharEvan Martin2011-09-091-5/+25
| | | | Rather than nested tests, use a table. Shaves 200ms off Chrome null startup.
* Add depfile support to build command with multiple outputs (Fixes: #61)Qingning Huo2011-09-061-7/+0
| | | | | | | | | | | | | parsers.cpp: allow depfile used at build command with multiple outputs. graph.cpp: allow depfile used at build command with multiple outputs. parsers_test.cpp: make the test pass. As before, the depfile itself can only mention one target, which must be the first of a build command with multiple outpus. [There is really no need to mention all the output in the depfile, because all targets should depend on exactly the same files anyway, because these targets are built by a single build command.]
* Factor out State struct from ninja_jumble.cc into its header/source files.Thiago Farina2011-09-031-1/+1
| | | | | | This was a TODO in src/ninja_jumble.cc. Now this task is completed. Signed-off-by: Thiago Farina <tfarina@chromium.org>
* Implement default target statementsPeter Collingbourne2011-08-311-0/+28
| | | | | | 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).
* semantic change: allow reaching into parent directories in pathsEvan Martin2011-08-241-2/+1
| | | | | | | | | | | This allows generating build files in a subdirectory of your source tree. - Change CanonicalizePath to accept this. - CanonicalizePath no longer has an error condition, so change it to a void function. I profiled the result against Chrome and it might be ~100ms slower, but that might just be Chrome's size working against me. In any case I think there are lower-hanging performance fruit elsewhere.
* don't track line/column until you encounter an error, then re-parseEvan Martin2011-07-261-17/+21
| | | | | | 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-10/+24
| | | | | 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-23/+34
|
* refactorEvan Martin2011-05-231-7/+8
|
* show correct location for unexpected var errorEvan Martin2011-05-231-1/+3
|
* refactor parser, check in some failing testsEvan Martin2011-05-231-7/+9
|
* merge two line continuation codepathsEvan Martin2011-05-221-14/+11
|
* include filename in subninja load err messageEvan Martin2011-05-221-4/+6
|
* remove ROOT_HACK hack; it is unusedEvan Martin2011-05-021-9/+0
|
* drop reserved words 'build'/'rule'/'subninja'/etc.Evan Martin2011-05-011-45/+43
| | | | | | | 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'.
* Merged pull request #29 from polrop/minor-bug-fix.Evan Martin2011-04-281-1/+1
|\ | | | | Minor bug fix
| * Prefix perror(3) messages with program name.Nicolas Despres2011-04-261-1/+1
| | | | | | | | | | | | It make it easier while debugging to know who is reporting the error: Ninja itself or one of the command called by Ninja during the build process or one of the generator which called Ninja.
* | include location of error in parse error messages in EvalEnv stringsAlexei Svitkine2011-04-261-4/+18
|/ | | | | E.g. when parsing "foo = ${bar", point at the correct location of the missing curly brace.
* use util's CanonicalizePath in parsers as wellEvan Martin2011-04-221-14/+5
|
* add copyrightsEvan Martin2011-02-061-0/+14
|
* ignore whitespace in makefilesEvan Martin2011-02-041-2/+6
|
* refactor parse error messagesEvan Martin2011-02-041-13/+13
|
* allow implicit depsEvan Martin2011-01-231-3/+23
|
* add an include statementEvan Martin2011-01-151-10/+20
|
* remove vestigal builddirEvan Martin2011-01-151-2/+0
|
* split out graph into its own headerEvan Martin2011-01-081-2/+3
|
* aggressively eval variables in build blocksEvan Martin2010-12-211-1/+1
|
* immediately evaluate variables in top-level bindingsEvan Martin2010-12-211-4/+13
|
* restore gyp root hackEvan Martin2010-12-201-0/+9
|
* Merge remote branch 'origin/master'Evan Martin2010-12-191-8/+9
|\
| * simplify token representation, speeding up parseEvan Martin2010-12-171-8/+9
| |
* | remove special builddirEvan Martin2010-12-191-26/+2
| |
* | expand variables in build pathsEvan Martin2010-12-191-4/+18
|/
* move src into subdirEvan Martin2010-12-051-0/+485