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.

46 lines
1.3 KiB

compUnit
|-- decl
| `-- constDecl
| |-- Const: const
| |-- bType
| | `-- Int: int
| |-- constDef
| | |-- Ident: a
| | |-- Assign: =
| | `-- constInitVal
| | `-- constExp
| | `-- addExp
| | `-- mulExp
| | `-- unaryExp
| | `-- primaryExp
| | `-- number
| | `-- IntConst: 10
| `-- Semi: ;
|-- funcDef
| |-- funcType
| | `-- Int: int
| |-- Ident: main
| |-- L_PAREN: (
| |-- R_PAREN: )
| `-- block
| |-- L_BRACE: {
| |-- blockItem
| | `-- stmt
| | |-- Return: return
| | |-- exp
| | | `-- addExp
| | | `-- mulExp
| | | |-- mulExp
| | | | `-- unaryExp
| | | | `-- primaryExp
| | | | `-- lVal
| | | | `-- Ident: a
| | | |-- DivOp: /
| | | `-- unaryExp
| | | `-- primaryExp
| | | `-- number
| | | `-- IntConst: 5
| | `-- Semi: ;
| `-- R_BRACE: }
`-- EOF: <EOF>