[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

No Subject



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