pymake/parser.py
2545f3385285f5c19aec1cb0aae72658c8970229
created 2009-02-17 15:02 -0500
pushed 2009-02-17 20:06 +0000
Benjamin Smedberg Benjamin Smedberg - Don't evaluate conditionals if they are initialized in an inactive conditional context.
17169ca68e03996bb02d6707789659d1fae7df23
created 2009-02-17 14:46 -0500
pushed 2009-02-17 20:06 +0000
Benjamin Smedberg Benjamin Smedberg - Implement automatic wildcard expansion in targets and prerequisites. I hate this, but NSS uses it, and I hate NSS more.
1995f94b1c2f5af8477e04ff511e68b7ee1589b8
created 2009-02-17 14:06 -0500
pushed 2009-02-17 19:06 +0000
Benjamin Smedberg Benjamin Smedberg - Implement the vpath directive.
0d43efb31b378c9fb3b364a764f95ac4b62461e5
created 2009-02-14 21:15 -0500
pushed 2009-02-15 02:16 +0000
Benjamin Smedberg Benjamin Smedberg - Pass the makefile while expanding expansions and functions. This is preparation for implementing $(eval) and eliminating chdir(), which is a prerequisite for running recursive make in a single process.
e308b8e36c260cc5cb2103515a7146893fe1656a
created 2009-02-13 09:50 -0500
pushed 2009-02-13 14:50 +0000
Benjamin Smedberg Benjamin Smedberg - Use regular expressions for findtoken as well... shaves another 20% off parsing time, but parsing is still the long pole by far. parser-perf
df9087ec3e089c3f5126999731d6b40cd1cc318f
created 2009-02-13 09:11 -0500
pushed 2009-02-13 14:11 +0000
Benjamin Smedberg Benjamin Smedberg - Attempt to improve parser performance: rather than iterating one character at a time, move the token-finding code into the iterator functions and use regular expressions to find all the tokens at once. I'm not sure this is a win, but I'm saving it for testing on my other machine. parser-perf
0e1d287af7c6c0160544be4a93b6293a46cde4cb
created 2009-02-12 16:03 -0500
pushed 2009-02-12 21:03 +0000
Benjamin Smedberg Benjamin Smedberg - Better locations for command execution notices.
1a5a35701f9388d9d3216f01c21cc565a3d2ff11
created 2009-02-12 14:46 -0500
pushed 2009-02-12 19:47 +0000
Benjamin Smedberg Benjamin Smedberg - Fix static pattern stems... argh, I never wrote a passing test for static patterns, only a failing test. Dumb dumb dumb.
b60ef841a8113faefe5d31a713988d91743a74c2
created 2009-02-12 13:11 -0500
pushed 2009-02-12 19:47 +0000
Benjamin Smedberg Benjamin Smedberg - Performance and correctness fix:
1685c0669a0c167ee8a37bfd14849c0a74e4b39b
created 2009-02-12 10:39 -0500
pushed 2009-02-12 16:16 +0000
Benjamin Smedberg Benjamin Smedberg - Don't create locations for each iterated character... most of the time we don't use them, and they're easy to recreate from the data+offset. This is a significant performance boost.
ce89bcf91bf6b611b2e396413a786c5d5a922d37
created 2009-02-12 09:36 -0500
pushed 2009-02-12 14:36 +0000
Benjamin Smedberg Benjamin Smedberg - Two bug fixes:
d31336e2accf4770dcdb0710719e24b9ef9ed929
created 2009-02-11 16:08 -0500
pushed 2009-02-11 21:48 +0000
Benjamin Smedberg Benjamin Smedberg - Allow ${expansion} in addition to $(expansion).
c6223e135ac65bc958eb19189ff49ad7b895cd45
created 2009-02-11 11:44 -0500
pushed 2009-02-11 19:52 +0000
Benjamin Smedberg Benjamin Smedberg - Within ifdefs we still need to honor line continuations.
7950a2d51eda46ac6f48e567eca11e8e7254d8e9
created 2009-02-11 10:35 -0500
pushed 2009-02-11 15:35 +0000
Benjamin Smedberg Benjamin Smedberg - * The parsing of functions depends on their argument count: once the last argument has been reached, any commas are included in the argument, rather than starting a new argument. Some functions have variable or unlimited argument counts, so this is slightly complicated
3a4d76dcfbc1b194b445901ab615ac82746c7bc6
created 2009-02-10 22:31 -0500
pushed 2009-02-11 03:32 +0000
Benjamin Smedberg Benjamin Smedberg - More fixes found while building Mozilla:
510ec41867cca3b6604dc2f16382024bd536e17f
created 2009-02-10 20:21 -0500
pushed 2009-02-11 03:32 +0000
Benjamin Smedberg Benjamin Smedberg - * Fix infinite-recursion during expansion of variables issue. `setting` has to be a list, not a single variable name
e4edf197af9eea08da53ce2e04bf0ae1fa3fa93f
created 2009-02-10 17:06 -0500
pushed 2009-02-10 22:07 +0000
Benjamin Smedberg Benjamin Smedberg - Implement $(MAKE) $(MAKELEVEL), override, $(MAKEFLAGS).
facf7de96123fcd3ceb7b8ce08b903939b42512a
created 2009-02-10 15:34 -0500
pushed 2009-02-10 20:34 +0000
Benjamin Smedberg Benjamin Smedberg - Initial framework for exporting variables. This doesn't actually export them, because I haven't decided how much I want to deal with pulling variables from the environment.
137e13723669b8498327c20a5404a9ddef6f20c8
created 2009-02-10 14:57 -0500
pushed 2009-02-10 19:58 +0000
Benjamin Smedberg Benjamin Smedberg - Implement $(origin) and indicate that $(eval) is not implemented. I believe this to be all the functions.
2b377534d9fda5a9c9067abcb4280a46cad23c83
created 2009-02-10 11:54 -0500
pushed 2009-02-10 18:18 +0000
Benjamin Smedberg Benjamin Smedberg - A bevy of functions. Also simplified the function setup() since all the functions just call expectargs.
b6cacff1e1f3f437cc19c261a5b672b3e626e2fc
created 2009-02-10 11:32 -0500
pushed 2009-02-10 18:18 +0000
Benjamin Smedberg Benjamin Smedberg - .getloc(None) should be the location of the end of the string, for now, since that's what parsemakesyntax gives back if you read to EOF
e4d4c5c8d23af8340a8aba6119dc1d40ad0e89aa
created 2009-02-10 11:13 -0500
pushed 2009-02-10 16:18 +0000
Benjamin Smedberg Benjamin Smedberg - Implement ?=
2aed4b1eb9cb281f60144743bc298a27bfde6035
created 2009-02-10 09:50 -0500
pushed 2009-02-10 16:18 +0000
Benjamin Smedberg Benjamin Smedberg - Make includes rebuild include files when necessary.
2b97616cba4893364ce0499a9adae6e0bb5e4363
created 2009-02-09 17:26 -0500
pushed 2009-02-09 22:27 +0000
Benjamin Smedberg Benjamin Smedberg - And I thought includes was going to be hard.
1a4ff1289645c8a113bc98ff9cc57a93a0aab6cc
created 2009-02-09 17:17 -0500
pushed 2009-02-09 22:17 +0000
Benjamin Smedberg Benjamin Smedberg - This is surprisingly correct-feeling. It probably has rough edges but I'll wait for those to appear!
63531e755f523d8f441e695838fbc76bf9f4ff89
created 2009-02-09 16:45 -0500
pushed 2009-02-09 21:45 +0000
Benjamin Smedberg Benjamin Smedberg - Significant reworking of how variables are parsed and stored. They are now stored as strings, instead of Expansion objects. Recursively-expanded variables are parsed at the time they are expanded. This coupling between the data model and the parser is ridiculous, but compatible.
cbeb0eba9087f1903b4ddaf58eaafbe3ff75744a
created 2009-02-09 12:14 -0500
pushed 2009-02-09 21:45 +0000
Benjamin Smedberg Benjamin Smedberg - This is preparatory work for separating parsemakesyntax from the comment and line-continuation rules. The data iterators here are not actually being used yet anywhere except the tests.
59302968cf3b9998c95a210c08cf466aac216521
created 2009-02-06 15:34 -0500
pushed 2009-02-06 20:34 +0000
Benjamin Smedberg Benjamin Smedberg - Detect conditionals which never terminate.
10277ab28e313cee255512993f9498185f68378a
created 2009-02-06 15:28 -0500
pushed 2009-02-06 20:29 +0000
Benjamin Smedberg Benjamin Smedberg - Implement the 'define' directive. The edge cases and parsing rules for define are, once again, ridiculous. I never thought I would yearn for heredoc syntax!
8c332a8bae92fde914da88ffba14bc327894be2a
created 2009-02-06 13:51 -0500
pushed 2009-02-06 20:29 +0000
Benjamin Smedberg Benjamin Smedberg - Two-part change. I should have done these separately but forgot to commit after the first change:
f1e67b0fcf5dd5153ecaf04c986382010a0af3f3
created 2009-02-06 09:15 -0500
pushed 2009-02-06 14:15 +0000
Benjamin Smedberg Benjamin Smedberg - If you ignore implicit rules and order-only prerequisites, I think this might actually work! I'm not especially confident in the dependency calculations, though: I need to write some tests for that, which probably involves implementing $(shell)
23711d02d7b002a6058095530390f6d8070ce3e7
created 2009-02-05 22:38 -0500
pushed 2009-02-06 03:38 +0000
Benjamin Smedberg Benjamin Smedberg - Add support for commands specified on the same line as the rule.
2b81cff1aa0a0670f0a890b1e0b4b8e330571843
created 2009-02-05 22:25 -0500
pushed 2009-02-06 03:38 +0000
Benjamin Smedberg Benjamin Smedberg - Move comment and line-continuation parsing into the syntax parser. This is needed for the next patch which implements commands on the same line as a rule (delimited with ;)... in that case, the line continuations are command-style continuations, and not makefile syntax continuations.
996c5791e40cfff1b9956a1fce651788d3437946
created 2009-02-05 20:06 -0500
pushed 2009-02-06 01:06 +0000
Benjamin Smedberg Benjamin Smedberg - Parse static pattern rules. The data part isn't hooked up yet.
65ec57ff7d90d5e9a774a3bfc58d5cff48fab51d
created 2009-02-05 19:14 -0500
pushed 2009-02-06 00:14 +0000
Benjamin Smedberg Benjamin Smedberg - No newline at end of file...
87a1810a9a52a342c6d62cdb483660b152632c65
created 2009-02-05 17:20 -0500
pushed 2009-02-05 22:24 +0000
Benjamin Smedberg Benjamin Smedberg - Invert commandline variables so that they mean the right thing.
e48b0412f5ed6cff236f3a556c26fb151f5c8310
created 2009-02-05 16:03 -0500
pushed 2009-02-05 21:24 +0000
Benjamin Smedberg Benjamin Smedberg - More function implementations.
084bcc01b9961bf86d7027c7b2dd90b56df7092a
created 2009-02-05 15:06 -0500
pushed 2009-02-05 20:06 +0000
Benjamin Smedberg Benjamin Smedberg - Move the functions into their own file... they're only going to get bigger.
f945469861a575166ad7c94e8d7c69d658cd7029
created 2009-02-05 14:15 -0500
pushed 2009-02-05 20:06 +0000
Benjamin Smedberg Benjamin Smedberg - Fixes the simple testsuite/make.py problems:
ce053a18a4242e15ef33576f501ae1076f23477f
created 2009-02-05 13:56 -0500
pushed 2009-02-05 20:06 +0000
Benjamin Smedberg Benjamin Smedberg - Whoops!
15ca82d0ba63c56feb3c195923f188acae18998c
created 2009-02-05 13:55 -0500
pushed 2009-02-05 20:06 +0000
Benjamin Smedberg Benjamin Smedberg - Woohoo. Some of the real-world testsuite passes. Of course there are many errors also.
d555fca8adab7578a2c5b6aec1f2724241fb567d
created 2009-02-05 11:33 -0500
pushed 2009-02-05 16:33 +0000
Benjamin Smedberg Benjamin Smedberg - Whoops, introduced a test failure... this __getitem__ method often takes slices, which don't compare usefully against the string length. Use exceptions instead.
a77dcdc9a3fe4e850afaaa5b1cea36c39f1039df
created 2009-02-04 15:17 -0500
pushed 2009-02-04 20:17 +0000
Benjamin Smedberg Benjamin Smedberg - Start parsing from the command line. Of course we don't actually *execute* anything yet, we are just parsing.
5f4a31d7d5e7e1fcbd15de7388efa6f27aea2843
created 2009-02-04 12:06 -0500
pushed 2009-02-04 17:10 +0000
Benjamin Smedberg Benjamin Smedberg - Tests are wonderful. So is working code. Now we have both!
6827f875c9075e9a8e931603236c72ff72c572bf
created 2009-02-04 11:18 -0500
pushed 2009-02-04 17:10 +0000
Benjamin Smedberg Benjamin Smedberg - Whoops, target-specific wasn't quite right.
69c9310174749c4e0cc1770df1737a1ff4da5306
created 2009-02-04 11:16 -0500
pushed 2009-02-04 17:10 +0000
Benjamin Smedberg Benjamin Smedberg - Refactor setvariable a little bit to avoid constant re-parsing when setting multiple target-specific or pattern-specific variables.
396b616dffd098ecbdd3dc3956bd82e7e95fe9c3
created 2009-02-04 10:52 -0500
pushed 2009-02-04 15:53 +0000
Benjamin Smedberg Benjamin Smedberg - This might be enough for simple rules, but I haven't tried it or written any tests yet. Need to checkpoint before hacking pattern-specific variables, which are undocumented, kinda cool, and tricky.
7e2b7a360cbf9b4df9c76707ba5bdc48d98ed33c
created 2009-02-03 16:21 -0500
pushed 2009-02-03 21:21 +0000
Benjamin Smedberg Benjamin Smedberg - Pattern parsing is rocket science. This magic is unified in the data.Pattern class, although I don't know exactly how this is going to fit together with rules and targets yet.
d5e06631bdfea0be4e96e83c39a0273c5b467cba
created 2009-02-02 21:47 -0500
pushed 2009-02-03 02:47 +0000
Benjamin Smedberg Benjamin Smedberg - Simple variable assignment is important.
1a360cf3a18d0b19c4c7ef1cf77627cf479f7ad6
created 2009-02-02 21:15 -0500
pushed 2009-02-03 02:18 +0000
Benjamin Smedberg Benjamin Smedberg - Variable references work! At least the most-basic ones.
619a54201e32454e382b536cb130993782ecea71
created 2009-02-02 16:07 -0500
pushed 2009-02-02 21:07 +0000
Benjamin Smedberg Benjamin Smedberg - The makefile syntax parser needs to take a starting position as well.
1159b78fb8a662899a53f35c2d3c64c2209eb586
created 2009-02-02 15:34 -0500
pushed 2009-02-02 21:07 +0000
Benjamin Smedberg Benjamin Smedberg - This appears, at first glance, to actually parse functions and variable substitutions correctly. That's really awesome, even more so because I have unit tests.
33eb1c16caea14fd91561ac3d980eae7de3ea384
created 2009-01-31 13:39 -0500
pushed 2009-01-31 18:39 +0000
Benjamin Smedberg Benjamin Smedberg - Beginnings of a parser, with unit tests.
less more (0) tip