Replies: 1 comment
-
Technically that's not wrong. The shortest possible TOML document is supposedly just an empty string which is matched by this rule, as it should be. However, you should change your parser to by "greedy", that is, trying to match as much as possible instead of as little as possible. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
far from being an abnf expert, but trying to implement a parser for toml files I got stuck in what apparently was a bug in my code and now I wonder whether it is something else. The line under investigation is this. Both terms here (
ws
and[ comment ]
) are optional so my parser got stuck forever on this line for a file that started with neither whitespace nor a comment at the beginning. This, because the line is satisfied by""
, and the parser never steps ahead to the first character.Beta Was this translation helpful? Give feedback.
All reactions