alex / rply

An attempt to port David Beazley's PLY to RPython, and give it a cooler API.
BSD 3-Clause "New" or "Revised" License
381 stars 60 forks source link

Possible to have empty productions? #83

Open FrankC01 opened 5 years ago

FrankC01 commented 5 years ago

I have two modes: One where I do a full parse and another where I just want to parse out certain productions. Is this possible? Do I need to setup the Lexer differently or can I handle it in the Parser? If so, for either, any hints would be helpful.

shellbit32 commented 5 years ago

Would love to know this as well. I need to make a production that represents a list of arguments. Like this:

arg : arg arg arg_ : "empty"

FrankC01 commented 5 years ago

@FernandoLGL I ended up adding a different lexer for my needs...