Abstract

This paper reports some misconceptions that are frequently detected in students of introductory compiler construction courses. Compiler construction is a topic included in many university computer science programs. It deals with the design and implementation of programming and other computer languages. These misconceptions have been identified by the author when teaching the topic at the Complutense University of Madrid (Spain). The misconceptions are classified according to the different stages approached in compiler construction: lexical level, syntactic level, semantic level. At the lexical level the following misconceptions are documented: (i) incorrect identification of token types; (ii) transitions with more than one symbol in the state transition diagrams; and (iii) inadequate treatment of keywords. Misconceptions at the syntactic level include: (i) confusing non-determinism and ambiguity; (ii) considering ε (the empty string) as a terminal symbol; (iii) misinterpreting operator precedence; (iv) attempting to perform type checking at the syntactic level; and (v) grammar transformation errors. Finally, the following misconceptions are reported at the semantic level: (i) transformations that do not preserve semantics; (ii) difficulties in determining the abstract syntax trees of complex sentences; (iii) incorrect interpretation of how the symbol table works during the analysis of lexically-scoped languages; (iv) variable addressing errors; and (v) errors related to the translation of complex designators. Identifying these errors is very useful in developing instructional strategies to help students avoid them.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call