nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
parser: drop sed and use perl
[nit.git]
/
src
/
parser
/
Makefile
diff --git
a/src/parser/Makefile
b/src/parser/Makefile
index
9a3231f
..
5115297
100644
(file)
--- a/
src/parser/Makefile
+++ b/
src/parser/Makefile
@@
-22,13
+22,15
@@
all: parser.nit
.nit.sablecc3: nit.sablecc3xx
./prescc.sh $< $@
.nit.sablecc3: nit.sablecc3xx
./prescc.sh $< $@
-# Note that parser_nodes is automatically synced with the grammar
+# Note that parser_nodes is no more automatically synced with the grammar
parser.nit: .nit.sablecc3 xss/*.xss
${SABLECC} -c .nit.sablecc3.dump -t xss/main.xss -p usermodule parser_nodes .nit.sablecc3
parser.nit: .nit.sablecc3 xss/*.xss
${SABLECC} -c .nit.sablecc3.dump -t xss/main.xss -p usermodule parser_nodes .nit.sablecc3
- LANG=C sed -i -e 's/\([ \[]\)P\([A-Z]\)/\1A\2/g' parser.nit parser_abs.nit parser_prod.nit parser_tables.nit lexer.nit
+ mv -f -- parser.nit .parser-nofact.nit
+ ./fact_parser.pl .parser-nofact.nit > parser.nit
+ perl -np -i.orig -e 's/([ \[])P([A-Z])/\1A\2/g' parser.nit parser_abs.nit parser_prod.nit lexer.nit
clean:
clean:
- rm -f -- .nit.sablecc3 .nit.sablecc3.dump || true
+ rm -f -- .nit.sablecc3 .nit.sablecc3.dump .parser-nofact.nit || true
dist-clean: clean
dist-clean: clean
- rm -f -- parser.nit parser_abs.nit parser_prod.nit parser_tables.nit lexer.nit || true
+ rm -f -- parser.nit parser_abs.nit parser_prod.nit lexer.nit || true