-
Notifications
You must be signed in to change notification settings - Fork 1
/
FILES
121 lines (88 loc) · 3.13 KB
/
FILES
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
M2J -- Modula-2 to Java Translator and Compiler
* Files in the repository *
(1) Documents
README.md
repo landing page, a brief description of the project
LICENSE
the full license text of the license used by the project
FILES
a summary of files and their purpose, (this file)
m2j-grammar.gll
a formal LL(1) grammar for Modula-2 used by the project
(2) Source Code
ProtoInfile.java
interface for the file reader class
Infile.java
source file reader class,
manages file buffer, current position, lookahead, line and column counters
used by the lexer class to read symbols for tokenisation and obtain lexemes
ProtoTerminals.java
interface for the terminals class
Terminals.java
terminals class,
defines enumerated tokens representing terminal symbols, classifies tokens,
used by the lexer class for symbol tokenisation
ProtoLexer.java
interface for the lexer class
Lexer.java
lexer class,
reads source file via file reader class and tokenises the input,
detects lexical faux-pas and errors,
reports warnings and errors using the Diagnostics class
used by the parser class for syntax analysis
ProtoNonTerminals.java
interface for the nonterminals class
NonTerminals.java
nonterminals class
defines enumerated productions representing non-terminal symbols,
provides FIRST() and FOLLOW() sets for each non-terminal symbol
used by the parser class for syntax analysis
ProtoParser.java
interface for the parser class
Parser.java
parser class
reads token stream via lexer class and performs syntax analysis
detects syntactical faux-pas and errors,
reports warnings and errors using the Diagnostics class
builds an abstract syntax tree using the AST class
ProtoAstNode.java
interface for the abstract syntax tree class
AstNode.java
abstract syntax tree class
provides an API to build tree nodes of different node types
used by the parser class to build an abstract syntax tree
ProtoAstNodeType.java
interface for abstract syntax tree node types
AstNodeType.java
abstract syntax tree node types class
defines enumerated values representing tree node types
provides an API for tree node integrity checks
used by the abstract syntax tree class when creating tree nodes
ProtoAstWriter.java
interface for AST writer class
AstWriter.java
AST writer class
writes an AST in S-expression format to a file
ProtoDotWriter.java
interface for AST to DOT exporter class
DotWriter.java
AST to DOT exporter class
writes an AST in GraphViz DOT format to a file
ProtoJavaReswords.java
interface for Java reserved word recogniser class
JavaReswords.cs
Java reserved word recogniser class
used by code generator to avoid name conflicts in output
ProtoDiagnostics.java
interface for the diagnostics class
Diagnostics.java
diagnostics class
defines enumerated diagnostic codes
provides methods to emit formatted warnings and error messages
used by lexer and parser classes during lexical and syntactical analysis
Result.java
generic result class
used by constructors to return paired results,
the first item is the value to return, the second item a status code
(to be continued)
END OF FILE