diff --git a/specification.md b/specification.md index b5f9fc4..487620e 100644 --- a/specification.md +++ b/specification.md @@ -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).