Add ANTLR grammar for greetings and farewells with corresponding parser and listener implementations

This commit is contained in:
bobbert committed 2026-03-26 15:32:19 +00:00
1 parent 2027302cf1
commit 6205020013
30 files changed
+1109 -37

No files matched your search

+5
View File
@@ -1,5 +1,10 @@
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 ;