mirror of
https://codeberg.org/NLnet/takentaal.git
synced 2025-08-30 06:20:06 +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
|
||||||
: PLAN_TOKEN TEXT
|
: PLAN_TOKEN TEXT
|
||||||
| PLAN_TOKEN TEXT AMOUNT
|
| PLAN_TOKEN TEXT amount
|
||||||
;
|
;
|
||||||
|
|
||||||
task
|
task
|
||||||
: TASK_TOKEN TEXT
|
: TASK_TOKEN TEXT
|
||||||
| TASK_TOKEN TEXT AMOUNT
|
| TASK_TOKEN TEXT amount
|
||||||
;
|
;
|
||||||
|
|
||||||
subtask
|
subtask
|
||||||
|
@ -29,25 +29,29 @@ subtask
|
||||||
;
|
;
|
||||||
|
|
||||||
subtask_new
|
subtask_new
|
||||||
: SUBTASK_NEW_TOKEN TEXT AMOUNT?
|
: SUBTASK_NEW_TOKEN TEXT amount?
|
||||||
;
|
;
|
||||||
|
|
||||||
subtask_partial
|
subtask_partial
|
||||||
: SUBTASK_PARTIAL_TOKEN TEXT AMOUNT?
|
: SUBTASK_PARTIAL_TOKEN TEXT amount?
|
||||||
;
|
;
|
||||||
|
|
||||||
subtask_complete
|
subtask_complete
|
||||||
: SUBTASK_COMPLETE_TOKEN TEXT AMOUNT?
|
: SUBTASK_COMPLETE_TOKEN TEXT amount?
|
||||||
;
|
;
|
||||||
|
|
||||||
subtask_obsolete
|
subtask_obsolete
|
||||||
: SUBTASK_OBSOLETE_TOKEN TEXT AMOUNT?
|
: SUBTASK_OBSOLETE_TOKEN TEXT amount?
|
||||||
;
|
;
|
||||||
|
|
||||||
comment
|
comment
|
||||||
: TEXT
|
: TEXT
|
||||||
;
|
;
|
||||||
|
|
||||||
|
amount
|
||||||
|
: '{' INT '}'
|
||||||
|
;
|
||||||
|
|
||||||
PLAN_TOKEN
|
PLAN_TOKEN
|
||||||
: '# '
|
: '# '
|
||||||
;
|
;
|
||||||
|
@ -76,11 +80,11 @@ WS
|
||||||
: [ \r\n\t]+ -> skip
|
: [ \r\n\t]+ -> skip
|
||||||
;
|
;
|
||||||
|
|
||||||
AMOUNT
|
INT
|
||||||
: '{' INT+ '}'
|
: DIGIT+
|
||||||
;
|
;
|
||||||
|
|
||||||
fragment INT
|
fragment DIGIT
|
||||||
: [0-9]
|
: [0-9]
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue