Skip to content

Commit

Permalink
Improve parsing grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
gerlero committed Mar 23, 2024
1 parent ea9d7a0 commit 1431469
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions foamlib/_dictionaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
QuotedString,
Word,
common,
identbodychars,
printables,
)

FoamDimensionSet = namedtuple(
Expand Down Expand Up @@ -100,7 +100,7 @@ def __post_init__(self) -> None:
_FIELD | _LIST | _DIMENSIONED | _DIMENSIONS | common.number | _YES | _NO | _TOKEN
)

_TOKENS = (Word(identbodychars + "(),") | QuotedString('"', unquote_results=False))[
_TOKENS = (QuotedString('"', unquote_results=False) | Word(printables))[
1, ...
].set_parse_action(lambda s, loc, tks: " ".join(tks))

Expand Down

0 comments on commit 1431469

Please sign in to comment.