-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchitecture.uml
33 lines (24 loc) · 1021 Bytes
/
architecture.uml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@startuml
actor User
User -> Lexer : Provide source code
alt success
Lexer -> Parser : Build token stream
Parser -> "Symbol Manager" : Build AST
alt success
"Symbol Manager" -> "Semantic Validator": Build Symbol table\nincluding types, scope,\nplace of declaration/initalization
alt success
"Semantic Validator" -> "Optimizer" : Validate AST(e.g.\nno assignment to function,\nno call to variable,\nno missing main function)
"Optimizer" -> "Code Generator": Optimize AST
"Code Generator" -> "Optimizer": Generate bytecode
"Optimizer" -> Interpreter: Optimize bytecode
"Interpreter" -> User: Interprete code and show result
else Semantic error
"Semantic Validator" -> User: Error: e.g. Unkown variable referenced
end
else Unexpected token
"Parser" -> User: Unexpected token at position ...
end
else Invalid token
Lexer -> User: Error: Invalid token at position ...
end
@enduml