[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: parsing w spark
From:       Vassilis Virvilis <vasvir () iit ! demokritos ! gr>
Date:       2000-11-22 19:53:17
[Download RAW message or body]

Skip Montanaro wrote:
> 
> I've never used spark before but something jumps to mind.  It looks like you
> tried to parse
> 
>     VERSION=1.23p12

That's right.

> 
> but you defined statement as IDENTIFIER OPERATOR IDENTIFIER.  While you
> didn't tell us how an IDENTIFIER is constructed, I'd be hard-pressed to find
> a common definition where it starts with a digit.  Perhaps your stmt
> definition needs to be something like
> 
>     stmt ::= IDENTIFIER OPERATOR STRING NL

Yes this is required by the mini language I am trying to implement.

> 
> for some suitable definition of STRING.  To test my hypothesis, try parsing
> 
>     VERSION=VERSION
> 

Nice try... It didn't work. However John Aycock had help me find the
error. The __cmp__ function in the Token class was not defined (my
mistake), so there was no correlation between tokens and terminals such
as IDENTIFIER.

Anyway thank you very much for your concern.

	.Bill

-- 
http://www.python.org/mailman/listinfo/python-list

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic