Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alexander Hirsch
703602-Compiler-Construction
Commits
328e73e9
Commit
328e73e9
authored
Mar 20, 2020
by
Alexander Hirsch
Browse files
Spec: Semantic checking may stop on first error
parent
415baac9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
specification.md
specification.md
+3
-1
No files found.
specification.md
View file @
328e73e9
...
...
@@ -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
)
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment