lark-parser / lark

Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
MIT License
4.84k stars 410 forks source link

Document regex flags #230

Closed ealter closed 4 years ago

ealter commented 6 years ago

I saw in the cheatsheet that lark supports regex flags imslux. However, I couldn't find any documentation in lark for what these meant. After reading the lark sourcecode, I realized that these are documented in the python re module docs (https://docs.python.org/3/library/re.html) under the heading (?aiLmsux).

I'm not sure the best place to put this in the lark documentation. There's no anchor tag on that section of the python docs to directly link to.

erezsh commented 6 years ago

Hi, if you'd like to add this to the documentation, then probably the best place is ./docs/grammar.md (https://lark-parser.readthedocs.io/en/latest/grammar/)

I'll be happy to accept a PR for it.

Do note that the a flag only exists in Python3, so similarly Lark will only support it for Python3