-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathParser.def
More file actions
38 lines (21 loc) · 726 Bytes
/
Parser.def
File metadata and controls
38 lines (21 loc) · 726 Bytes
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
(*!m2r10*) (* Copyright (c) 2015 B.Kowarsch. All rights reserved. *)
DEFINITION MODULE Parser;
(* Parser for Modula-2 R10 Core Compiler *)
IMPORT Filename, AST;
(* Return Status *)
TYPE Status = ( Success, Failure );
(* Result Summary *)
TYPE Statistics = RECORD
lexicalWarnings,
lexicalErrors,
syntaxWarnings,
syntaxErrors : CARDINAL;
END;
(* Operations *)
PROCEDURE parseDef
( source : Filename; VAR stats : Statistics; VAR status : Status ) : AST;
(* Parses .def source file, returns AST on success, NIL on failure. *)
PROCEDURE parseMod
( source : Filename; VAR stats : Statistics; VAR status : Status ) : AST;
(* Parses .mod source file, returns AST on success, NIL on failure. *)
END Parser.