fix failing test generation
failed in Python because « type » is reserved
This commit is contained in:
parent
707dbb9f8f
commit
fe13b23628
|
@ -23,7 +23,7 @@ masterGrammar(grammarName, slaveGrammarName) ::= <<
|
||||||
grammar M;
|
grammar M;
|
||||||
import S;
|
import S;
|
||||||
prog : decl ;
|
prog : decl ;
|
||||||
type : 'int' | 'float' ;
|
type_ : 'int' | 'float' ;
|
||||||
ID : 'a'..'z'+ ;
|
ID : 'a'..'z'+ ;
|
||||||
INT : '0'..'9'+ ;
|
INT : '0'..'9'+ ;
|
||||||
WS : (' '|'\n') -> skip;
|
WS : (' '|'\n') -> skip;
|
||||||
|
@ -31,8 +31,8 @@ WS : (' '|'\n') -> skip;
|
||||||
|
|
||||||
slaveGrammar(grammarName) ::= <<
|
slaveGrammar(grammarName) ::= <<
|
||||||
parser grammar S;
|
parser grammar S;
|
||||||
type : 'int' ;
|
type_ : 'int' ;
|
||||||
decl : type ID ';'
|
decl : type_ ID ';'
|
||||||
| type ID init ';' {<write("\"JavaDecl: \" + $text")>};
|
| type_ ID init ';' {<write("\"JavaDecl: \" + $text")>};
|
||||||
init : '=' INT;
|
init : '=' INT;
|
||||||
>>
|
>>
|
||||||
|
|
Loading…
Reference in New Issue