summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-05-14 17:08:45 -0700
committerCarl Worth <cworth@cworth.org>2010-05-14 17:13:00 -0700
commit81f01432bd4aad8e8b87ae273eb05297e35eff07 (patch)
tree52dfc5e48db1440a6b7fa7f362e875e349f8ce76 /main
parent4eb2ccf261f739ad9b91455f28c1dece573a30d6 (diff)
Don't return SPACE tokens unless strictly needed.
This reverts the unconditional return of SPACE tokens from the lexer from commit 48b94da0994b44e41324a2419117dcd81facce8b . That commit seemed useful because it kept the lexer simpler, but the presence of SPACE tokens is causing lots of extra complication for the parser itself, (redundant productions other than whitespace differences, several productions buggy in the case of extra whitespace, etc.) Of course, we'd prefer to never have any whitespace token, but that's not possible with the need to distinguish between "#define foo()" and "#define foo ()". So we'll accept a little bit of pain in the lexer, (enough state to support this special-case token), in exchange for keeping most of the parser blissffully ignorant of whether tokens are separated by whitespace or not. This change does mean that our output now differs from that of "gcc -E", but only in whitespace. So we test with "diff -w now to ignore those differences.
Diffstat (limited to 'main')
0 files changed, 0 insertions, 0 deletions