[LLVMdev] PEG parsers? (was Re: Regular Expressions)

David Greene dag at cray.com
Thu Jun 11 14:05:15 PDT 2009


On Thursday 11 June 2009 13:06, Samuel Crow wrote:
> Hello everybody,
>
> I don't quite understand how the proposed regex library works but I know
> that PEG parser generators use a super-set of regex functionality to define
> their parsers.  There's also a nice one on Google code called YARDparser
> that uses templates based on PEGs to generate efficient recursive-decent
> parsers.

> Does the prospect of a PEG based syntax interest the team for the TableGen?

Right now we don't need anything as stong as a full parser for string pattern
matching and substitution in TableGen.  Anything we add should be small.  The
BSD regex library is about the smallest I've seen.  Nine source files totaling 
3,300 lines.

                               -Dave



More information about the llvm-dev mailing list