December 2021
Beginner
840 pages
47h 29m
English
Language processing starts with a program to convert Camille program text (i.e., a string) into an abstract-syntax tree. In other words, we need a scanner and a parser, referred to as a front end (shown on the left-hand side of Figure 10.1), which can accept a string, verify that it is a sentence in Camille, and translate it into an abstract-syntax representation. Recall from Chapter 3 that scanning culls out the lexemes, determines whether all are valid, and returns a list of tokens. Parsing determines whether the list of tokens is in the correct order and, if so, structures this list into an abstract-syntax tree. A parser generator is a program that accepts lexical and syntactic ...