Skip to content

Commit

Permalink
Allow spaces in labels if enclosed by ".
Browse files Browse the repository at this point in the history
  • Loading branch information
zuckerruebe committed Oct 21, 2024
1 parent 814f5ed commit ab1534b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytrnsys/ddck/_parse/ddck.lark
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ input: variable
| SIGNED_NUMBER
| ("0" "," "0" | "CONST")

labels: LABELS (HASH| number_of_labels) (label [","])* label
labels: LABELS (HASH| number_of_labels) label+

LABELS: "labels"i

Expand Down Expand Up @@ -207,7 +207,7 @@ DEFAULT_VARIABLE_NAME: NAME

NAME: /(?!(constants|equations|unit|parameters|inputs|labels|trace|assign)\s)[a-z]([a-z]|[0-9]|_)*/i

LABEL: /(?!(constants|equations|unit|parameters|inputs|labels|trace|assign)\s)[^,\s\*!]+/i
LABEL: /(?!(constants|equations|unit|parameters|inputs|labels|trace|assign)\s)("[^"]+"|[^\s\*!]+)/i

UNREFERENCABLE_NAME: /(?!(constants|equations|unit|parameters|inputs|labels|trace|assign)\s)[a-z]([a-z]|[0-9]|_|-)*/i

Expand Down

0 comments on commit ab1534b

Please sign in to comment.