Le Sat, 23 Jun 2012 10:24:18 -0700, Peter Goodman <peter.good...@gmail.com> a écrit :
> Can you describe your method? It's summarily described in the README http://www.kevembuangga.com/lrtt/README I can add the following: Productions in a given rule are categorized as - non recursive - mutual recursive - directly left recursive They are tried in the above order (even if there is ZERO non recursive) As soon as a production is fully matched every recursive case is tried again and again until it fails, if more recursive cases are still at the bottom of the list they are tried also in the same manner. When no more recursive production can match for the rule the whole stack of recursive calls is kept to be run, first in descending order (to run the semantic actions in front of the recursion points) then in ascending order to follow up with whatever comes after the recursion points. The limitation is that once a recursive production has been exhausted it will not be tried again even is some other one further down the list succeeded and reinstated the conditions for a successful match of a production upward in the list. This could be changed by restarting at the very beginning in each case (at some cost) but this is debatable: What is the INTENDED semantic that we want? Best regards, jld _______________________________________________ PEG mailing list PEG@lists.csail.mit.edu https://lists.csail.mit.edu/mailman/listinfo/peg