[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re:
just realised that you aren't using the tokens letter and digit in the
productions.
This just removes them and puts them in the Helpers section.
There is a production missing: states_decl
Good Luck
Fidel.
>From: predael@komodo.ing.unico.it
>To: sablecc-list@sable.mcgill.ca
>Date: Thu, 2 Nov 100 15:58:21 GMT
>
>Please help me !!
>I'm using SableCC to build a parser for the input language used by a
>concurrent
>system verification tool wich is part of my thesis work.
>The grammar is simple but SableCC tells me this error message
>"Verifying identifiers.
>java.lang.RuntimeException: [24,11] letter undefined."
>but in fact letter is defined.
>what's going wrong ??
>(by the way, is there any help document on errors ?)
>
>here is my grammar.
>
>
>
> Package VERA.input;
>
> Tokens
>
> interface = 'interface';
> labels = 'labels';
> process = 'process';
> ports = 'ports';
> states = 'states';
> jumps = 'jumps';
> design = 'design' ;
> components = 'components';
> lpar ='{';
> rpar = '}';
> arrow = '=>';
> at = '@';
> semicolon = ';';
> colon = ':';
> point = '.';
> and = '&';
>
> digit = ['0'..'9'];
> letter = [['a' .. 'z'] + ['A' .. 'Z']];
> id = letter ((letter|digit))* ;
> number = (digit)+;
> blank = (10 | 13 | ' ')*;
>
> Ignored Tokens
> blank;
>
> Productions
>
> systemdescription = interface_decl* process_decl* design_decl;
> interface_decl = interface binding labels_decl;
> labels_decl = labels bindigs;
>
> process_decl = process binding ports_decl states_decl jumps_decl;
> ports_decl = ports bindings;
> jumps_decl = jumps lpar jump_decl* rpar;
> jump_decl = idbinding [source]: number arrow [target]: number lpar
>label_ref* rpar;
> label_ref = number at number semicolon ;
>
> design = design components_decl connections_decl;
> components_decl = components bindings;
> connection_decl = [leftcomponent]: number point [leftport]: number
>and
>[rightcomponent]: number point [rightport]: number semicolon ;
> connections_decl= lpar connection_decl* rpar ;
>
> idbinding = number optional_id? semicolon;
> optional_id = colon id;
> idbindings = lpar binding* rpar ;
>
> binding = [instance]: number colon [type]: number semicolon;
> bindings = lpar binding* rpar ;
>
>
>
>------------------------------------------------------
>Politecnico di Milano - Facolta' di Ingegneria di Como.
>Universita' degli Studi dell'Insubria - Como
>servizio wEb-Mail http://mailbox.ing.unico.it/mailbox
>
>
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
concurrent.g