diff options
author | albert-github <albert.tests@gmail.com> | 2018-03-26 15:57:42 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-03-26 15:57:42 (GMT) |
commit | 6ad7854e72abda652bdf034d7cf355dcb136a7fe (patch) | |
tree | 7c1c43aa2bc4434785317f6a9a820a858f41c477 /vhdlparser/Makefile | |
parent | 7e2fcd305c8c9377aa958a3d812cc31bc81c0e32 (diff) | |
download | Doxygen-6ad7854e72abda652bdf034d7cf355dcb136a7fe.zip Doxygen-6ad7854e72abda652bdf034d7cf355dcb136a7fe.tar.gz Doxygen-6ad7854e72abda652bdf034d7cf355dcb136a7fe.tar.bz2 |
Adding debug options to vhdl parser generator
JavaCC contains by default options to get more information about the parser paths used (analogous to the -d option of flex).
- Makefile
- adding option (JAVACC_FLAGS) for easier use of JavaCC options
- adding possibility to reset generated files to their git versions.
- vhdlstring.h adding functions required by debug options (debug_token_manager)
Diffstat (limited to 'vhdlparser/Makefile')
-rw-r--r-- | vhdlparser/Makefile | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/vhdlparser/Makefile b/vhdlparser/Makefile index 4725470..84bdccf 100644 --- a/vhdlparser/Makefile +++ b/vhdlparser/Makefile @@ -7,16 +7,48 @@ # for any purpose. It is provided "as is" without express or implied warranty. # See the GNU General Public License for more details. # -# Documents produced by Doxygen are derivative works derived from the +# Documents produced by doxygen are derivative works derived from the # input used in their production; they are not affected by this license. # -regenerate: - rm -f CharStream.cc CharStream.h ErrorHandler.h ParseException.cc ParseException.h \ +# +# Files generated by javacc +# +GEN_FILES=CharStream.cc CharStream.h ErrorHandler.h ParseException.cc ParseException.h \ Token.cc Token.h TokenManager.h TokenMgrError.cc TokenMgrError.h VhdlParser.cc VhdlParser.h \ VhdlParserConstants.h VhdlParserTokenManager.cc VhdlParserTokenManager.h \ JavaCC.h - javacc vhdlparser.jj - cp JavaCC.h.in JavaCC.h +# +# Generate parser (default target) +# +# when generating the parser with debug options it will look like: +# make JAVACC_FLAGS=-debug_parser +# or +# make JAVACC_FLAGS="-debug_parser -debug_lookahead" +# +# Available debug options: +# -debug_parser +# -debug_token_manager +# -debug_lookahead +# +# For other javacc settings / options consult the documentation of javacc. + +regenerate: + @rm -f $(GEN_FILES) + @javacc $(JAVACC_FLAGS) vhdlparser.jj + @cp JavaCC.h.in JavaCC.h + +# +# reset the generated files back to their versions from git. +# + +reset_gen_files: + @rm -f $(GEN_FILES) + @git checkout $(GEN_FILES) + +help: + @echo "Targets:" + @echo " regenerate (default)" + @echo " reset_gen_files" FORCE: |