UniCC Standard C Parser Template
|Download||Shipped with the UniCC LALR(1) Parser Generator|
|Mercurial SCM repository||https://bitbucket.org/codepilot/cparser|
|License||BSD open source license|
The UniCC Standard C Parser Template enables the UniCC LALR(1) Parser Generator to support the C programming language in its program module generator. Using this template, UniCC is capable to generate parsers expressed in the C programming language from a UniCC Grammar Definition describing a context-free grammar for a language.The template also provides facilities for further grammar processing and integration of the generated modules with other C modules.
The UniCC Standard C Parser Template is also used by UniCC itself for bootstrap, meaning that UniCC constructs its own parser out of itself.
The UniCC Standard C Parser Template provides the following features.
- Well tested, feature proved, used by UniCC's own grammar parser
- Platform and C-compiler independent, based on the C standard library only
- ANSI C89 compliant
- Thread-safe, parsers can recursively be called using an extendible Parser Control Block (pcb)
- Wide-character and UTF-8 Unicode input support (C99)
- Trace and stack trace facilities
- Build-in error recovery
- Build-in syntax tree generator
- Symbol and production tables for debug and syntax tree construction
- Provides a default parser test environment if no semantic code is given
- Dynamic end-of-file behavior
The integrated syntax-tree generator can be optionally activated, and constructs a virtual tree structure within the parser, which can be visualized or used to construct abstract syntax trees (ASTs). An automatism for creating ASTs right from within a parser using the UniCC Standard C Parser Template is planned.
The build-in syntax tree visualizer prints out a textual view on console. With some tricks and extensions on the same template, graphical trees can be rendered (in this case with assistance of SVG Tree Drawer).
The UniCC Standard C Parser Template is licensed under the BSD open source license.