ok
This commit is contained in:
@@ -27,4 +27,4 @@ G: '"'
|
||||
fragment WS: (' ' | '\n' | '\t' | '\r' | '\u000C');
|
||||
WSS: WS+ { skip(); };
|
||||
ID: ('a'..'z'|'A'..'Z')('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-')*;
|
||||
STRING: ('a'..'z'|'A'..'Z'|'\u00C0'..'\u00FF')('a'..'z'|'A'..'Z'|'0'..'9'|'\u00C0'..'\u00FF'|'_'|'-'|'&'|' ')* ;
|
||||
STRING: ('a'..'z'|'A'..'Z'|'0'..'9'|'\u00C0'..'\u00FF')('a'..'z'|'A'..'Z'|'0'..'9'|'\u00C0'..'\u00FF'|'_'|'-'|'&'|' ')* ;
|
||||
@@ -58,20 +58,19 @@ morec [TurtleAST parent] : V listc[parent] //correction : listc au lieux de comp
|
||||
verbe returns[String val] :
|
||||
enV=entity
|
||||
{$val = $enV.val;}
|
||||
;
|
||||
;
|
||||
comp[TurtleAST parent] :
|
||||
LC enC=entity RC //<ID>
|
||||
{parent.addComplement($enC.val,false);}
|
||||
| G text[parent] G //"STRING" ou "ID"
|
||||
;
|
||||
;
|
||||
text[TurtleAST parent] :
|
||||
sC=STRING
|
||||
{parent.addComplement($sC.text,true);}
|
||||
|enC2=entity
|
||||
{parent.addComplement($enC2.val,true);}
|
||||
;
|
||||
|
||||
;
|
||||
entity returns[String val] :
|
||||
i=ID
|
||||
{$val = $i.text;}
|
||||
;
|
||||
;
|
||||
@@ -41,7 +41,7 @@ public class ASD_Turtle implements TurtleASD {
|
||||
str += ",";
|
||||
}
|
||||
}
|
||||
return str;
|
||||
return str;
|
||||
}
|
||||
}
|
||||
record Complement_EntityImp(EntityImp entity) implements Complement{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package TP1;
|
||||
|
||||
interface TurtleASD {
|
||||
String toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user