-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMatchLex.def
53 lines (29 loc) · 1.64 KB
/
MatchLex.def
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
(*!m2r10*) (* Copyright (c) 2015 B.Kowarsch. All rights reserved. *)
DEFINITION MODULE MatchLex;
(* Lexer Support Library for Modula-2 R10 Core Compiler *)
IMPORT Source;
(* Semantic Symbols *)
PROCEDURE Ident ( source : Source; VAR diag : Diagnostic );
(* Matches the input in source to an identifier and consumes it. *)
PROCEDURE IdentOrResword ( source : Source; VAR diag : Diagnostic );
(* Matches the input in source to an identifier or reserved word
and consumes it. *)
PROCEDURE NumericLiteral ( source : Source; VAR diag : Diagnostic );
(* Matches the input in source to a numeric literal and consumes it. *)
PROCEDURE QuotedLiteral ( source : Source; VAR diag : Diagnostic );
(* Matches the input in source to a quoted literal and consumes it. *)
(* Non-Semantic Symbols *)
PROCEDURE LineComment ( source : Source; VAR diag : Diagnostic );
(* Matches the input in source to an opening line comment delimiter and
consumes the line, including its closing NEWLINE control character. *)
PROCEDURE BlockComment ( source : Source; VAR diag : Diagnostic );
(* Matches the input in source to an opening block comment delimiter
and consumes the comment, including its closing delimiter. *)
PROCEDURE Pragma ( source : Source; VAR diag : Diagnostic );
(* Matches the input in source to an opening pragma delimiter
and consumes the pragma, including its closing delimiter. *)
(* Disabled Code Sections *)
PROCEDURE DisabledCodeBlock ( source : Source; VAR diag : Diagnostic );
(* Matches the input in source to an opening disabled code block delimiter
and consumes the disabled code block, including its closing delimiter. *)
END MatchLex.