University of Maryland Global Campus

CMSC 430: Compiler Theory and Design

A guide to UMGC's CMSC 430, which covers the formal translation of programming languages and requires projects that implement parts of a compiler.

Updated October 2026 · 5 min read

CMSC 430 at the University of Maryland Global Campus shows how source code becomes something a machine can run, and asks you to build parts of that process yourself.

UMGC describes it as an examination of the formal translation of programming languages, syntax and semantics, with the goal of writing programs constructed using program generators.

Topics include finite-state grammars and recognizers, context-free parsing techniques such as recursive descent, precedence, LL(k), LR(k) and SLR(k), machine-independent code generation and improvement, and syntax-directed translation. The prerequisite is CMSC 330.

Programming projects that implement parts of a compiler are required. Students usually find the theory manageable on its own; joining it to working generator tools is the hard part.

Course at a Glance

ItemDetails
UniversityUniversity of Maryland Global Campus (UMGC)
Course codeCMSC 430
Credits3
PrerequisiteCMSC 330
Required workProgramming projects implementing parts of a compiler
Key toolsProgram generators (scanner and parser generators)

What CMSC 430 Covers

Topic (UMGC)What it means in practice
Finite-state grammars and recognizersRegular expressions and automata that split source code into tokens
Context-free parsingRecursive descent, precedence, LL(k), LR(k) and SLR(k) parsers that check structure
Syntax-directed translationAttaching actions to grammar rules to build trees or evaluate expressions
Code generation and improvementProducing and optimizing machine-independent intermediate code
Program generatorsTools that build scanners and parsers from specifications

Key Concepts Explained

Lexical Analysis

The scanner reads characters and groups them into tokens using regular expressions. It discards whitespace and comments and reports characters that belong to no token.

Example: The line total = total + 42; becomes the tokens IDENTIFIER(total), ASSIGN, IDENTIFIER(total), PLUS, INT_LITERAL(42), SEMICOLON.

Ambiguity and Precedence

A grammar such as E → E + E | E * E | id is ambiguous: a + b * c has two parse trees. Rewriting the grammar with separate levels for terms and factors, or declaring precedence in a parser generator, gives multiplication the higher priority.

LL Versus LR

LL parsers work top-down, predicting which rule to use from the next token, and cannot handle left recursion. LR parsers work bottom-up, shifting tokens and reducing them by rules, and accept a wider range of grammars.

Example: The left-recursive rule E → E + T | T loops forever in recursive descent. Rewriting it as E → T E' and E' → + T E' | ε removes the left recursion so an LL parser can use it.

Working with Scanner and Parser Generators

The course goal of writing programs built with program generators means you will likely write specifications rather than hand-code every phase. In practice this usually means a lexer specification of token patterns and a grammar file with actions attached to each rule. The exact tools vary by section, so follow your project instructions.

Shift-reduce and reduce-reduce conflicts are the most common stumbling block. A shift-reduce conflict often signals missing precedence or associativity, as in the classic dangling else.

A reduce-reduce conflict usually means two rules can match the same input and the grammar needs restructuring. Reading the generator's output file, which lists states and conflicting items, shows you exactly where the problem lies.

Typical Assignments and How to Approach Them

Assignment typeWhat it testsHow to approach it
Scanner projectToken patternsTest each token type with its own small input file
Parser projectGrammar designFix conflicts before adding semantic actions
Semantic or translation phaseSyntax-directed translationPrint the tree or values after each rule fires
Theory problemsFIRST, FOLLOW, parse tablesWork them by hand, step by step

Where Students Get Stuck

Study Tips for CMSC 430

How We Help with CMSC 430

Send the project specification, the grammar or lexer files, your current code and any feedback. A writer with compiler and programming languages experience can explain theory, help you resolve parser conflicts, prepare a model phase for a comparable language, or work through FIRST, FOLLOW and parse-table problems with you.

GradeEssays is independent of the University of Maryland Global Campus. Our work is for study and reference; the projects you submit must be your own under UMGC's academic integrity policy.

Make Sense of Your CMSC 430 Project

Share the specification, grammar and feedback. We explain each phase and prepare a commented model to learn from.

Start My Compiler Help

Free revisions · Full refund if late · Written from scratch for your order

Frequently Asked Questions

What is the prerequisite for CMSC 430?

UMGC lists CMSC 330.

Are there programming projects in CMSC 430?

Yes. UMGC states that programming projects implementing parts of a compiler are required.

Which parsing techniques are covered?

UMGC names recursive descent, precedence, LL(k), LR(k) and SLR(k) parsing.

What is a shift-reduce conflict?

It is a point where an LR parser could either shift the next token or reduce by a rule. Precedence rules or grammar changes usually resolve it.

Why can't LL parsers handle left recursion?

A top-down parser would call the same rule again without consuming input, looping forever, so left recursion must be removed.

Can you help with FIRST and FOLLOW sets?

Yes. We work through the rules using your own grammar so you can compute them independently.