newlines in Gump

Torbjörn Lager lager at ling.gu.se
Thu Jul 4 20:49:48 CEST 2002


Never mind, problem solved. End-of-lines CAN be used as tokens... The 
problem I had was that I didn't realize that skip only skips up TO the 
end of line... therefore the parse error...

Cheers,
Torbjorn

Torbjörn Lager wrote:
> Hi All,
> 
> Can a sequence of newlines be used as a(n ordinary) token in Gump? (I 
> need it to resolve a conflict.) In my scanner I have:
> 
>       ...
> 
>       lex <\n+>
>      GS, putToken1('eols')
>       end
> 
>       lex <<EOF>>
>      GS, putToken1('EOF')
>       end
> 
>       ...
> 
> and in my parser:
> 
>       ...
> 
>       syn Rule($)
>      Sym(LHS) '->' SymSeq(Body) 'eols' => rule(LHS Body)
>       end
> 
>       ...
> 
> but the parser doesn't seem to get hold of the EOF.
> 
> Any clues?
> 
> Regards,
> Torbjorn
> 
> -
> Please send submissions to users at mozart-oz.org
> and administriva mail to users-request at mozart-oz.org.
> The Mozart Oz web site is at http://www.mozart-oz.org/.
> 



-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.





More information about the mozart-users mailing list