LLK is an open source parser generator derived from ANTLR 2.7.2, but has since evolved and becomes quite different. LLK has grammar syntax more like JavaCC (but not the same :). There are also some new stuffs and it comes with sample grammars for Java, CSharp, GnuC, CSS, HTML, XHTML, XML, ECMA262/Javascript... etc.


LLK is released under GPL.
The sample grammars are under LGPL.
The generated files and support projects are under various licenses. See license terms here for details.
No liability or support should be expected.
Forum and bug tracking, ... etc. are hosted at the sourceforge project page.

Release notes

  • v0.7.0 - There are some major updates to the llk-csharp-model and related projects for the reference resolver. Also added ECMA262 aka Javascript grammar. See release note here for details.
  • See older release notes here.


Latest distribution can be downloaded at the sourceforge project page
NOTE: All web pages and documents are included in source distribution under llk-doc/doc/llk/ directory.


Features    Features and design notes.
Implementation    Implementation notes on internal design.
Command line options    Command line options.
Support files    Code files and support files generation.
Grammar syntax    Grammar file syntax.
Grammar options    Grammar options.
Builtins    Methods and variables available for action code.
Locator    Error location locator interface.
Tree parser    Tree parser notes.
Tree parser generator    Generate tree parser grammar from parser grammar.
Glossary    LLK terms explained.

Support projects

  • llk-share - Support file templates.
  • llk-share-formatter - Support files for code formatters.
  • llk-bdd - Use for parsing conditional sections in the CSharp sample grammar.
  • codedom - Code DOM framework used by the sample grammars.
  • util - Utility classes from black-sun project.
  • fireant - Ant based build system from the black-sun project. Used by llk-fireant for building and installing LLK.
  • fireant-optional - Extensions to fireant providing some non-core tasks.
See project dependency graph here.
The black-sun project also provide a LLK grammar editor that comes with syntax highlight, outline page, formatter, hyperlinks, ... etc.

Sample grammars

  • llk-csharp-model - CSharp 2.0 grammar with generic, support to parse conditional sections, code model, formatter, indexer, reference resolver, ... etc.
  • llk-java-model - Java 5 grammar with code formatter.
  • llk-gnuc - GnuC grammar.
  • llk-css2 - CSS 2 grammar with code formatter.
  • llk-html - HTML 4 grammar with code formatter.
  • llk-xhtml - XHTML 1.0 grammar with code formatter.
  • llk-xml - XML 1.1 grammar with code formatter.
  • llk-ecma262 - ECMA262 aka. Javascript grammar with code formatter.
  • llk-examples - Some misc. sample grammars.
The samples grammars are included in the LLK source distribution.

About Author