You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nudt-compiler-cpp/lab1_results/testdata/functional/08_const_array_defn.tree

97 lines
3.5 KiB

compUnit
|-- decl
| `-- constDecl
| |-- Const: const
| |-- bType
| | `-- Int: int
| |-- constDef
| | |-- Ident: a
| | |-- L_BRACKET: [
| | |-- constExp
| | | `-- addExp
| | | `-- mulExp
| | | `-- unaryExp
| | | `-- primaryExp
| | | `-- number
| | | `-- IntConst: 5
| | |-- R_BRACKET: ]
| | |-- Assign: =
| | `-- constInitVal
| | |-- L_BRACE: {
| | |-- constInitVal
| | | `-- constExp
| | | `-- addExp
| | | `-- mulExp
| | | `-- unaryExp
| | | `-- primaryExp
| | | `-- number
| | | `-- IntConst: 0
| | |-- Comma: ,
| | |-- constInitVal
| | | `-- constExp
| | | `-- addExp
| | | `-- mulExp
| | | `-- unaryExp
| | | `-- primaryExp
| | | `-- number
| | | `-- IntConst: 1
| | |-- Comma: ,
| | |-- constInitVal
| | | `-- constExp
| | | `-- addExp
| | | `-- mulExp
| | | `-- unaryExp
| | | `-- primaryExp
| | | `-- number
| | | `-- IntConst: 2
| | |-- Comma: ,
| | |-- constInitVal
| | | `-- constExp
| | | `-- addExp
| | | `-- mulExp
| | | `-- unaryExp
| | | `-- primaryExp
| | | `-- number
| | | `-- IntConst: 3
| | |-- Comma: ,
| | |-- constInitVal
| | | `-- constExp
| | | `-- addExp
| | | `-- mulExp
| | | `-- unaryExp
| | | `-- primaryExp
| | | `-- number
| | | `-- IntConst: 4
| | `-- R_BRACE: }
| `-- Semi: ;
|-- funcDef
| |-- funcType
| | `-- Int: int
| |-- Ident: main
| |-- L_PAREN: (
| |-- R_PAREN: )
| `-- block
| |-- L_BRACE: {
| |-- blockItem
| | `-- stmt
| | |-- Return: return
| | |-- exp
| | | `-- addExp
| | | `-- mulExp
| | | `-- unaryExp
| | | `-- primaryExp
| | | `-- lVal
| | | |-- Ident: a
| | | |-- L_BRACKET: [
| | | |-- exp
| | | | `-- addExp
| | | | `-- mulExp
| | | | `-- unaryExp
| | | | `-- primaryExp
| | | | `-- number
| | | | `-- IntConst: 4
| | | `-- R_BRACKET: ]
| | `-- Semi: ;
| `-- R_BRACE: }
`-- EOF: <EOF>