summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-05-19 10:01:29 -0700
committerCarl Worth <cworth@cworth.org>2010-05-19 10:01:29 -0700
commit8f38aff9b5dd42ef963532fe5fc618e8bafa218a (patch)
tree54e5169fc3edd846609f1e6af8d71c2d4d5c4204 /Makefile
parent5d2114254592e03b6d554c5e2eea4ea442c3fa05 (diff)
Add a wrapper function around the lexer.
We rename the generated lexer from yylex to glcpp_lex. Then we implement our own yylex function in glcpp-parse.y that calls glcpp_lex. This doesn't change the behavior at all yet, but gives us a place where we can do implement alternate lexing in the future. (We want this because instead of re-lexing from strings for macro expansion, we want to lex from pre-parsed token lists. We need this so that when we terminate recursion due to an already active macro expansion, we can ensure that that symbol never gets expanded again later.)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3fa863c..8811612 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ glcpp: glcpp.o glcpp-lex.o glcpp-parse.o hash_table.o xtalloc.o
bison --debug --defines=$*.h --output=$*.c $^
%.c: %.l
- flex --outfile=$@ $<
+ flex --prefix=glcpp_ --outfile=$@ $<
glcpp-lex.c: glcpp-parse.h