Created
January 18, 2016 01:25
-
-
Save wbars/71f5304e40b69f6c0530 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROGRAM program_name; | |
CONST | |
e = 2.7182818; | |
a = 2 * 3; | |
VAR | |
a,b: Integer; | |
c: String; | |
BEGIN | |
IF a = b THEN | |
a = b + c | |
ELSE | |
a = b - c; | |
END. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
├── Program | |
├── Const | |
├── Expression | |
├── Identifier(e) | |
├── Operator(EQUALS) | |
└── Expression | |
└── Double(2.7182818) | |
└── Expression | |
├── Identifier(a) | |
├── Operator(EQUALS) | |
└── Expression | |
└── Term | |
├── Int(2) | |
├── Operator(MULTIPLY) | |
└── Int(3) | |
├── Var | |
├── VarDeclaration | |
├── Identifier(a) | |
├── Identifier(b) | |
├── Separate(COLON) | |
└── Type(INTEGER) | |
└── VarDeclaration | |
├── Identifier(c) | |
├── Separate(COLON) | |
└── Type(STRING) | |
└── CompoundStatement | |
├── Condition | |
├── Expression | |
├── Identifier(a) | |
├── Operator(EQUALS) | |
└── Identifier(b) | |
└── CompoundStatement | |
└── Expression | |
├── Identifier(a) | |
├── Operator(EQUALS) | |
└── SimpleExpression | |
├── Identifier(b) | |
├── Operator(PLUS) | |
└── Identifier(c) | |
└── Expression | |
├── Identifier(a) | |
├── Operator(EQUALS) | |
└── Expression | |
└── SimpleExpression | |
├── Identifier(b) | |
├── Operator(MINUS) | |
└── Identifier(c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment