You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to extract the indent, key, and value from here. The indent is the number of spaces divided by 4, the key is any string that does not include ":", and the value is everything from the end of the whitespace following ":" until the end of the line, including any subsequent colons. My initial attempt at this was to make the following rules:
The problem is that the :value rule matches the entire "key: value" sequence, making it the longest match, so whittle throws an error when it finds a :value after the :indent instead of a :key. Does whittle have a way to represent this kind of grammar?
The text was updated successfully, but these errors were encountered:
I have a grammar in which I have lines like this:
I need to extract the indent, key, and value from here. The indent is the number of spaces divided by 4, the key is any string that does not include ":", and the value is everything from the end of the whitespace following ":" until the end of the line, including any subsequent colons. My initial attempt at this was to make the following rules:
The problem is that the :value rule matches the entire "key: value" sequence, making it the longest match, so whittle throws an error when it finds a :value after the :indent instead of a :key. Does whittle have a way to represent this kind of grammar?
The text was updated successfully, but these errors were encountered: