From d924d61d5611905b23d244d142b02832c9141233 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Tue, 13 Aug 2024 12:09:18 +0200 Subject: [PATCH] feat: improve --- example | 1 + takentaal.g4 | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/example b/example index a29a58e..76890fa 100644 --- a/example +++ b/example @@ -6,6 +6,7 @@ This is the description of the entire work plan. This is the description of the first task. 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. diff --git a/takentaal.g4 b/takentaal.g4 index 8f5225f..eb1116a 100644 --- a/takentaal.g4 +++ b/takentaal.g4 @@ -8,7 +8,7 @@ line : plan | task | subtask - | comment + | description ; plan @@ -42,14 +42,14 @@ subtask_obsolete : SUBTASK_OBSOLETE_TOKEN TEXT amount? ; -comment - : TEXT - ; - amount : '{' INT '}' ; +description + : TEXT + ; + PLAN_TOKEN : '# ' ; @@ -78,7 +78,6 @@ WS : [ \r\n\t]+ -> skip ; - TEXT : TEXTHEAD TEXTBODY* ; @@ -87,16 +86,20 @@ INT : DIGIT+ ; +fragment LETTER + : [a-zA-Z\u0080-\u00FF_] + ; + fragment DIGIT : [0-9] ; fragment TEXTHEAD - : [a-zA-Z] + : LETTER ; fragment TEXTBODY - : TEXTHEAD + : LETTER | DIGIT - | [_()., ] - ; \ No newline at end of file + | [_().,# ] + ;