peg
peg copied to clipboard
Import of Ian Piumarta's peg/leg recursive-descent parser generators for C
I understand that this is for mirror the Piumatra original work but for visibility to other users that could be interested on improving peg/leg I'm adding this pull request, do...
This modification allows to use C++ objects as YYSTYPE and that helps to build more complex abstract syntax trees using XML, JSON or other markup languages. A typical override example...
Would you like to add more error handling for return values from functions like the following? - [malloc](https://pubs.opengroup.org/onlinepubs/9699919799/functions/malloc.html "Memory allocation") ⇒ [makeHeader](https://github.com/gpakosz/peg/blob/74b7881f93ea9d2df51931debba10770b7fa9cbc/src/leg.leg#L190) - [strdup](https://pubs.opengroup.org/onlinepubs/9699919799/functions/strdup.html "Duplicate a string.") ⇒ [makeRule](https://github.com/gpakosz/peg/blob/74b7881f93ea9d2df51931debba10770b7fa9cbc/src/tree.c#L51)