Commit 328e73e9 authored by Alexander Hirsch's avatar Alexander Hirsch
Browse files

Spec: Semantic checking may stop on first error

parent 415baac9
......@@ -322,8 +322,8 @@ This allows for better IDE integration.
Displaying the offending source code along with the error message is helpful, but not required.
Parsing may stop on the first error.
Pay attention to operator precedence.
Error recovery is optional.
Pay attention to operator precedence.
Note that partial mC programs, like an expression or statement, are not valid inputs to the main *parse* function.
The library *may* provide additional functions for parsing single expressions or statements.
......@@ -360,6 +360,8 @@ As the parser only does syntactic checking, additional semantic checks are imple
- Includes checking operations on arrays (including array size)
- Includes checking arguments and return types for call expressions
Semantic checking may stop on the first error encountered.
In addition to the AST, *symbol tables* are created and used for semantic checking.
Be sure to correctly model [*shadowing*](https://en.wikipedia.org/wiki/Variable_shadowing).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment