Subscribe to this list via RSS Blog posts tagged in lexing

Posted by on in Blogs
When Does Lexing End and Parsing Begin? I had an interesting bug in my compiler: The parser would fail on blank lines. To a certain degree, this makes sense; the formal grammar of the language does not include blank lines. This is invalid input! On the other hand, every programming language ever invented, as far as I know, simply ignores them. That sounds simple, but, as the author of the compiler, it is necessary to ask: Where is the correct place to ignore a blank line? Compiler textbooks and classes tend to divide compiler archi...
  • Page :
  • 1

Check out more tips and tricks in this development video: