Parsing Expressions

23 views
Skip to first unread message

Kévin KIN-FOO

unread,
May 30, 2013, 1:05:12 PM5/30/13
to met...@googlegroups.com
Hi,

I have been digging Bug 409148. I would like to initiate a discussion about what's beneath it.
Reading the bug report, you will notice that there are problems in Metalua's current way to parse expressions.
As far as I am concerned, solving this is more about a refactoring than a bug fix.
I though bout 2 solutions to get rid of this cartesian product of expressions

The first one is split the expr parser defined in metalua.compiler.parser.expr in several parsers.
But, in order to do so, we will need a kind of parser similar to gg.multisequence able to deal with more than one starting-with-keyword parser.
I suppose we do not already have one of those for performance considerations.

Another alternative would be to modify the actual gg.multisequence API to specify if a primary parser accepts prefix, infix and suffix parsers.

If you have other solutions or more thoughts about this problematic, you are welcome.

Regards
Reply all
Reply to author
Forward
0 new messages