Closed russ closed 4 years ago
Hi! Thanks for opening the issue. I'm currently on vacation, but I'll take a look as soon as I can. I just recently finished the Crystal implementation of semantic actions, so I anticipate the problem is located there. In the meantime: does the whitespace token error you describe occur in the semantic action parser?
Sorry, about that. I noticed that the repo mentions Crystal 0.32.0 specifically. I switched over to that I'm getting the behavior I'm expecting now.
I'm still curious! Would you mind telling me your previous Crystal version?
I was using 0.31.1.
I'm working on a router/url parser and I'm having some issues with the semantic options. I'm able to generate a parser without the semantic builder though. So I tried to recreate the boolean parser example you have in the README.
https://gist.github.com/russ/40223aa58a1ffc48f0038c7bf3b1a742
With that I get an error on empty spaces
Unhandled exception: Invalid token " " (Exception)
. I'm also noticing in my url parser that I'm not getting anything set to true in the PARSE_FINAL_TABLES. When that happens I get aUnhandled exception: Invalid token EOF (Exception)
error. I'm not 100% sure if that is connected or not.Here is the parser code I'm working on. I'm keeping it simple to start and just returning the internal token type. https://gist.github.com/russ/04853f424fb1004056070b94657b9449