-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathPGLexer.h.skl
60 lines (51 loc) · 1.62 KB
/
PGLexer.h.skl
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
#ifdef LRSTAR
#pragma once
@("char", "uchar", "short", "ushort", "int", "uint", "char*")
@//
/////////////////////////////////////////////////////////////////////////////////////////////////////
// //
// @grm_name;Lexer.h
/* Generated by: @program; @version;
Grammar: @grm_file;
Skeleton: @skl_file;
Output: @out_file;
*/
#define ushort unsigned short
#define uchar unsigned char
class @grm_name;Lexer
{
public:
static Token token;
static int tab;
static int line_numb;
static int col_numb;
static int line_pos;
static char* line_start;
static int line_start_numb;
@optn_small?;...
static @bmat_numb.8t; Bm[]; // Bit matrix (0 or 1).
static @bmat_row. 8t; Br[]; // Bit matrix row (base).
static @bmat_col. 8t; Bc[]; // Bit matrix column (displacement).
@@
static @tmat_numb.8t; Tm[]; // Terminal transition matrix (gives next state or reduction).
static @tmat_row. 8t; Tr[]; // Terminal transition matrix row (base).
static @tmat_col. 8t; Tc[]; // Terminal transition matrix column (displacement).
static @term_numb.8t; terminal[];// Terminal-symbol number for this node.
static int get_token ();
static int get_lookahead (int&);
static void init_lexer (char*);
static void prt_line ();
@def_cons?;...
static char* token_name[@def_cons.d;];
@@
@def_cons!;...
static char* token_name[1];
@@
@def_cons?;...
enum tokens
{
@def_cons.1|%s = %d,||\n |;
};
@@
};
#endif