mirror of
https://github.com/mudabbir-ahmad/MYOL-TB2-prog3-Py.git
synced 2026-10-07 19:40:21 +00:00
10 lines
171 B
ANTLR
10 lines
171 B
ANTLR
grammar Hello;
|
|
|
|
greeting : greet+;
|
|
leaving : bye+;
|
|
greet : 'hello' | 'hi' ;
|
|
|
|
start : 'hello' ID ;
|
|
ID : [a-zA-Z]+ ;
|
|
WS : [ \t\r\n]+ -> skip ;
|
|
bye : ('bye'| 'goodbye') ID ; |