|
You are here |
vlad.website | ||
| | | | |
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. | |
| | | | |
healeycodes.com
|
|
| | | | | Writing an interpreter from scratch. | |
| | | | |
bloeys.com
|
|
| | | | | In 'Thought 2: Regex is Like Assembly' I wondered why we are still doing regex in this kind of hard to understand, symbolic way, when we have already invented high level programming languages. There is no reason regex can't be written as clearly as any other programming language we use today. I thought doing this would be an interesting project, and so I came up with Regexl, a high level language for writing regex, that can be used as a simple library. | |
| | | | |
leafo.net
|
|
| | | What is a PEG What is LPeg Installing LPeg Some simple grammars String equality Combining patterns Parsing numbers A calculator expression parser Closing What is a PEG A PEG, or Parsing Expression Grammar, is a way of describing a language (or patter... | ||