From: Jay Freeman (saurik) Date: Sun, 23 Sep 2012 15:54:35 +0000 (-0700) Subject: Detect all lexer state errors, and show line number. X-Git-Tag: v0.9.500%b1~123 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/cab9dcf224888df99d46d603451dc45390a06a07?ds=sidebyside Detect all lexer state errors, and show line number. --- diff --git a/GNUmakefile.in b/GNUmakefile.in index 1990dfa..0268180 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -204,8 +204,8 @@ distclean: clean Cycript.tab.cc Cycript.tab.hh location.hh position.hh: Cycript.yy $(bison) -v --report=state $< - ! grep '^ *$$default reduce using rule [0-9]* (LexSetRegExp)$$' Cycript.output -B 2 | grep 'shift, and go to state [0-9]*$$' - ! grep '^ *$$default reduce using rule [0-9]* (LexSetRegExp)$$' Cycript.output -B 2 | grep -v '\$default' | grep 'reduce using rule [0-9]* ([^)]*)$$' + ! grep -n '^ *$$default reduce using rule [0-9]* (Lex[A-Z][^)]*)$$' Cycript.output -B 2 | grep 'shift, and go to state [0-9]*$$' + ! grep -n '^ *$$default reduce using rule [0-9]* (Lex[A-Z][^)]*)$$' Cycript.output -B 2 | grep -v '\$default' | grep 'reduce using rule [0-9]* ([^)]*)$$' lex.cy.c: Cycript.l $(flex) -t $< | $(sed) -e 's/int yyl;/yy_size_t yyl;/;s/int yyleng_r;/yy_size_t yyleng_r;/' >$@