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
This ends up with an unexpected token error for the second HEADER token with a token stream like HEADER BODY EMPTY HEADER BODY as the EMPTY gets consumed by body and hence it cannot be consumed by segments.
In Haskell I'd solve this with something like body = data <|> (try ( do { empty_line ; notFollowedBy header } )). As far as I can tell, there's nothing comparable to try or notFollowedBy. Is there any sensible way to define such a grammar?
The text was updated successfully, but these errors were encountered:
I've ended up with something like:
This ends up with an unexpected token error for the second HEADER token with a token stream like
HEADER BODY EMPTY HEADER BODY
as the EMPTY gets consumed bybody
and hence it cannot be consumed bysegments
.In Haskell I'd solve this with something like
body = data <|> (try ( do { empty_line ; notFollowedBy header } ))
. As far as I can tell, there's nothing comparable totry
ornotFollowedBy
. Is there any sensible way to define such a grammar?The text was updated successfully, but these errors were encountered: