A general overview of the parsing process. Presented at the Eclipse Based Development and Integration course (https://inf.mit.bme.hu/en/edu/courses/eafi). ºÝºÝߣs by Oszkar Semerath.
1 of 5
Download to read offline
More Related Content
Parsing process
1. Token stream
ID Int EndIncr.
Parsing Process + Services: Lexer
6
Lexer
Character stream
width += 10;
ID Int EndIncr.
width += 10 ;
Services:
 Syntax highlight
 Primitive: Red+Bold
 ID: maroon
 Number: black
long value = 0;
value += 10;
2. Parsing Process + Services: Parser
7
Lexer
Parser
Character stream
width += 10;
Variable
Reference
name = „width"
Int Value
val = 10
Increment
target value
Reference Integer ExpressionIncr.Rule =
Token stream
ID Int EndIncr.
Variable
Reference
name = „width"
Int Value
val = 10
Increment
target value
AST
 Outlining
Services
 Folding  Indexing + Search
3. Parsing Process + Services: Resolver
8
Lexer
Parser
Resolver
Character stream
width += 10;
Variable
Reference
Variable
Declaration
name = "width"
type = Long
long value; value += 12;
referring
Token stream
ID Int EndIncr.
Variable
Reference
name = „width"
Int Value
val = 10
Increment
target value
AST
AST + Links
Variable
Reference
referring
Variable
Declaration
name = "width"
type = Long
Services
Hover:
Refactoring:
Content
Assist:
4. Parsing Process + Services: Analysis
9
Lexer
Parser
Resolver
Analysis
Character stream
width += 10;
Reachability [start ïƒ target]: 
Type checking [long  int]: 
Token stream
ID Int EndIncr.
Variable
Reference
name = „width"
Int Value
val = 10
Increment
target value
AST
AST + Links
Variable
Reference
referring
Variable
Declaration
name = "width"
type = Long
Model
Services:
 Type Checking
 Validation:
 Validators
 ïƒ
 Quick Fix:  ïƒ ïƒ¾ rules
5. Parsing Process
10
Lexer
Parser
Resolver
Analysis
Character stream
width += 10;
ID Int EndIncr.
width += 10 ;
Variable
Reference
name = „width"
Int Value
val = 10
Increment
target value
Reference Integer ExpressionIncr.Rule =
Variable
Reference
Variable
Declaration
name = "width"
type = Long
long value; value += 12;
referring
Reachability [start ïƒ target]: 
Type checking [long  int]: 
Token stream
ID Int EndIncr.
Variable
Reference
name = „width"
Int Value
val = 10
Increment
target value
AST
AST + Links
Variable
Reference
referring
Variable
Declaration
name = "width"
type = Long
Model