maywyk
unread,May 21, 2008, 2:07:14 AM5/21/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to GOLD Parsing System
Hello, mighty parsers!
I 've just joined your community. I started exploring possibilities of
GOLD Builder with sample grammar:
! ------------------------------------------------- Sets
{ID Head} = {Letter} + [_]
{ID Tail} = {Alphanumeric} + [_]
{String Chars} = {Printable} + {HT} - ["]
{DigNZ} = [123456789]
! ------------------------------------------------- Terminals
Identifier = {ID Head}{ID Tail}*
!StringLiteral = '"' {String Chars}* '"'
Integer = {DigNZ}{Digit}*
And rule definitions follow...
The question is: on input "100x ....." scanner does detect
Integer 100 then
Identifier x.
And the error is raised by LALR parser, if no suitable rule found for
pair
Integer Identifier.
I would prefer scanner to raise error on "100x" - without producing
tokens.
I mean: Integer must be isolated from {String Chars} by whitespace or
'+','-',...
Can I tune up something in grammar specification ???
Many thanks in advance :)