====================== CMSI 488 Preparation for Quiz 1 ====================== The quiz is open book, notes, and "static" web. You cannot solicit answers nor extract information from a person or bot. You can not look at nor take pictures of other people's exams. First, scan this list of the topics covered so far and make sure everything at least rings a bell. Programs, Interpreters, and Translators Analysis-Synthesis Model of Translation Why it exists Analysis Phases: Lexical -- Syntax -- Semantic Compiler structure Language Specification What is syntax, semantics, pragmatics Syntax Structure vs. Meaning Difference between syntax errors and static semantic errors Why we separate context free parts from context sensitve parts Why we separate tokenization from phrase structure (Micro vs. Macro) CFG vs. BNF vs. EBNF vs. Syntax Diagrams Variations on EBNF Abstract Syntax How to write abstract syntax trees Multiple concrete syntaxes for a given abstract syntax Lexical Analysis Tokenization Regular Expressions Parsing The Top-Down approach Expand-Match, LL(k), ... The Bottom-Up approach (WILL NOT BE COVERED ON AN EXAM) Shift-Reduce, LR(k), ... Parser Generators JavaCC Example Language Specifications Iki Carlos A Carlos Compiler Components Project Structure JavaCC file Entities POM File Know how to: * Write regular expressions * Determine a language based on a given grammar * Write a grammar for a given language, subject to constraints such as being LL(1), LL(2), LL(k), etc. * Classify errors as (a) lexical, (b) syntax, (c) static semantic, (d) dynamic semantic, (e) not an error. * Give an AST for a given code fragment. * Give a tree grammar for a given language. * Write a JavaCC specification for a language. * Critique stupid language design choices, backing up your critique with solid, technical arguments. * Detect grammar ambiguity, non-LL(1)ness. * Tokenize strings (by hand). * Find equivalent EBNF phrases for given phrases, such as AA* for A+. To prepare: * Try to do practice questions that cover the above things you "need to know how to do" above. Many exam questions will be very close to existing practice questions.