forked from NUDT-compiler/nudt-compiler-cpp
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.
48 lines
1.3 KiB
48 lines
1.3 KiB
compUnit
|
|
|-- decl
|
|
| `-- varDecl
|
|
| |-- bType
|
|
| | `-- Int: int
|
|
| |-- varDef
|
|
| | |-- Ident: a
|
|
| | |-- L_BRACKET: [
|
|
| | |-- constExp
|
|
| | | `-- addExp
|
|
| | | `-- mulExp
|
|
| | | `-- unaryExp
|
|
| | | `-- primaryExp
|
|
| | | `-- number
|
|
| | | `-- IntConst: 10
|
|
| | |-- R_BRACKET: ]
|
|
| | |-- L_BRACKET: [
|
|
| | |-- constExp
|
|
| | | `-- addExp
|
|
| | | `-- mulExp
|
|
| | | `-- unaryExp
|
|
| | | `-- primaryExp
|
|
| | | `-- number
|
|
| | | `-- IntConst: 10
|
|
| | `-- R_BRACKET: ]
|
|
| `-- Semi: ;
|
|
|-- funcDef
|
|
| |-- funcType
|
|
| | `-- Int: int
|
|
| |-- Ident: main
|
|
| |-- L_PAREN: (
|
|
| |-- R_PAREN: )
|
|
| `-- block
|
|
| |-- L_BRACE: {
|
|
| |-- blockItem
|
|
| | `-- stmt
|
|
| | |-- Return: return
|
|
| | |-- exp
|
|
| | | `-- addExp
|
|
| | | `-- mulExp
|
|
| | | `-- unaryExp
|
|
| | | `-- primaryExp
|
|
| | | `-- number
|
|
| | | `-- IntConst: 0
|
|
| | `-- Semi: ;
|
|
| `-- R_BRACE: }
|
|
`-- EOF: <EOF>
|