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

add ignore feature for lexer #3

Closed hirochachacha closed 11 years ago

hirochachacha commented 11 years ago

Hi, I've implemented simple ignoring feature like:

lg = LexerGenerator()

lg.add("PLUS", r"\+")
lg.add("MINUS", r"-")
lg.add("NUMBER", r"\d+")

lg.ignore("SPACING", r"\s+")

Thank you.

hirochachacha commented 11 years ago

I fixed it!