add lexer

tester
This commit is contained in:
Minh VU
2025-02-07 15:10:55 +01:00
parent 16ca8f7050
commit a4b293602a
3 changed files with 29 additions and 2 deletions

View File

@@ -12,7 +12,30 @@ options {
}
entite: '<' ID '>';
LC : '<'
RC : '>'
P: '.'
V: ','
SEMI: ';'
G: '"'
prog : bloc EOF
;
bloc : sujet listvc P
;
sujet : LC entity RC
;
listvc : LC vc RC more
;
more : SEMI listvc
|
;
vc : LC verbe RC listc
;
listc : LC comp RC morec
;
morec : V comp
|
;