mirror of
https://codeberg.org/NLnet/takentaal.git
synced 2025-08-29 22:10:07 +00:00
fix: amount as parser rule
This commit is contained in:
parent
dad77f64ec
commit
72737335de
1 changed files with 13 additions and 9 deletions
22
takentaal.g4
22
takentaal.g4
|
@ -13,12 +13,12 @@ line
|
|||
|
||||
plan
|
||||
: PLAN_TOKEN TEXT
|
||||
| PLAN_TOKEN TEXT AMOUNT
|
||||
| PLAN_TOKEN TEXT amount
|
||||
;
|
||||
|
||||
task
|
||||
: TASK_TOKEN TEXT
|
||||
| TASK_TOKEN TEXT AMOUNT
|
||||
| TASK_TOKEN TEXT amount
|
||||
;
|
||||
|
||||
subtask
|
||||
|
@ -29,25 +29,29 @@ subtask
|
|||
;
|
||||
|
||||
subtask_new
|
||||
: SUBTASK_NEW_TOKEN TEXT AMOUNT?
|
||||
: SUBTASK_NEW_TOKEN TEXT amount?
|
||||
;
|
||||
|
||||
subtask_partial
|
||||
: SUBTASK_PARTIAL_TOKEN TEXT AMOUNT?
|
||||
: SUBTASK_PARTIAL_TOKEN TEXT amount?
|
||||
;
|
||||
|
||||
subtask_complete
|
||||
: SUBTASK_COMPLETE_TOKEN TEXT AMOUNT?
|
||||
: SUBTASK_COMPLETE_TOKEN TEXT amount?
|
||||
;
|
||||
|
||||
subtask_obsolete
|
||||
: SUBTASK_OBSOLETE_TOKEN TEXT AMOUNT?
|
||||
: SUBTASK_OBSOLETE_TOKEN TEXT amount?
|
||||
;
|
||||
|
||||
comment
|
||||
: TEXT
|
||||
;
|
||||
|
||||
amount
|
||||
: '{' INT '}'
|
||||
;
|
||||
|
||||
PLAN_TOKEN
|
||||
: '# '
|
||||
;
|
||||
|
@ -76,11 +80,11 @@ WS
|
|||
: [ \r\n\t]+ -> skip
|
||||
;
|
||||
|
||||
AMOUNT
|
||||
: '{' INT+ '}'
|
||||
INT
|
||||
: DIGIT+
|
||||
;
|
||||
|
||||
fragment INT
|
||||
fragment DIGIT
|
||||
: [0-9]
|
||||
;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue