These are chat archives for pest-parser/pest

21st
Feb 2017
Sunjay Varma
@sunjay
Feb 21 2017 00:21
Sounds good
Sunjay Varma
@sunjay
Feb 21 2017 03:56
Ran into a fun issue with left-recursion today: dragostis/pest#101
I don't think you can really fix it in the parser other than maybe putting a recursion limit? Not sure if that is even possible. This issue may really just end up being a warning for other people who run into this in the future. Maybe something to document?
Sunjay Varma
@sunjay
Feb 21 2017 04:23
Also, I found this in regards to left-recusion: https://github.com/orlandohill/peg-left-recursion
I haven't read it, so I'm not sure if it really helps but it seems to be good information
Dragoș Tiselice
@dragostis
Feb 21 2017 07:35
It's definitely good information. PEG does not support left-recursion. It's not a limitation (at least, I wouldn't call it so), it's just a consequence of the way PEG is always eager/greedy.
Laurent Wandrebeck
@lwandrebeck
Feb 21 2017 16:12
@dragostis : what would you think about defining some default new « types » (ie, int, float, octal, hex, single-quoted, quoted…) to help at grammar readability ?
Dragoș Tiselice
@dragostis
Feb 21 2017 16:18
@lwandrebeck You mean to have defaults for these particular rules?
Laurent Wandrebeck
@lwandrebeck
Feb 21 2017 16:20
yes, provided by default by pest
I guess loads of people do create them very often when they use pest
Dragoș Tiselice
@dragostis
Feb 21 2017 18:30
Sure. It would be a good idea to open up an issue with this. :)
Laurent Wandrebeck
@lwandrebeck
Feb 21 2017 18:30
will do
Laurent Wandrebeck
@lwandrebeck
Feb 21 2017 19:51
dragostis/pest#103