simpleparse parsing problem

Mike C. Fletcher mcfletch at vrplumber.com
Sat Sep 2 15:40:06 CEST 2006


David Hirschfield wrote:
> Anyone out there use simpleparse? If so, I have a problem that I can't 
> seem to solve...I need to be able to parse this line:
>
> """Cen2 = Cen(OUT, "Cep", "ies", wh, 544, (wh/ht));"""
>   
...
> expr        := termlist, ( operator, termlist )+
>   
I *believe* you wanted that to be *, not +

Best way to write a SimpleParse grammar is from the ground up, using 
test cases, so test each thing you think you're parsing. Makes it much 
easier to spot situations like this.

HTH,
Mike

-- 
________________________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://www.vrplumber.com
  http://blog.vrplumber.com




More information about the Python-list mailing list