feat: improve

This commit is contained in:
Yarmo Mackenbach 2024-08-13 12:09:18 +02:00
parent 7c26274bda
commit d924d61d56
No known key found for this signature in database
GPG key ID: 2B71CD64664999B6
2 changed files with 14 additions and 10 deletions

View file

@ -6,6 +6,7 @@ This is the description of the entire work plan.
This is the description of the first task. This is the description of the first task.
This line is still part of the first paragraph of the description. This line is still part of the first paragraph of the description.
This description has # symbols and ü © Ð Latin-1 chars.
This is a second paragraph of that description. This is a second paragraph of that description.

View file

@ -8,7 +8,7 @@ line
: plan : plan
| task | task
| subtask | subtask
| comment | description
; ;
plan plan
@ -42,14 +42,14 @@ subtask_obsolete
: SUBTASK_OBSOLETE_TOKEN TEXT amount? : SUBTASK_OBSOLETE_TOKEN TEXT amount?
; ;
comment
: TEXT
;
amount amount
: '{' INT '}' : '{' INT '}'
; ;
description
: TEXT
;
PLAN_TOKEN PLAN_TOKEN
: '# ' : '# '
; ;
@ -78,7 +78,6 @@ WS
: [ \r\n\t]+ -> skip : [ \r\n\t]+ -> skip
; ;
TEXT TEXT
: TEXTHEAD TEXTBODY* : TEXTHEAD TEXTBODY*
; ;
@ -87,16 +86,20 @@ INT
: DIGIT+ : DIGIT+
; ;
fragment LETTER
: [a-zA-Z\u0080-\u00FF_]
;
fragment DIGIT fragment DIGIT
: [0-9] : [0-9]
; ;
fragment TEXTHEAD fragment TEXTHEAD
: [a-zA-Z] : LETTER
; ;
fragment TEXTBODY fragment TEXTBODY
: TEXTHEAD : LETTER
| DIGIT | DIGIT
| [_()., ] | [_().,# ]
; ;