Support Files Generation

LLK generate all files need to compile and run the generated parser. A number of files are always regenerated and overwrite existing files when the grammar changes. They are generated into the output directory (as specified by the --dir and --module command line option):

  • The Lexer, Parser, TreeParser source files.
  • The token type definition file in source and xml format.
  • The visitor interface source file if grammar require visitor generation.

LLK generate template file for AST nodes defined in the grammar into the output directory if they do NOT exists in the output directory.

LLK also generate a number of interfaces and support files (including LLKToken and LLKNode). These files are NOT regenerated if they already exists in any of the support or output directories. They can also be shared between parsers. Support files are generated into the support directory (as specified by the --sdir and --smodule command line option).