Recursive-Descent parser generators for C
peg(1) and leg(1) are tools for generating recursive-descent parsers: programs that perform pattern matching on text. They processes a Parsing Expression Grammar (PEG) to produce a program that recognises legal sentences of that grammar. peg(1) processes PEGs written using the original syntax described by Ford while leg(1) processes PEGs written using slightly different syntax and conventions that are intended to make it an attractive replacement for parsers built with lex(1) and yacc(1). Unlike lex(1) and yacc(1), peg(1) and leg(1) support unlimited backtracking, provide ordered choice as a means for disambiguation, and can combine scanning (lexical analysis) and parsing (syntactic analysis) into a single activity.
- Developed at devel:tools
- Sources inherited from project openSUSE:Factory
-
1
derived packages
- Download package
-
Checkout Package
osc -A https://api.opensuse.org checkout openSUSE:Backports:SLE-15-SP4:RebuildFactoryUpdates/peg && cd $_
- Create Badge
Source Files
Filename | Size | Changed |
---|---|---|
peg-0.1.20.tar.gz | 0000137305 134 KB | |
peg.changes | 0000001914 1.87 KB | |
peg.spec | 0000002418 2.36 KB |
Latest Revision
- update to 0.1.20: * src/tree.c (makeInline): Inline nodes remember their parent rule. * Replace "$$" in inline actions with "__". * src/tree.h (struct Inline): Inline nodes remember their parent rule. * (main): Don't print #line directives for headers if nolineFlag is set. * src/compile.c (allocateVariables): Separated from defineVariables. * (Node_compile_c_ko): Allocates and sets local variables during parse. * (Rule_compile_c2): Generate yyEnter and yyLeave if rule has variables. * (preamble): Macros yyEnter and yyLeave manage local variable space on stack during parsing. * src/compile.c: Allow re-entrant parsing. * Macro YYPARSEFROM_R names the function yyparsefrom_r(). * yyDone takes second argument, the yythunkpos at which actions start. * yyparsefrom_r saves and restores thunkpos and val state during recursive parse. * yyparsefrom resets thunkpos, val before recursive parse. - Update to 0.1.18:
Comments 0