Home | Documentation | Grammars
Lapg Home
SourceForge.net Logo
Download | Related Links | Lapg on SF.NET
What is lapg?

Lapg is the combined lexical analyzer and parser generator, which converts a description for a context-free LALR grammar into source file to parse the grammar. The generated parser accepts zero-terminated text, breaks it into tokens and applies given rules to reduce the input to the main non-terminal symbol. Lapg can be used in a wide range of tasks. It may be a simple string parser or a complicated compiler like C++.

Why use lapg?

Lapg is user-friendly replacement of yacc and lex. It uses templates for parser generation, supports 5 languages and can be adapted for any language you like.

Features:

  • Understands context-free LALR grammars with L-attributes
  • Provides readable grammar ambiguities reports
  • Supports error recovery, operator precedence
  • Generates code for C, C++, C#, Java and Javascript
  • Generated source doesn't require specific runtime
  • Lexem patterns are specified using regular expressions
  • Tokenizer supports modes, which limit sets of tokens considered for a match
  • Has option to generate default grammar for chosen target language
  • Works very fast

License

The Lapg package is released under GPL license.
Project is hosted by SourceForge.

eugeniy@gryaznov.net
Top