12011619 Liquan Wang
12111744 Wenhui Tao
12111611 Ruixiang Jiang
> make splc #compile the splc compiler for SPL language
> make clean #clean the directory
- Using class
rec
as a node, there are types var, fun, arr, etc., and actions usfun, usassign, etc - Create initial node in lex
- In Bison, define first, obtain a global map, link the desired elements on the nodes of all action types and then judge the action type of each node
- When DFS traverse the tree, the node of the action type is assigned a value of the corresponding type, which is convenient for use in nested calls later
- In the
recs
ofrec
, for the array will store the value related to its size, the number of values represents the number of dimensions, forExp
expression we will store the result of the operation in the val property of rec, for return will look for a specific statement, get its val
- Tests for undefined variables are performed
- The processing of arrays will help us to check the array overreach