semi-complete semantic v2

This commit is contained in:
2025-12-03 04:58:41 +09:00
parent 90b7d8fcbe
commit 2b6193a2c7
11 changed files with 360 additions and 419 deletions

47
src/res.txt Normal file
View File

@@ -0,0 +1,47 @@
C-MINUS COMPILATION: ./test.cm
Building Symbol Table...
Error: undeclared function "x" is called at line 3
< Symbol Table >
Symbol Name Symbol Kind Symbol Type Scope Name Location Line Numbers
------------- ----------- ------------- ------------ -------- ------------
main Function int global 2 1
input Function int global 0 0
output Function void global 1 0
value Variable int output 0 0
x Function undetermined main 0 3
< Functions >
Function Name Return Type Parameter Name Parameter Type
------------- ------------- -------------- --------------
main int void
input int void
output void
- - value int
x undetermined undetermined
< Global Symbols >
Symbol Name Symbol Kind Symbol Type
------------- ----------- -------------
main Function int
input Function int
output Function void
< Scopes >
Scope Name Nested Level Symbol Name Symbol Type
------------ ------------ ------------- -----------
output 1 value int
main 1 x void
Checking Types...
Error: Invalid function call at line 3 (name : "x")
Type Checking Finished