16 |
|
|
17 |
.PHONY: parser |
.PHONY: parser |
18 |
|
|
19 |
# generate parser with lex and yacc |
# generate parser with bison / yacc |
20 |
parser: |
parser: |
21 |
@echo "Generating LSCP parser..." |
$(top_builddir)/scripts/generate_parser.sh |
|
@if which "yacc" > /dev/null; then \ |
|
|
yacc -d lscp.y && \ |
|
|
yacc lscp.y && \ |
|
|
mv -f y.tab.h lscpsymbols.h && \ |
|
|
mv -f y.tab.c lscpparser.cpp && \ |
|
|
echo -n "Updating Documentation/lscp.xml..." && \ |
|
|
(cd ../../scripts/ && ./update_grammar.pl) && \ |
|
|
echo "OK"; \ |
|
|
else \ |
|
|
echo "You need yacc (or bison) to generate the parser."; \ |
|
|
fi; |
|