Archive

Posts Tagged ‘syntax’

How to create an abstract syntax tree while parsing an input stream.

May 25, 2014 2 comments

In this article I’ll show you how you can create the abstract syntax tree (AST) of an input stream while parsing it. A parser usually reads various tokens from its input by using a lexer as a helper coroutine and tries to match various grammar rules that specify the syntax of a language (the source language).

Read more…