[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: simpleparse - what is wrong with my grammar?

Mike C. Fletcher

2/25/2008 2:55:00 PM

Laszlo Nagy wrote:
....
> Is there any way I can specify precedence tables? Or do I have to use
> a different parser generator then?
You normally specify them as
top_precedence/second_precedence/last_precedence sets. SimpleParse'
limitation is with ambiguity, not with precedence. SimpleParse will
wind up "overparsing" noticeably for each operation, that is, it will
parse "expr" and "word" once for each level of precedence. SimpleParse
is normally fast enough that you don't really care, but optimising those
cases is something that's sat on my "would be nice" list for a long
time. Unlike separate lexing/parsing systems, it's a little more
involved for SimpleParse to do that without losing the generality of the
parsing approach (i.e. the flexibility of a non-lexed approach).

HTH,
Mike