/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

nnethercote.github.io
| | zserge.com

Compilers is fun. Want to write your own one? Part 1 - lexer.
1.8 parsecs

Travel
| |
| | www.yoseph.tech

This week I am talking about the parts of the compiler, doing a deep dive into the Lexer and Parser and showing how to build the Lexer and Parser in Python. At the end of this post, we should have a working lexer and parser.
5.1 parsecs

Travel
| |
| | ahmedhosssam.github.io

The lexical analyzer (lexer) takes a stream of characters and produces a stream of names, keywords, and punctuation marks; it discards white space and comments between the tokens. Lexical tokens have types in any programming language, example: ID foo, x, n14 NUM 73, 0, 082 REAL 3.14, 10., 1e9, 0.5 COMMA , NOTEQ != LPAREN ( RPAREN ) Punctuation tokens such as IF, VOID , RETURN constructed from alphabetic characters are called reserved words and, in most languages, cannot be used as identifiers.
4.1 parsecs

Travel
| |
| | craftinginterpreters.com

[AI summary] The text discusses the implementation of a compiler for a simple programming language, focusing on parsing and bytecode generation. It covers topics such as recursive descent parsing, Pratt parsing, and the use of a parser table to handle operator precedence. The text also includes code snippets for the parser and compiler functions, as well as instructions for debugging and testing the compiler. The author emphasizes the importance of error handling and the use of a debug flag to enable the printing of generated bytecode.
17.9 parsecs

Travel
|