summaryrefslogtreecommitdiffstats
path: root/scilab/modules
diff options
context:
space:
mode:
authorClément DAVID <clement.david@esi-group.com>2020-12-14 15:26:15 +0100
committerCédric DELAMARRE <cedric.delamarre@esi-group.com>2021-04-26 13:39:33 +0200
commit857c11ca53d652b98ecdd09822897aae60552793 (patch)
tree3425b563580d3de2c05b02422a6f0585cfe5d1fc /scilab/modules
parent9b4b3227fd3dda4a2de3d9b39faf7c62a42328c7 (diff)
downloadscilab-857c11ca53d652b98ecdd09822897aae60552793.zip
scilab-857c11ca53d652b98ecdd09822897aae60552793.tar.gz
Update jflex to 1.8.2
This might be done on a minor release as: * the library has no runtime. * it is API/lang compatible Change-Id: I19c62d0b75046bd36922f23815d1343b547acf14
Diffstat (limited to 'scilab/modules')
-rw-r--r--scilab/modules/helptools/src/java/jflex/c.jflex4
-rw-r--r--scilab/modules/helptools/src/java/jflex/function.jflex3
-rw-r--r--scilab/modules/helptools/src/java/jflex/java.jflex5
-rw-r--r--scilab/modules/helptools/src/java/jflex/scilab.jflex2
-rw-r--r--scilab/modules/helptools/src/java/jflex/xml.jflex2
-rw-r--r--scilab/modules/helptools/src/java/org/scilab/modules/helptools/SynopsisLexer.java1272
-rw-r--r--scilab/modules/helptools/src/java/org/scilab/modules/helptools/XML/XMLLexer.java2181
-rw-r--r--scilab/modules/helptools/src/java/org/scilab/modules/helptools/c/CLexer.java8870
-rw-r--r--scilab/modules/helptools/src/java/org/scilab/modules/helptools/java/JavaLexer.java2244
-rw-r--r--scilab/modules/helptools/src/java/org/scilab/modules/helptools/scilab/ScilabLexer.java8642
-rw-r--r--scilab/modules/scinotes/src/java/jflex/function.jflex7
-rw-r--r--scilab/modules/scinotes/src/java/jflex/indentation.jflex1
-rw-r--r--scilab/modules/scinotes/src/java/jflex/matchingblock.jflex17
-rw-r--r--scilab/modules/scinotes/src/java/jflex/scilab.jflex39
-rw-r--r--scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/FunctionScanner.java1443
-rw-r--r--scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/IndentScanner.java1453
-rw-r--r--scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/MatchingBlockScanner.java1547
-rw-r--r--scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabLexer.java2530
18 files changed, 8752 insertions, 21510 deletions
diff --git a/scilab/modules/helptools/src/java/jflex/c.jflex b/scilab/modules/helptools/src/java/jflex/c.jflex
index 1a8ad00..e914051 100644
--- a/scilab/modules/helptools/src/java/jflex/c.jflex
+++ b/scilab/modules/helptools/src/java/jflex/c.jflex
@@ -7,7 +7,6 @@ import java.io.StringReader;
7import java.io.IOException; 7import java.io.IOException;
8 8
9@javax.annotation.Generated("JFlex") 9@javax.annotation.Generated("JFlex")
10@SuppressWarnings("fallthrough")
11%% 10%%
12 11
13%public 12%public
@@ -16,7 +15,6 @@ import java.io.IOException;
16%unicode 15%unicode
17%char 16%char
18%type void 17%type void
19%switch
20 18
21%{ 19%{
22 20
@@ -108,7 +106,7 @@ preprocessor = "#define" | "#elif" | "#else" | "#endif" | "#error" | "#if" | "#i
108 106
109openclose = [(){}\[\]] 107openclose = [(){}\[\]]
110 108
111operator = [=;,.><!~?:+-*/%&|\^] | ">>" | "<<" | "and" | "and_eq" | "bitand" | "bitor" | "compl" | "not" | "not_eq" | "operator" | "or" | "or_eq" | "typeid" | "xor" | "xor_eq" 109operator = [!%&*+,-./:;<=>?~|\^] | ">>" | "<<" | "and" | "and_eq" | "bitand" | "bitor" | "compl" | "not" | "not_eq" | "operator" | "or" | "or_eq" | "typeid" | "xor" | "xor_eq"
112 110
113%% 111%%
114 112
diff --git a/scilab/modules/helptools/src/java/jflex/function.jflex b/scilab/modules/helptools/src/java/jflex/function.jflex
index 2e0552a..7c5a536 100644
--- a/scilab/modules/helptools/src/java/jflex/function.jflex
+++ b/scilab/modules/helptools/src/java/jflex/function.jflex
@@ -6,7 +6,6 @@ import java.io.IOException;
6import java.io.StringReader; 6import java.io.StringReader;
7 7
8@javax.annotation.Generated("JFlex") 8@javax.annotation.Generated("JFlex")
9@SuppressWarnings("fallthrough")
10%% 9%%
11 10
12%public 11%public
@@ -16,8 +15,6 @@ import java.io.StringReader;
16%char 15%char
17%type void 16%type void
18 17
19%switch
20
21%{ 18%{
22 private static String currentName; 19 private static String currentName;
23 private static StringBuilder htmlBuffer = new StringBuilder(512); 20 private static StringBuilder htmlBuffer = new StringBuilder(512);
diff --git a/scilab/modules/helptools/src/java/jflex/java.jflex b/scilab/modules/helptools/src/java/jflex/java.jflex
index 4bb3231..8d36b7b 100644
--- a/scilab/modules/helptools/src/java/jflex/java.jflex
+++ b/scilab/modules/helptools/src/java/jflex/java.jflex
@@ -8,8 +8,7 @@ import java.io.IOException;
8 8
9import org.scilab.modules.helptools.c.AbstractCCodeHandler; 9import org.scilab.modules.helptools.c.AbstractCCodeHandler;
10 10
11@javax.annotation.Generated("JFlex") 11@javax.annotation.Generated("JFlex"))
12@SuppressWarnings("fallthrough")
13%% 12%%
14 13
15%public 14%public
@@ -108,7 +107,7 @@ modifier = "abstract" | "final" | "private" | "protected" | "public" | "static"
108 107
109openclose = [(){}\[\]] 108openclose = [(){}\[\]]
110 109
111operator = [=;,.><!~?:+-*/%&|\^] | ">>" | "<<" | ">>>" 110operator = [!%&*+,-./:;<=>?~|\^] | ">>" | "<<" | ">>>"
112 111
113%% 112%%
114 113
diff --git a/scilab/modules/helptools/src/java/jflex/scilab.jflex b/scilab/modules/helptools/src/java/jflex/scilab.jflex
index 70dbe59..6a4c5cd 100644
--- a/scilab/modules/helptools/src/java/jflex/scilab.jflex
+++ b/scilab/modules/helptools/src/java/jflex/scilab.jflex
@@ -16,7 +16,6 @@ import java.io.StringReader;
16import java.io.IOException; 16import java.io.IOException;
17 17
18@javax.annotation.Generated("JFlex") 18@javax.annotation.Generated("JFlex")
19@SuppressWarnings("fallthrough")
20%% 19%%
21 20
22%public 21%public
@@ -25,7 +24,6 @@ import java.io.IOException;
25%unicode 24%unicode
26%char 25%char
27%type void 26%type void
28%switch
29 27
30%{ 28%{
31 private static Set<String> commands; 29 private static Set<String> commands;
diff --git a/scilab/modules/helptools/src/java/jflex/xml.jflex b/scilab/modules/helptools/src/java/jflex/xml.jflex
index a76de8b..8527fab 100644
--- a/scilab/modules/helptools/src/java/jflex/xml.jflex
+++ b/scilab/modules/helptools/src/java/jflex/xml.jflex
@@ -7,7 +7,6 @@ import java.io.StringReader;
7import java.io.IOException; 7import java.io.IOException;
8 8
9@javax.annotation.Generated("JFlex") 9@javax.annotation.Generated("JFlex")
10@SuppressWarnings("fallthrough")
11%% 10%%
12 11
13%public 12%public
@@ -16,7 +15,6 @@ import java.io.IOException;
16%unicode 15%unicode
17%char 16%char
18%type void 17%type void
19%switch
20 18
21%{ 19%{
22 20
diff --git a/scilab/modules/helptools/src/java/org/scilab/modules/helptools/SynopsisLexer.java b/scilab/modules/helptools/src/java/org/scilab/modules/helptools/SynopsisLexer.java
index 0212e77..265f2fe 100644
--- a/scilab/modules/helptools/src/java/org/scilab/modules/helptools/SynopsisLexer.java
+++ b/scilab/modules/helptools/src/java/org/scilab/modules/helptools/SynopsisLexer.java
@@ -1,4 +1,6 @@
1/* The following code was generated by JFlex 1.4.3 on 23/05/12 15:21 */ 1// DO NOT EDIT
2// Generated by JFlex 1.8.2 http://jflex.de/
3// source: jflex/function.jflex
2 4
3//CHECKSTYLE:OFF 5//CHECKSTYLE:OFF
4 6
@@ -8,141 +10,284 @@ import java.io.IOException;
8import java.io.StringReader; 10import java.io.StringReader;
9 11
10@javax.annotation.Generated("JFlex") 12@javax.annotation.Generated("JFlex")
11@SuppressWarnings("fallthrough") 13
12 14// See https://github.com/jflex-de/jflex/issues/222
13/** 15@SuppressWarnings("FallThrough")
14 * This class is a scanner generated by
15 * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
16 * on 23/05/12 15:21 from the specification file
17 * <tt>./jflex/function.jflex</tt>
18 */
19public final class SynopsisLexer { 16public final class SynopsisLexer {
20 17
21 /** This character denotes the end of file */ 18 /** This character denotes the end of file. */
22 public static final int YYEOF = -1; 19 public static final int YYEOF = -1;
23 20
24 /** initial size of the lookahead buffer */ 21 /** Initial size of the lookahead buffer. */
25 private static final int ZZ_BUFFERSIZE = 16384; 22 private static final int ZZ_BUFFERSIZE = 16384;
26 23
27 /** lexical states */ 24 // Lexical states.
28 public static final int YYINITIAL = 0; 25 public static final int YYINITIAL = 0;
29 26
30 /** 27 /**
31 * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l 28 * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
32 * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l 29 * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
33 * at the beginning of a line 30 * at the beginning of a line
34 * l is of the form l = 2*k, k a non negative integer 31 * l is of the form l = 2*k, k a non negative integer
35 */ 32 */
36 private static final int ZZ_LEXSTATE[] = { 33 private static final int ZZ_LEXSTATE[] = {
37 0, 0 34 0, 0
38 }; 35 };
39 36
40 /** 37 /**
41 * Translates characters to character classes 38 * Top-level table for translating characters to character classes
42 */ 39 */
43 private static final String ZZ_CMAP_PACKED = 40 private static final int [] ZZ_CMAP_TOP = zzUnpackcmap_top();
44 "\11\0\1\1\1\3\2\0\1\2\22\0\1\1\1\6\1\12\1\6" + 41
45 "\1\7\1\4\1\11\1\13\7\0\1\10\12\5\2\0\1\14\1\0" + 42 private static final String ZZ_CMAP_TOP_PACKED_0 =
46 "\1\15\1\6\1\0\32\6\4\0\1\6\1\0\32\6\uff85\0"; 43 "\1\0\u10ff\u0100";
47 44
48 /** 45 private static int [] zzUnpackcmap_top() {
49 * Translates characters to character classes 46 int [] result = new int[4352];
50 */ 47 int offset = 0;
51 private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); 48 offset = zzUnpackcmap_top(ZZ_CMAP_TOP_PACKED_0, offset, result);
52 49 return result;
53 /** 50 }
54 * Translates DFA states to action switch labels. 51
55 */ 52 private static int zzUnpackcmap_top(String packed, int offset, int [] result) {
56 private static final int [] ZZ_ACTION = zzUnpackAction(); 53 int i = 0; /* index in packed string */
57 54 int j = offset; /* index in unpacked array */
58 private static final String ZZ_ACTION_PACKED_0 = 55 int l = packed.length();
59 "\1\0\1\1\1\2\2\3\1\4\2\1\1\5\1\6" + 56 while (i < l) {
60 "\1\7\1\10\1\11\1\4\1\12"; 57 int count = packed.charAt(i++);
61 58 int value = packed.charAt(i++);
62 private static int [] zzUnpackAction() { 59 do result[j++] = value; while (--count > 0);
63 int [] result = new int[15];
64 int offset = 0;
65 offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
66 return result;
67 } 60 }
68 61 return j;
69 private static int zzUnpackAction(String packed, int offset, int [] result) { 62 }
70 int i = 0; /* index in packed string */ 63
71 int j = offset; /* index in unpacked array */ 64
72 int l = packed.length(); 65 /**
73 while (i < l) { 66 * Second-level tables for translating characters to character classes
74 int count = packed.charAt(i++); 67 */
75 int value = packed.charAt(i++); 68 private static final int [] ZZ_CMAP_BLOCKS = zzUnpackcmap_blocks();
76 do { 69
77 result[j++] = value; 70 private static final String ZZ_CMAP_BLOCKS_PACKED_0 =
78 } while (--count > 0); 71 "\11\0\1\1\1\2\2\0\1\3\22\0\1\1\1\4"+
79 } 72 "\1\5\1\4\1\6\1\7\1\10\1\11\7\0\1\12"+
80 return j; 73 "\12\13\2\0\1\14\1\0\1\15\1\4\1\0\32\4"+
74 "\4\0\1\4\1\0\32\4\u0185\0";
75
76 private static int [] zzUnpackcmap_blocks() {
77 int [] result = new int[512];
78 int offset = 0;
79 offset = zzUnpackcmap_blocks(ZZ_CMAP_BLOCKS_PACKED_0, offset, result);
80 return result;
81 }
82
83 private static int zzUnpackcmap_blocks(String packed, int offset, int [] result) {
84 int i = 0; /* index in packed string */
85 int j = offset; /* index in unpacked array */
86 int l = packed.length();
87 while (i < l) {
88 int count = packed.charAt(i++);
89 int value = packed.charAt(i++);
90 do result[j++] = value; while (--count > 0);
81 } 91 }
92 return j;
93 }
94
95 /**
96 * Translates DFA states to action switch labels.
97 */
98 private static final int [] ZZ_ACTION = zzUnpackAction();
99
100 private static final String ZZ_ACTION_PACKED_0 =
101 "\1\0\1\1\1\2\2\3\1\4\1\5\1\1\1\6"+
102 "\1\7\1\1\1\10\1\11\1\4\1\12";
103
104 private static int [] zzUnpackAction() {
105 int [] result = new int[15];
106 int offset = 0;
107 offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
108 return result;
109 }
110
111 private static int zzUnpackAction(String packed, int offset, int [] result) {
112 int i = 0; /* index in packed string */
113 int j = offset; /* index in unpacked array */
114 int l = packed.length();
115 while (i < l) {
116 int count = packed.charAt(i++);
117 int value = packed.charAt(i++);
118 do result[j++] = value; while (--count > 0);
119 }
120 return j;
121 }
122
123
124 /**
125 * Translates a state to a row index in the transition table
126 */
127 private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
128
129 private static final String ZZ_ROWMAP_PACKED_0 =
130 "\0\0\0\16\0\34\0\52\0\70\0\106\0\124\0\142"+
131 "\0\124\0\124\0\160\0\124\0\124\0\142\0\176";
132
133 private static int [] zzUnpackRowMap() {
134 int [] result = new int[15];
135 int offset = 0;
136 offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
137 return result;
138 }
139
140 private static int zzUnpackRowMap(String packed, int offset, int [] result) {
141 int i = 0; /* index in packed string */
142 int j = offset; /* index in unpacked array */
143 int l = packed.length();
144 while (i < l) {
145 int high = packed.charAt(i++) << 16;
146 result[j++] = high | packed.charAt(i++);
147 }
148 return j;
149 }
150
151 /**
152 * The transition table of the DFA
153 */
154 private static final int [] ZZ_TRANS = zzUnpackTrans();
155
156 private static final String ZZ_TRANS_PACKED_0 =
157 "\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\6"+
158 "\1\11\1\12\1\13\1\2\1\14\1\15\2\2\4\0"+
159 "\1\2\4\0\1\2\2\0\1\2\1\3\4\0\1\2"+
160 "\4\0\1\2\3\0\1\4\15\0\2\4\17\0\1\6"+
161 "\1\0\1\6\4\0\1\6\20\0\2\2\2\0\1\6"+
162 "\1\0\1\16\4\0\1\16\14\0\1\17\3\0\2\17"+
163 "\2\0\12\17";
164
165 private static int [] zzUnpackTrans() {
166 int [] result = new int[140];
167 int offset = 0;
168 offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
169 return result;
170 }
171
172 private static int zzUnpackTrans(String packed, int offset, int [] result) {
173 int i = 0; /* index in packed string */
174 int j = offset; /* index in unpacked array */
175 int l = packed.length();
176 while (i < l) {
177 int count = packed.charAt(i++);
178 int value = packed.charAt(i++);
179 value--;
180 do result[j++] = value; while (--count > 0);
181 }
182 return j;
183 }
184
185
186 /** Error code for "Unknown internal scanner error". */
187 private static final int ZZ_UNKNOWN_ERROR = 0;
188 /** Error code for "could not match input". */
189 private static final int ZZ_NO_MATCH = 1;
190 /** Error code for "pushback value was too large". */
191 private static final int ZZ_PUSHBACK_2BIG = 2;
192
193 /**
194 * Error messages for {@link #ZZ_UNKNOWN_ERROR}, {@link #ZZ_NO_MATCH}, and
195 * {@link #ZZ_PUSHBACK_2BIG} respectively.
196 */
197 private static final String ZZ_ERROR_MSG[] = {
198 "Unknown internal scanner error",
199 "Error: could not match input",
200 "Error: pushback value was too large"
201 };
202
203 /**
204 * ZZ_ATTRIBUTE[aState] contains the attributes of state {@code aState}
205 */
206 private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
207
208 private static final String ZZ_ATTRIBUTE_PACKED_0 =
209 "\1\0\5\1\1\11\1\1\2\11\1\1\2\11\2\1";
210
211 private static int [] zzUnpackAttribute() {
212 int [] result = new int[15];
213 int offset = 0;
214 offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
215 return result;
216 }
217
218 private static int zzUnpackAttribute(String packed, int offset, int [] result) {
219 int i = 0; /* index in packed string */
220 int j = offset; /* index in unpacked array */
221 int l = packed.length();
222 while (i < l) {
223 int count = packed.charAt(i++);
224 int value = packed.charAt(i++);
225 do result[j++] = value; while (--count > 0);
226 }
227 return j;
228 }
82 229
230 /** Input device. */
231 private java.io.Reader zzReader;
83 232
84 /* error codes */ 233 /** Current state of the DFA. */
85 private static final int ZZ_UNKNOWN_ERROR = 0; 234 private int zzState;
86 private static final int ZZ_NO_MATCH = 1;
87 private static final int ZZ_PUSHBACK_2BIG = 2;
88
89 /* error messages for the codes above */
90 private static final String ZZ_ERROR_MSG[] = {
91 "Unkown internal scanner error",
92 "Error: could not match input",
93 "Error: pushback value was too large"
94 };
95
96 /** the input device */
97 private java.io.Reader zzReader;
98 235
99 /** the current state of the DFA */ 236 /** Current lexical state. */
100 private int zzState; 237 private int zzLexicalState = YYINITIAL;
101 238
102 /** the current lexical state */ 239 /**
103 private int zzLexicalState = YYINITIAL; 240 * This buffer contains the current text to be matched and is the source of the {@link #yytext()}
241 * string.
242 */
243 private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
104 244
105 /** this buffer contains the current text to be matched and is 245 /** Text position at the last accepting state. */
106 the source of the yytext() string */ 246 private int zzMarkedPos;
107 private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
108 247
109 /** the textposition at the last accepting state */ 248 /** Current text position in the buffer. */
110 private int zzMarkedPos; 249 private int zzCurrentPos;
111 250
112 /** the current text position in the buffer */ 251 /** Marks the beginning of the {@link #yytext()} string in the buffer. */
113 private int zzCurrentPos; 252 private int zzStartRead;
114 253
115 /** startRead marks the beginning of the yytext() string in the buffer */ 254 /** Marks the last character in the buffer, that has been read from input. */
116 private int zzStartRead; 255 private int zzEndRead;
117 256
118 /** endRead marks the last character in the buffer, that has been read 257 /**
119 from input */ 258 * Whether the scanner is at the end of file.
120 private int zzEndRead; 259 * @see #yyatEOF
260 */
261 private boolean zzAtEOF;
121 262
122 /** number of newlines encountered up to the start of the matched text */ 263 /**
123 private int yyline; 264 * The number of occupied positions in {@link #zzBuffer} beyond {@link #zzEndRead}.
265 *
266 * <p>When a lead/high surrogate has been read from the input stream into the final
267 * {@link #zzBuffer} position, this will have a value of 1; otherwise, it will have a value of 0.
268 */
269 private int zzFinalHighSurrogate = 0;
124 270
125 /** the number of characters up to the start of the matched text */ 271 /** Number of newlines encountered up to the start of the matched text. */
126 private int yychar; 272 @SuppressWarnings("unused")
273 private int yyline;
127 274
128 /** 275 /** Number of characters from the last newline up to the start of the matched text. */
129 * the number of characters from the last newline up to the start of the 276 @SuppressWarnings("unused")
130 * matched text 277 private int yycolumn;
131 */
132 private int yycolumn;
133 278
134 /** 279 /** Number of characters up to the start of the matched text. */
135 * zzAtBOL == true <=> the scanner is currently at the beginning of a line 280 private long yychar;
136 */
137 private boolean zzAtBOL = true;
138 281
139 /** zzAtEOF == true <=> the scanner is at the EOF */ 282 /** Whether the scanner is currently at the beginning of a line. */
140 private boolean zzAtEOF; 283 @SuppressWarnings("unused")
284 private boolean zzAtBOL = true;
141 285
142 /** denotes if the user-EOF-code has already been executed */ 286 /** Whether the user-EOF-code has already been executed. */
143 private boolean zzEOFDone; 287 @SuppressWarnings("unused")
288 private boolean zzEOFDone;
144 289
145 /* user code: */ 290 /* user code: */
146 private static String currentName; 291 private static String currentName;
147 private static StringBuilder htmlBuffer = new StringBuilder(512); 292 private static StringBuilder htmlBuffer = new StringBuilder(512);
148 private static SynopsisLexer lexer = new SynopsisLexer(); 293 private static SynopsisLexer lexer = new SynopsisLexer();
@@ -153,11 +298,11 @@ public final class SynopsisLexer {
153 currentName = name; 298 currentName = name;
154 try { 299 try {
155 lexer.yyreset(new StringReader(str.trim())); 300 lexer.yyreset(new StringReader(str.trim()));
156 lexer.yybegin(YYINITIAL); 301 lexer.yybegin(YYINITIAL);
157 htmlBuffer.setLength(0); 302 htmlBuffer.setLength(0);
158 lexer.yylex(); 303 lexer.yylex();
159 304
160 return htmlBuffer.toString(); 305 return htmlBuffer.toString();
161 } catch (IOException e) { 306 } catch (IOException e) {
162 return null; 307 return null;
163 } 308 }
@@ -165,562 +310,411 @@ public final class SynopsisLexer {
165 310
166 311
167 312
168 /** 313 /**
169 * Creates a new scanner 314 * Creates a new scanner
170 * There is also a java.io.InputStream version of this constructor. 315 *
171 * 316 * @param in the java.io.Reader to read input from.
172 * @param in the java.io.Reader to read input from. 317 */
173 */ 318 public SynopsisLexer(java.io.Reader in) {
174 public SynopsisLexer(java.io.Reader in) { 319 this.zzReader = in;
175 this.zzReader = in; 320 }
321
322 /**
323 * Translates raw input code points to DFA table row
324 */
325 private static int zzCMap(int input) {
326 int offset = input & 255;
327 return offset == input ? ZZ_CMAP_BLOCKS[offset] : ZZ_CMAP_BLOCKS[ZZ_CMAP_TOP[input >> 8] | offset];
328 }
329
330 /**
331 * Refills the input buffer.
332 *
333 * @return {@code false} iff there was new input.
334 * @exception java.io.IOException if any I/O-Error occurs
335 */
336 private boolean zzRefill() throws java.io.IOException {
337
338 /* first: make room (if you can) */
339 if (zzStartRead > 0) {
340 zzEndRead += zzFinalHighSurrogate;
341 zzFinalHighSurrogate = 0;
342 System.arraycopy(zzBuffer, zzStartRead,
343 zzBuffer, 0,
344 zzEndRead - zzStartRead);
345
346 /* translate stored positions */
347 zzEndRead -= zzStartRead;
348 zzCurrentPos -= zzStartRead;
349 zzMarkedPos -= zzStartRead;
350 zzStartRead = 0;
176 } 351 }
177 352
178 /** 353 /* is the buffer big enough? */
179 * Creates a new scanner. 354 if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) {
180 * There is also java.io.Reader version of this constructor. 355 /* if not: blow it up */
181 * 356 char newBuffer[] = new char[zzBuffer.length * 2];
182 * @param in the java.io.Inputstream to read input from. 357 System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
183 */ 358 zzBuffer = newBuffer;
184 public SynopsisLexer(java.io.InputStream in) { 359 zzEndRead += zzFinalHighSurrogate;
185 this(new java.io.InputStreamReader(in)); 360 zzFinalHighSurrogate = 0;
186 }
187
188 /**
189 * Unpacks the compressed character translation table.
190 *
191 * @param packed the packed character translation table
192 * @return the unpacked character translation table
193 */
194 private static char [] zzUnpackCMap(String packed) {
195 char [] map = new char[0x10000];
196 int i = 0; /* index in packed string */
197 int j = 0; /* index in unpacked array */
198 while (i < 58) {
199 int count = packed.charAt(i++);
200 char value = packed.charAt(i++);
201 do {
202 map[j++] = value;
203 } while (--count > 0);
204 }
205 return map;
206 } 361 }
207 362
363 /* fill the buffer with new input */
364 int requested = zzBuffer.length - zzEndRead;
365 int numRead = zzReader.read(zzBuffer, zzEndRead, requested);
208 366
209 /** 367 /* not supposed to occur according to specification of java.io.Reader */
210 * Refills the input buffer. 368 if (numRead == 0) {
211 * 369 throw new java.io.IOException(
212 * @return <code>false</code>, iff there was new input. 370 "Reader returned 0 characters. See JFlex examples/zero-reader for a workaround.");
213 *
214 * @exception java.io.IOException if any I/O-Error occurs
215 */
216 private boolean zzRefill() throws java.io.IOException {
217
218 /* first: make room (if you can) */
219 if (zzStartRead > 0) {
220 System.arraycopy(zzBuffer, zzStartRead,
221 zzBuffer, 0,
222 zzEndRead - zzStartRead);
223
224 /* translate stored positions */
225 zzEndRead -= zzStartRead;
226 zzCurrentPos -= zzStartRead;
227 zzMarkedPos -= zzStartRead;
228 zzStartRead = 0;
229 }
230
231 /* is the buffer big enough? */
232 if (zzCurrentPos >= zzBuffer.length) {
233 /* if not: blow it up */
234 char newBuffer[] = new char[zzCurrentPos * 2];
235 System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
236 zzBuffer = newBuffer;
237 }
238
239 /* finally: fill the buffer with new input */
240 int numRead = zzReader.read(zzBuffer, zzEndRead,
241 zzBuffer.length - zzEndRead);
242
243 if (numRead > 0) {
244 zzEndRead += numRead;
245 return false;
246 }
247 // unlikely but not impossible: read 0 characters, but not at end of stream
248 if (numRead == 0) {
249 int c = zzReader.read();
250 if (c == -1) {
251 return true;
252 } else {
253 zzBuffer[zzEndRead++] = (char) c;
254 return false;
255 }
256 }
257
258 // numRead < 0
259 return true;
260 } 371 }
261 372 if (numRead > 0) {
262 373 zzEndRead += numRead;
263 /** 374 if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
264 * Closes the input stream. 375 if (numRead == requested) { // We requested too few chars to encode a full Unicode character
265 */ 376 --zzEndRead;
266 public final void yyclose() throws java.io.IOException { 377 zzFinalHighSurrogate = 1;
267 zzAtEOF = true; /* indicate end of file */ 378 } else { // There is room in the buffer for at least one more char
268 zzEndRead = zzStartRead; /* invalidate buffer */ 379 int c = zzReader.read(); // Expecting to read a paired low surrogate char
269 380 if (c == -1) {
270 if (zzReader != null) { 381 return true;
271 zzReader.close(); 382 } else {
383 zzBuffer[zzEndRead++] = (char)c;
384 }
272 } 385 }
386 }
387 /* potentially more input available */
388 return false;
273 } 389 }
274 390
391 /* numRead < 0 ==> end of stream */
392 return true;
393 }
275 394
276 /**
277 * Resets the scanner to read from a new input stream.
278 * Does not close the old reader.
279 *
280 * All internal variables are reset, the old input stream
281 * <b>cannot</b> be reused (internal buffer is discarded and lost).
282 * Lexical state is set to <tt>ZZ_INITIAL</tt>.
283 *
284 * @param reader the new input stream
285 */
286 public final void yyreset(java.io.Reader reader) {
287 zzReader = reader;
288 zzAtBOL = true;
289 zzAtEOF = false;
290 zzEOFDone = false;
291 zzEndRead = zzStartRead = 0;
292 zzCurrentPos = zzMarkedPos = 0;
293 yyline = yychar = yycolumn = 0;
294 zzLexicalState = YYINITIAL;
295 }
296 395
396 /**
397 * Closes the input reader.
398 *
399 * @throws java.io.IOException if the reader could not be closed.
400 */
401 public final void yyclose() throws java.io.IOException {
402 zzAtEOF = true; // indicate end of file
403 zzEndRead = zzStartRead; // invalidate buffer
297 404
298 /** 405 if (zzReader != null) {
299 * Returns the current lexical state. 406 zzReader.close();
300 */
301 public final int yystate() {
302 return zzLexicalState;
303 } 407 }
304 408 }
305 409
306 /** 410
307 * Enters a new lexical state 411 /**
308 * 412 * Resets the scanner to read from a new input stream.
309 * @param newState the new lexical state 413 *
310 */ 414 * <p>Does not close the old reader.
311 public final void yybegin(int newState) { 415 *
312 zzLexicalState = newState; 416 * <p>All internal variables are reset, the old input stream <b>cannot</b> be reused (internal
417 * buffer is discarded and lost). Lexical state is set to {@code ZZ_INITIAL}.
418 *
419 * <p>Internal scan buffer is resized down to its initial length, if it has grown.
420 *
421 * @param reader The new input stream.
422 */
423 public final void yyreset(java.io.Reader reader) {
424 zzReader = reader;
425 zzEOFDone = false;
426 yyResetPosition();
427 zzLexicalState = YYINITIAL;
428 if (zzBuffer.length > ZZ_BUFFERSIZE) {
429 zzBuffer = new char[ZZ_BUFFERSIZE];
430 }
431 }
432
433 /**
434 * Resets the input position.
435 */
436 private final void yyResetPosition() {
437 zzAtBOL = true;
438 zzAtEOF = false;
439 zzCurrentPos = 0;
440 zzMarkedPos = 0;
441 zzStartRead = 0;
442 zzEndRead = 0;
443 zzFinalHighSurrogate = 0;
444 yyline = 0;
445 yycolumn = 0;
446 yychar = 0L;
447 }
448
449
450 /**
451 * Returns whether the scanner has reached the end of the reader it reads from.
452 *
453 * @return whether the scanner has reached EOF.
454 */
455 public final boolean yyatEOF() {
456 return zzAtEOF;
457 }
458
459
460 /**
461 * Returns the current lexical state.
462 *
463 * @return the current lexical state.
464 */
465 public final int yystate() {
466 return zzLexicalState;
467 }
468
469
470 /**
471 * Enters a new lexical state.
472 *
473 * @param newState the new lexical state
474 */
475 public final void yybegin(int newState) {
476 zzLexicalState = newState;
477 }
478
479
480 /**
481 * Returns the text matched by the current regular expression.
482 *
483 * @return the matched text.
484 */
485 public final String yytext() {
486 return new String(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);
487 }
488
489
490 /**
491 * Returns the character at the given position from the matched text.
492 *
493 * <p>It is equivalent to {@code yytext().charAt(pos)}, but faster.
494 *
495 * @param position the position of the character to fetch. A value from 0 to {@code yylength()-1}.
496 *
497 * @return the character at {@code position}.
498 */
499 public final char yycharat(int position) {
500 return zzBuffer[zzStartRead + position];
501 }
502
503
504 /**
505 * How many characters were matched.
506 *
507 * @return the length of the matched text region.
508 */
509 public final int yylength() {
510 return zzMarkedPos-zzStartRead;
511 }
512
513
514 /**
515 * Reports an error that occurred while scanning.
516 *
517 * <p>In a well-formed scanner (no or only correct usage of {@code yypushback(int)} and a
518 * match-all fallback rule) this method will only be called with things that
519 * "Can't Possibly Happen".
520 *
521 * <p>If this method is called, something is seriously wrong (e.g. a JFlex bug producing a faulty
522 * scanner etc.).
523 *
524 * <p>Usual syntax/scanner level error handling should be done in error fallback rules.
525 *
526 * @param errorCode the code of the error message to display.
527 */
528 private static void zzScanError(int errorCode) {
529 String message;
530 try {
531 message = ZZ_ERROR_MSG[errorCode];
532 } catch (ArrayIndexOutOfBoundsException e) {
533 message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
313 } 534 }
314 535
536 throw new Error(message);
537 }
315 538
316 /**
317 * Returns the text matched by the current regular expression.
318 */
319 public final String yytext() {
320 return new String( zzBuffer, zzStartRead, zzMarkedPos - zzStartRead );
321 }
322 539
540 /**
541 * Pushes the specified amount of characters back into the input stream.
542 *
543 * <p>They will be read again by then next call of the scanning method.
544 *
545 * @param number the number of characters to be read again. This number must not be greater than
546 * {@link #yylength()}.
547 */
548 public void yypushback(int number) {
549 if ( number > yylength() )
550 zzScanError(ZZ_PUSHBACK_2BIG);
323 551
324 /** 552 zzMarkedPos -= number;
325 * Returns the character at position <tt>pos</tt> from the 553 }
326 * matched text.
327 *
328 * It is equivalent to yytext().charAt(pos), but faster
329 *
330 * @param pos the position of the character to fetch.
331 * A value from 0 to yylength()-1.
332 *
333 * @return the character at position pos
334 */
335 public final char yycharat(int pos) {
336 return zzBuffer[zzStartRead + pos];
337 }
338 554
339 555
340 /**
341 * Returns the length of the matched text region.
342 */
343 public final int yylength() {
344 return zzMarkedPos - zzStartRead;
345 }
346 556
347 557
348 /** 558 /**
349 * Reports an error that occurred while scanning. 559 * Resumes scanning until the next regular expression is matched, the end of input is encountered
350 * 560 * or an I/O-Error occurs.
351 * In a wellformed scanner (no or only correct usage of 561 *
352 * yypushback(int) and a match-all fallback rule) this method 562 * @return the next token.
353 * will only be called with things that "Can't Possibly Happen". 563 * @exception java.io.IOException if any I/O-Error occurs.
354 * If this method is called, something is seriously wrong 564 */
355 * (e.g. a JFlex bug producing a faulty scanner etc.). 565 public void yylex() throws java.io.IOException {
356 * 566 int zzInput;
357 * Usual syntax/scanner level error handling should be done 567 int zzAction;
358 * in error fallback rules.
359 *
360 * @param errorCode the code of the errormessage to display
361 */
362 private void zzScanError(int errorCode) {
363 String message;
364 try {
365 message = ZZ_ERROR_MSG[errorCode];
366 } catch (ArrayIndexOutOfBoundsException e) {
367 message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
368 }
369 568
370 throw new Error(message); 569 // cached fields:
371 } 570 int zzCurrentPosL;
571 int zzMarkedPosL;
572 int zzEndReadL = zzEndRead;
573 char[] zzBufferL = zzBuffer;
372 574
575 int [] zzTransL = ZZ_TRANS;
576 int [] zzRowMapL = ZZ_ROWMAP;
577 int [] zzAttrL = ZZ_ATTRIBUTE;
373 578
374 /** 579 while (true) {
375 * Pushes the specified amount of characters back into the input stream. 580 zzMarkedPosL = zzMarkedPos;
376 *
377 * They will be read again by then next call of the scanning method
378 *
379 * @param number the number of characters to be read again.
380 * This number must not be greater than yylength()!
381 */
382 public void yypushback(int number) {
383 if ( number > yylength() ) {
384 zzScanError(ZZ_PUSHBACK_2BIG);
385 }
386 581
387 zzMarkedPos -= number; 582 yychar+= zzMarkedPosL-zzStartRead;
388 } 583
584 zzAction = -1;
389 585
586 zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
390 587
391 /** 588 zzState = ZZ_LEXSTATE[zzLexicalState];
392 * Resumes scanning until the next regular expression is matched,
393 * the end of input is encountered or an I/O-Error occurs.
394 *
395 * @return the next token
396 * @exception java.io.IOException if any I/O-Error occurs
397 */
398 public void yylex() throws java.io.IOException {
399 int zzInput;
400 int zzAction;
401 589
402 // cached fields: 590 // set up zzAction for empty match case:
403 int zzCurrentPosL; 591 int zzAttributes = zzAttrL[zzState];
404 int zzMarkedPosL; 592 if ( (zzAttributes & 1) == 1 ) {
405 int zzEndReadL = zzEndRead; 593 zzAction = zzState;
406 char [] zzBufferL = zzBuffer; 594 }
407 char [] zzCMapL = ZZ_CMAP;
408 595
409 596
597 zzForAction: {
410 while (true) { 598 while (true) {
411 zzMarkedPosL = zzMarkedPos; 599
412 600 if (zzCurrentPosL < zzEndReadL) {
413 yychar += zzMarkedPosL - zzStartRead; 601 zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
414 602 zzCurrentPosL += Character.charCount(zzInput);
415 zzAction = -1; 603 }
416 604 else if (zzAtEOF) {
417 zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; 605 zzInput = YYEOF;
418 606 break zzForAction;
419 zzState = ZZ_LEXSTATE[zzLexicalState]; 607 }
420 608 else {
421 609 // store back cached positions
422 zzForAction: { 610 zzCurrentPos = zzCurrentPosL;
423 while (true) { 611 zzMarkedPos = zzMarkedPosL;
424 612 boolean eof = zzRefill();
425 if (zzCurrentPosL < zzEndReadL) { 613 // get translated positions and possibly new buffer
426 zzInput = zzBufferL[zzCurrentPosL++]; 614 zzCurrentPosL = zzCurrentPos;
427 } else if (zzAtEOF) { 615 zzMarkedPosL = zzMarkedPos;
428 zzInput = YYEOF; 616 zzBufferL = zzBuffer;
429 break zzForAction; 617 zzEndReadL = zzEndRead;
430 } else { 618 if (eof) {
431 // store back cached positions 619 zzInput = YYEOF;
432 zzCurrentPos = zzCurrentPosL; 620 break zzForAction;
433 zzMarkedPos = zzMarkedPosL; 621 }
434 boolean eof = zzRefill(); 622 else {
435 // get translated positions and possibly new buffer 623 zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
436 zzCurrentPosL = zzCurrentPos; 624 zzCurrentPosL += Character.charCount(zzInput);
437 zzMarkedPosL = zzMarkedPos;
438 zzBufferL = zzBuffer;
439 zzEndReadL = zzEndRead;
440 if (eof) {
441 zzInput = YYEOF;
442 break zzForAction;
443 } else {
444 zzInput = zzBufferL[zzCurrentPosL++];
445 }
446 }
447 zzInput = zzCMapL[zzInput];
448
449 boolean zzIsFinal = false;
450 boolean zzNoLookAhead = false;
451
452 zzForNext: {
453 switch (zzState) {
454 case 0:
455 switch (zzInput) {
456 case 1:
457 zzIsFinal = true;
458 zzState = 2;
459 break zzForNext;
460 case 2:
461 zzIsFinal = true;
462 zzState = 3;
463 break zzForNext;
464 case 3:
465 zzIsFinal = true;
466 zzState = 4;
467 break zzForNext;
468 case 4:
469 case 6:
470 zzIsFinal = true;
471 zzState = 5;
472 break zzForNext;
473 case 7:
474 zzIsFinal = true;
475 zzState = 6;
476 break zzForNext;
477 case 8:
478 zzIsFinal = true;
479 zzState = 7;
480 break zzForNext;
481 case 9:
482 zzIsFinal = true;
483 zzNoLookAhead = true;
484 zzState = 8;
485 break zzForNext;
486 case 10:
487 zzIsFinal = true;
488 zzNoLookAhead = true;
489 zzState = 9;
490 break zzForNext;
491 case 11:
492 zzIsFinal = true;
493 zzNoLookAhead = true;
494 zzState = 10;
495 break zzForNext;
496 case 12:
497 zzIsFinal = true;
498 zzNoLookAhead = true;
499 zzState = 11;
500 break zzForNext;
501 case 13:
502 zzIsFinal = true;
503 zzNoLookAhead = true;
504 zzState = 12;
505 break zzForNext;
506 default:
507 zzIsFinal = true;
508 zzState = 1;
509 break zzForNext;
510 }
511
512 case 1:
513 switch (zzInput) {
514 case 0:
515 case 1:
516 case 5:
517 case 7:
518 zzIsFinal = true;
519 break zzForNext;
520 default:
521 break zzForAction;
522 }
523
524 case 2:
525 switch (zzInput) {
526 case 0:
527 case 5:
528 case 7:
529 zzIsFinal = true;
530 zzState = 1;
531 break zzForNext;
532 case 1:
533 zzIsFinal = true;
534 break zzForNext;
535 default:
536 break zzForAction;
537 }
538
539 case 3:
540 switch (zzInput) {
541 case 1:
542 case 3:
543 zzIsFinal = true;
544 zzState = 4;
545 break zzForNext;
546 default:
547 break zzForAction;
548 }
549
550 case 4:
551 switch (zzInput) {
552 case 1:
553 zzIsFinal = true;
554 break zzForNext;
555 default:
556 break zzForAction;
557 }
558
559 case 5:
560 switch (zzInput) {
561 case 5:
562 case 6:
563 case 7:
564 zzIsFinal = true;
565 break zzForNext;
566 default:
567 break zzForAction;
568 }
569
570 case 6:
571 switch (zzInput) {
572 case 0:
573 case 1:
574 zzIsFinal = true;
575 zzState = 1;
576 break zzForNext;
577 case 6:
578 zzIsFinal = true;
579 zzState = 5;
580 break zzForNext;
581 case 5:
582 case 7:
583 zzIsFinal = true;
584 zzState = 13;
585 break zzForNext;
586 default:
587 break zzForAction;
588 }
589
590 case 7:
591 switch (zzInput) {
592 case 8:
593 zzIsFinal = true;
594 zzState = 14;
595 break zzForNext;
596 default:
597 break zzForAction;
598 }
599
600 case 13:
601 switch (zzInput) {
602 case 0:
603 case 1:
604 zzIsFinal = true;
605 zzState = 1;
606 break zzForNext;
607 case 6:
608 zzIsFinal = true;
609 zzState = 5;
610 break zzForNext;
611 case 5:
612 case 7:
613 zzIsFinal = true;
614 break zzForNext;
615 default:
616 break zzForAction;
617 }
618
619 case 14:
620 switch (zzInput) {
621 case 2:
622 case 3:
623 break zzForAction;
624 default:
625 zzIsFinal = true;
626 break zzForNext;
627 }
628
629 default:
630 // if this is ever reached, there is a serious bug in JFlex
631 zzScanError(ZZ_UNKNOWN_ERROR);
632 break;
633 }
634 }
635
636 if ( zzIsFinal ) {
637 zzAction = zzState;
638 zzMarkedPosL = zzCurrentPosL;
639 if ( zzNoLookAhead ) {
640 break zzForAction;
641 }
642 }
643
644 }
645 } 625 }
626 }
627 int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMap(zzInput) ];
628 if (zzNext == -1) break zzForAction;
629 zzState = zzNext;
630
631 zzAttributes = zzAttrL[zzState];
632 if ( (zzAttributes & 1) == 1 ) {
633 zzAction = zzState;
634 zzMarkedPosL = zzCurrentPosL;
635 if ( (zzAttributes & 8) == 8 ) break zzForAction;
636 }
646 637
647 // store back cached position 638 }
648 zzMarkedPos = zzMarkedPosL; 639 }
649 640
650 switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { 641 // store back cached position
651 case 10 : { 642 zzMarkedPos = zzMarkedPosL;
652 htmlBuffer.append("<span class=\"comment\">"); 643
653 htmlBuffer.append(yytext()); 644 if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
654 htmlBuffer.append("</span>"); 645 zzAtEOF = true;
655 } 646 { return;
656 case 11: 647 }
657 break; 648 }
658 case 9: { 649 else {
659 htmlBuffer.append("&gt;"); 650 switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
660 } 651 case 1:
661 case 12: 652 { htmlBuffer.append("<span class=\"default\">");
662 break; 653 htmlBuffer.append(yytext());
663 case 2: { 654 htmlBuffer.append("</span>");
664 htmlBuffer.append(" "); 655 }
665 } 656 // fall through
666 case 13: 657 case 11: break;
667 break; 658 case 2:
668 case 3: { 659 { htmlBuffer.append(" ");
669 htmlBuffer.append("\n"); 660 }
670 } 661 // fall through
671 case 14: 662 case 12: break;
672 break; 663 case 3:
673 case 6: { 664 { htmlBuffer.append("\n");
674 htmlBuffer.append("&#0034;"); 665 }
675 } 666 // fall through
676 case 15: 667 case 13: break;
677 break; 668 case 4:
678 case 5: { 669 { String str = yytext();
679 htmlBuffer.append("&amp;"); 670 if (str.equals(currentName)) {
680 } 671 htmlBuffer.append("<span class=\"functionid\">");
681 case 16: 672 } else {
682 break; 673 htmlBuffer.append("<span class=\"default\">");
683 case 4: { 674 }
684 String str = yytext(); 675 htmlBuffer.append(str);
685 if (str.equals(currentName)) { 676 htmlBuffer.append("</span>");
686 htmlBuffer.append("<span class=\"functionid\">"); 677 }
687 } else { 678 // fall through
688 htmlBuffer.append("<span class=\"default\">"); 679 case 14: break;
689 } 680 case 5:
690 htmlBuffer.append(str); 681 { htmlBuffer.append("&#0034;");
691 htmlBuffer.append("</span>"); 682 }
692 } 683 // fall through
693 case 17: 684 case 15: break;
694 break; 685 case 6:
695 case 8: { 686 { htmlBuffer.append("&amp;");
696 htmlBuffer.append("&lt;"); 687 }
697 } 688 // fall through
698 case 18: 689 case 16: break;
699 break; 690 case 7:
700 case 1: { 691 { htmlBuffer.append("&#0039;");
701 htmlBuffer.append("<span class=\"default\">"); 692 }
702 htmlBuffer.append(yytext()); 693 // fall through
703 htmlBuffer.append("</span>"); 694 case 17: break;
704 } 695 case 8:
705 case 19: 696 { htmlBuffer.append("&lt;");
706 break; 697 }
707 case 7: { 698 // fall through
708 htmlBuffer.append("&#0039;"); 699 case 18: break;
709 } 700 case 9:
710 case 20: 701 { htmlBuffer.append("&gt;");
711 break; 702 }
712 default: 703 // fall through
713 if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { 704 case 19: break;
714 zzAtEOF = true; 705 case 10:
715 { 706 { htmlBuffer.append("<span class=\"comment\">");
716 return; 707 htmlBuffer.append(yytext());
717 } 708 htmlBuffer.append("</span>");
718 } else {
719 zzScanError(ZZ_NO_MATCH);
720 }
721 } 709 }
710 // fall through
711 case 20: break;
712 default:
713 zzScanError(ZZ_NO_MATCH);
722 } 714 }
715 }
723 } 716 }
717 }
724 718
725 719
726} 720}
diff --git a/scilab/modules/helptools/src/java/org/scilab/modules/helptools/XML/XMLLexer.java b/scilab/modules/helptools/src/java/org/scilab/modules/helptools/XML/XMLLexer.java
index 4880e71..4f4eaa0 100644
--- a/scilab/modules/helptools/src/java/org/scilab/modules/helptools/XML/XMLLexer.java
+++ b/scilab/modules/helptools/src/java/org/scilab/modules/helptools/XML/XMLLexer.java
@@ -1,4 +1,6 @@
1/* The following code was generated by JFlex 1.4.3 on 23/05/12 15:21 */ 1// DO NOT EDIT
2// Generated by JFlex 1.8.2 http://jflex.de/
3// source: jflex/xml.jflex
2 4
3//CHECKSTYLE:OFF 5//CHECKSTYLE:OFF
4 6
@@ -9,155 +11,335 @@ import java.io.StringReader;
9import java.io.IOException; 11import java.io.IOException;
10 12
11@javax.annotation.Generated("JFlex") 13@javax.annotation.Generated("JFlex")
12@SuppressWarnings("fallthrough") 14
13 15// See https://github.com/jflex-de/jflex/issues/222
14/** 16@SuppressWarnings("FallThrough")
15 * This class is a scanner generated by
16 * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
17 * on 23/05/12 15:21 from the specification file
18 * <tt>./jflex/xml.jflex</tt>
19 */
20public final class XMLLexer { 17public final class XMLLexer {
21 18
22 /** This character denotes the end of file */ 19 /** This character denotes the end of file. */
23 public static final int YYEOF = -1; 20 public static final int YYEOF = -1;
24 21
25 /** initial size of the lookahead buffer */ 22 /** Initial size of the lookahead buffer. */
26 private static final int ZZ_BUFFERSIZE = 16384; 23 private static final int ZZ_BUFFERSIZE = 16384;
27 24
28 /** lexical states */ 25 // Lexical states.
29 public static final int CLEANFIRST = 12; 26 public static final int YYINITIAL = 0;
30 public static final int CLEAN = 10; 27 public static final int COMMENT = 2;
31 public static final int YYINITIAL = 0; 28 public static final int CDATA = 4;
32 public static final int COMMENT = 2; 29 public static final int TAG = 6;
33 public static final int CDATA = 4; 30 public static final int PI = 8;
34 public static final int TAG = 6; 31 public static final int CLEAN = 10;
35 public static final int PI = 8; 32 public static final int CLEANFIRST = 12;
36 33
37 /** 34 /**
38 * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l 35 * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
39 * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l 36 * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
40 * at the beginning of a line 37 * at the beginning of a line
41 * l is of the form l = 2*k, k a non negative integer 38 * l is of the form l = 2*k, k a non negative integer
42 */ 39 */
43 private static final int ZZ_LEXSTATE[] = { 40 private static final int ZZ_LEXSTATE[] = {
44 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6 41 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6
45 }; 42 };
46 43
47 /** 44 /**
48 * Translates characters to character classes 45 * Top-level table for translating characters to character classes
49 */ 46 */
50 private static final String ZZ_CMAP_PACKED = 47 private static final int [] ZZ_CMAP_TOP = zzUnpackcmap_top();
51 "\11\0\1\1\1\15\2\0\1\15\22\0\1\1\1\13\1\27\1\3" + 48
52 "\2\0\1\2\1\30\5\0\1\7\1\10\1\25\12\11\1\5\1\4" + 49 private static final String ZZ_CMAP_TOP_PACKED_0 =
53 "\1\12\1\26\1\14\1\24\1\0\1\21\1\6\1\17\1\20\1\6" + 50 "\1\0\2\u0100\1\u0200\34\u0300\1\u0400\1\u0500\12\u0600\3\u0700"+
54 "\16\6\1\22\6\6\1\16\1\10\1\23\1\10\1\5\1\10\32\6" + 51 "\1\u0800\1\u0900\247\u0a00\10\u0b00\31\u0600\4\u0c00\1\u0d00\1\u0e00"+
55 "\74\10\1\10\10\10\27\5\1\10\37\5\1\10\u0208\5\160\10\16\5" + 52 "\1\u0f00\u1000\u0600";
56 "\1\10\u1c81\5\14\10\2\5\63\10\57\0\u0120\5\u0a70\0\u03f0\5\21\0" + 53
57 "\ua7ff\5\u2100\0\u04d0\5\40\0\u020e\5\2\0"; 54 private static int [] zzUnpackcmap_top() {
58 55 int [] result = new int[4352];
59 /** 56 int offset = 0;
60 * Translates characters to character classes 57 offset = zzUnpackcmap_top(ZZ_CMAP_TOP_PACKED_0, offset, result);
61 */ 58 return result;
62 private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); 59 }
63 60
64 /** 61 private static int zzUnpackcmap_top(String packed, int offset, int [] result) {
65 * Translates DFA states to action switch labels. 62 int i = 0; /* index in packed string */
66 */ 63 int j = offset; /* index in unpacked array */
67 private static final int [] ZZ_ACTION = zzUnpackAction(); 64 int l = packed.length();
68 65 while (i < l) {
69 private static final String ZZ_ACTION_PACKED_0 = 66 int count = packed.charAt(i++);
70 "\1\1\1\2\1\3\4\0\2\1\1\0\1\4\1\2" + 67 int value = packed.charAt(i++);
71 "\1\0\1\5\1\3\1\6\1\0\1\7\1\10\1\7" + 68 do result[j++] = value; while (--count > 0);
72 "\1\11\1\12\3\7\1\13\1\7\1\14\1\15\1\16" +
73 "\1\17\1\20\1\7\1\21\1\22\10\0\1\23\1\24" +
74 "\1\0\1\25\1\0\1\26\2\0\1\27\2\0\1\30" +
75 "\1\0\1\31\1\32\2\0\1\33\4\0\1\34";
76
77 private static int [] zzUnpackAction() {
78 int [] result = new int[66];
79 int offset = 0;
80 offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
81 return result;
82 } 69 }
83 70 return j;
84 private static int zzUnpackAction(String packed, int offset, int [] result) { 71 }
85 int i = 0; /* index in packed string */ 72
86 int j = offset; /* index in unpacked array */ 73
87 int l = packed.length(); 74 /**
88 while (i < l) { 75 * Second-level tables for translating characters to character classes
89 int count = packed.charAt(i++); 76 */
90 int value = packed.charAt(i++); 77 private static final int [] ZZ_CMAP_BLOCKS = zzUnpackcmap_blocks();
91 do { 78
92 result[j++] = value; 79 private static final String ZZ_CMAP_BLOCKS_PACKED_0 =
93 } while (--count > 0); 80 "\11\0\1\1\1\2\2\3\1\2\22\0\1\1\1\4"+
94 } 81 "\1\5\1\6\2\0\1\7\1\10\5\0\1\11\1\12"+
95 return j; 82 "\1\13\12\14\1\15\1\16\1\17\1\20\1\21\1\22"+
83 "\1\0\1\23\1\24\1\25\1\26\17\24\1\27\6\24"+
84 "\1\30\1\12\1\31\1\12\1\15\1\12\32\24\12\12"+
85 "\1\32\72\12\27\15\1\12\37\15\1\12\u0108\15\160\12"+
86 "\16\15\1\12\u0181\15\14\12\2\15\32\12\2\32\27\12"+
87 "\57\0\u0120\15\u0170\0\u01f0\15\21\0\u01ff\15\u0100\3\u01d0\15"+
88 "\40\0\u020e\15\2\0";
89
90 private static int [] zzUnpackcmap_blocks() {
91 int [] result = new int[4096];
92 int offset = 0;
93 offset = zzUnpackcmap_blocks(ZZ_CMAP_BLOCKS_PACKED_0, offset, result);
94 return result;
95 }
96
97 private static int zzUnpackcmap_blocks(String packed, int offset, int [] result) {
98 int i = 0; /* index in packed string */
99 int j = offset; /* index in unpacked array */
100 int l = packed.length();
101 while (i < l) {
102 int count = packed.charAt(i++);
103 int value = packed.charAt(i++);
104 do result[j++] = value; while (--count > 0);
96 } 105 }
106 return j;
107 }
108
109 /**
110 * Translates DFA states to action switch labels.
111 */
112 private static final int [] ZZ_ACTION = zzUnpackAction();
113
114 private static final String ZZ_ACTION_PACKED_0 =
115 "\1\1\1\2\1\3\4\0\1\1\1\4\1\1\1\0"+
116 "\1\2\1\5\1\0\1\3\1\6\1\0\1\7\1\10"+
117 "\1\11\4\7\1\12\1\13\1\7\1\14\1\15\1\16"+
118 "\1\17\1\20\1\7\1\21\2\0\1\22\6\0\1\23"+
119 "\1\0\1\24\1\0\1\25\1\26\3\0\1\27\1\0"+
120 "\1\30\1\0\1\31\1\32\2\0\1\33\4\0\1\34";
121
122 private static int [] zzUnpackAction() {
123 int [] result = new int[66];
124 int offset = 0;
125 offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
126 return result;
127 }
128
129 private static int zzUnpackAction(String packed, int offset, int [] result) {
130 int i = 0; /* index in packed string */
131 int j = offset; /* index in unpacked array */
132 int l = packed.length();
133 while (i < l) {
134 int count = packed.charAt(i++);
135 int value = packed.charAt(i++);
136 do result[j++] = value; while (--count > 0);
137 }
138 return j;
139 }
140
141
142 /**
143 * Translates a state to a row index in the transition table
144 */
145 private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
146
147 private static final String ZZ_ROWMAP_PACKED_0 =
148 "\0\0\0\33\0\66\0\121\0\154\0\207\0\242\0\275"+
149 "\0\330\0\363\0\u010e\0\u0129\0\u0144\0\u015f\0\u017a\0\u0195"+
150 "\0\u01b0\0\u01cb\0\u01e6\0\u0201\0\u021c\0\u0237\0\u0252\0\u026d"+
151 "\0\u01cb\0\u0288\0\u02a3\0\u01cb\0\u02be\0\u02d9\0\u01cb\0\u02f4"+
152 "\0\u030f\0\275\0\u032a\0\u0345\0\u0360\0\u037b\0\u0396\0\u03b1"+
153 "\0\u03cc\0\u03e7\0\u021c\0\u01cb\0\u0237\0\u01cb\0\u026d\0\u01cb"+
154 "\0\u01cb\0\u0402\0\u041d\0\u0438\0\u0453\0\u046e\0\u01cb\0\u0489"+
155 "\0\u01cb\0\u01cb\0\u04a4\0\u04bf\0\u01cb\0\u04da\0\u04f5\0\u0510"+
156 "\0\u052b\0\u01cb";
157
158 private static int [] zzUnpackRowMap() {
159 int [] result = new int[66];
160 int offset = 0;
161 offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
162 return result;
163 }
164
165 private static int zzUnpackRowMap(String packed, int offset, int [] result) {
166 int i = 0; /* index in packed string */
167 int j = offset; /* index in unpacked array */
168 int l = packed.length();
169 while (i < l) {
170 int high = packed.charAt(i++) << 16;
171 result[j++] = high | packed.charAt(i++);
172 }
173 return j;
174 }
175
176 /**
177 * The transition table of the DFA
178 */
179 private static final int [] ZZ_TRANS = zzUnpackTrans();
180
181 private static final String ZZ_TRANS_PACKED_0 =
182 "\2\10\1\11\4\10\1\12\7\10\1\13\13\10\2\14"+
183 "\1\15\6\14\1\16\21\14\2\17\1\20\26\17\1\21"+
184 "\1\17\1\22\1\23\1\24\1\0\1\22\1\25\2\22"+
185 "\1\26\2\22\1\27\1\22\1\30\3\22\1\31\1\22"+
186 "\5\30\2\22\1\0\1\22\1\23\1\32\1\0\1\22"+
187 "\1\25\2\22\1\26\4\22\1\30\4\22\1\33\5\30"+
188 "\2\22\1\0\1\34\1\35\1\36\1\0\26\34\1\0"+
189 "\1\37\1\40\1\41\1\0\26\37\1\0\2\10\1\0"+
190 "\14\10\1\0\13\10\2\0\1\11\30\0\2\10\1\0"+
191 "\3\10\1\12\5\10\1\12\1\10\1\42\1\0\3\10"+
192 "\5\12\3\10\4\0\1\43\6\0\1\44\1\0\1\45"+
193 "\4\0\1\46\5\45\3\0\2\14\1\0\6\14\1\47"+
194 "\21\14\2\0\1\15\30\0\2\14\1\0\6\14\1\50"+
195 "\21\14\2\17\1\0\26\17\1\51\1\17\2\0\1\20"+
196 "\30\0\2\17\1\0\26\17\1\52\1\17\34\0\1\23"+
197 "\33\0\1\24\30\0\2\53\1\0\2\53\1\54\25\53"+
198 "\2\55\1\0\5\55\1\54\22\55\21\0\1\56\22\0"+
199 "\2\57\1\0\2\57\2\0\1\60\2\0\10\57\2\0"+
200 "\1\32\51\0\1\61\12\0\1\35\33\0\1\36\31\0"+
201 "\1\40\1\41\32\0\1\41\41\0\1\62\16\0\1\63"+
202 "\17\0\1\64\5\0\5\64\14\0\2\45\1\0\2\45"+
203 "\5\0\10\45\15\0\1\65\5\0\5\65\3\0\2\14"+
204 "\1\0\6\14\1\66\23\14\1\0\16\14\1\67\11\14"+
205 "\2\17\1\0\26\17\1\70\3\17\1\0\16\17\1\71"+
206 "\11\17\11\0\1\72\46\0\1\73\6\0\1\74\7\0"+
207 "\2\64\1\0\2\64\3\0\1\75\1\0\10\64\11\0"+
208 "\2\65\1\0\2\65\5\0\10\65\2\14\1\0\16\14"+
209 "\1\0\11\14\2\17\1\0\16\17\1\0\11\17\26\0"+
210 "\1\76\5\0\1\74\17\0\1\75\34\0\1\77\36\0"+
211 "\1\100\26\0\1\101\37\0\1\102\2\0";
212
213 private static int [] zzUnpackTrans() {
214 int [] result = new int[1350];
215 int offset = 0;
216 offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
217 return result;
218 }
219
220 private static int zzUnpackTrans(String packed, int offset, int [] result) {
221 int i = 0; /* index in packed string */
222 int j = offset; /* index in unpacked array */
223 int l = packed.length();
224 while (i < l) {
225 int count = packed.charAt(i++);
226 int value = packed.charAt(i++);
227 value--;
228 do result[j++] = value; while (--count > 0);
229 }
230 return j;
231 }
232
233
234 /** Error code for "Unknown internal scanner error". */
235 private static final int ZZ_UNKNOWN_ERROR = 0;
236 /** Error code for "could not match input". */
237 private static final int ZZ_NO_MATCH = 1;
238 /** Error code for "pushback value was too large". */
239 private static final int ZZ_PUSHBACK_2BIG = 2;
240
241 /**
242 * Error messages for {@link #ZZ_UNKNOWN_ERROR}, {@link #ZZ_NO_MATCH}, and
243 * {@link #ZZ_PUSHBACK_2BIG} respectively.
244 */
245 private static final String ZZ_ERROR_MSG[] = {
246 "Unknown internal scanner error",
247 "Error: could not match input",
248 "Error: pushback value was too large"
249 };
250
251 /**
252 * ZZ_ATTRIBUTE[aState] contains the attributes of state {@code aState}
253 */
254 private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
255
256 private static final String ZZ_ATTRIBUTE_PACKED_0 =
257 "\3\1\4\0\3\1\1\0\2\1\1\0\2\1\1\0"+
258 "\1\11\6\1\1\11\2\1\1\11\2\1\1\11\3\1"+
259 "\2\0\1\1\6\0\1\11\1\0\1\11\1\0\2\11"+
260 "\3\0\1\1\1\0\1\11\1\0\2\11\2\0\1\11"+
261 "\4\0\1\11";
262
263 private static int [] zzUnpackAttribute() {
264 int [] result = new int[66];
265 int offset = 0;
266 offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
267 return result;
268 }
269
270 private static int zzUnpackAttribute(String packed, int offset, int [] result) {
271 int i = 0; /* index in packed string */
272 int j = offset; /* index in unpacked array */
273 int l = packed.length();
274 while (i < l) {
275 int count = packed.charAt(i++);
276 int value = packed.charAt(i++);
277 do result[j++] = value; while (--count > 0);
278 }
279 return j;
280 }
97 281
282 /** Input device. */
283 private java.io.Reader zzReader;
98 284
99 /* error codes */ 285 /** Current state of the DFA. */
100 private static final int ZZ_UNKNOWN_ERROR = 0; 286 private int zzState;
101 private static final int ZZ_NO_MATCH = 1;
102 private static final int ZZ_PUSHBACK_2BIG = 2;
103
104 /* error messages for the codes above */
105 private static final String ZZ_ERROR_MSG[] = {
106 "Unkown internal scanner error",
107 "Error: could not match input",
108 "Error: pushback value was too large"
109 };
110
111 /** the input device */
112 private java.io.Reader zzReader;
113 287
114 /** the current state of the DFA */ 288 /** Current lexical state. */
115 private int zzState; 289 private int zzLexicalState = YYINITIAL;
116 290
117 /** the current lexical state */ 291 /**
118 private int zzLexicalState = YYINITIAL; 292 * This buffer contains the current text to be matched and is the source of the {@link #yytext()}
293 * string.
294 */
295 private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
119 296
120 /** this buffer contains the current text to be matched and is 297 /** Text position at the last accepting state. */
121 the source of the yytext() string */ 298 private int zzMarkedPos;
122 private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
123 299
124 /** the textposition at the last accepting state */ 300 /** Current text position in the buffer. */
125 private int zzMarkedPos; 301 private int zzCurrentPos;
126 302
127 /** the current text position in the buffer */ 303 /** Marks the beginning of the {@link #yytext()} string in the buffer. */
128 private int zzCurrentPos; 304 private int zzStartRead;
129 305
130 /** startRead marks the beginning of the yytext() string in the buffer */ 306 /** Marks the last character in the buffer, that has been read from input. */
131 private int zzStartRead; 307 private int zzEndRead;
132 308
133 /** endRead marks the last character in the buffer, that has been read 309 /**
134 from input */ 310 * Whether the scanner is at the end of file.
135 private int zzEndRead; 311 * @see #yyatEOF
312 */
313 private boolean zzAtEOF;
136 314
137 /** number of newlines encountered up to the start of the matched text */ 315 /**
138 private int yyline; 316 * The number of occupied positions in {@link #zzBuffer} beyond {@link #zzEndRead}.
317 *
318 * <p>When a lead/high surrogate has been read from the input stream into the final
319 * {@link #zzBuffer} position, this will have a value of 1; otherwise, it will have a value of 0.
320 */
321 private int zzFinalHighSurrogate = 0;
139 322
140 /** the number of characters up to the start of the matched text */ 323 /** Number of newlines encountered up to the start of the matched text. */
141 private int yychar; 324 @SuppressWarnings("unused")
325 private int yyline;
142 326
143 /** 327 /** Number of characters from the last newline up to the start of the matched text. */
144 * the number of characters from the last newline up to the start of the 328 @SuppressWarnings("unused")
145 * matched text 329 private int yycolumn;
146 */
147 private int yycolumn;
148 330
149 /** 331 /** Number of characters up to the start of the matched text. */
150 * zzAtBOL == true <=> the scanner is currently at the beginning of a line 332 private long yychar;
151 */
152 private boolean zzAtBOL = true;
153 333
154 /** zzAtEOF == true <=> the scanner is at the EOF */ 334 /** Whether the scanner is currently at the beginning of a line. */
155 private boolean zzAtEOF; 335 @SuppressWarnings("unused")
336 private boolean zzAtBOL = true;
156 337
157 /** denotes if the user-EOF-code has already been executed */ 338 /** Whether the user-EOF-code has already been executed. */
158 private boolean zzEOFDone; 339 @SuppressWarnings("unused")
340 private boolean zzEOFDone;
159 341
160 /* user code: */ 342 /* user code: */
161 343
162 private int whitesOnFirstLine; 344 private int whitesOnFirstLine;
163 private int saveLexState; 345 private int saveLexState;
@@ -169,13 +351,13 @@ public final class XMLLexer {
169 int end = str.length() - 1; 351 int end = str.length() - 1;
170 int i = end; 352 int i = end;
171 for (; i >= 0; i--) { 353 for (; i >= 0; i--) {
172 char c = str.charAt(i); 354 char c = str.charAt(i);
173 if (c != ' ' && c != '\t' && c != '\r' && c != '\n') { 355 if (c != ' ' && c != '\t' && c != '\r' && c != '\n') {
174 break; 356 break;
175 } 357 }
176 } 358 }
177 if (i != end) { 359 if (i != end) {
178 return str.substring(0, i + 1); 360 return str.substring(0, i + 1);
179 } 361 }
180 362
181 return str; 363 return str;
@@ -185,7 +367,7 @@ public final class XMLLexer {
185 Reader reader = new StringReader(trimEnd(code)); 367 Reader reader = new StringReader(trimEnd(code));
186 String str = convert(h, reader, true); 368 String str = convert(h, reader, true);
187 try { 369 try {
188 reader.close(); 370 reader.close();
189 } catch (IOException e) { } 371 } catch (IOException e) { }
190 372
191 return str; 373 return str;
@@ -193,1280 +375,543 @@ public final class XMLLexer {
193 375
194 public String convert(AbstractXMLCodeHandler h, Reader code, boolean ret) { 376 public String convert(AbstractXMLCodeHandler h, Reader code, boolean ret) {
195 if (code == null) { 377 if (code == null) {
196 return null; 378 return null;
197 } else { 379 } else {
198 handler = h; 380 handler = h;
199 whitesOnFirstLine = 0; 381 whitesOnFirstLine = 0;
200 yyreset(code); 382 yyreset(code);
201 yybegin(CLEANFIRST); 383 yybegin(CLEANFIRST);
202 try { 384 try {
203 yylex(); 385 yylex();
204 } catch (IOException e) { 386 } catch (IOException e) {
205 return null; 387 return null;
206 } 388 }
207 if (ret) { 389 if (ret) {
208 return h.toString(); 390 return h.toString();
209 } 391 }
210 return ""; 392 return "";
211 } 393 }
212 } 394 }
213 395
214 396
215 /** 397 /**
216 * Creates a new scanner 398 * Creates a new scanner
217 * There is also a java.io.InputStream version of this constructor. 399 *
218 * 400 * @param in the java.io.Reader to read input from.
219 * @param in the java.io.Reader to read input from. 401 */
220 */ 402 public XMLLexer(java.io.Reader in) {
221 public XMLLexer(java.io.Reader in) { 403 this.zzReader = in;
222 this.zzReader = in; 404 }
405
406 /**
407 * Translates raw input code points to DFA table row
408 */
409 private static int zzCMap(int input) {
410 int offset = input & 255;
411 return offset == input ? ZZ_CMAP_BLOCKS[offset] : ZZ_CMAP_BLOCKS[ZZ_CMAP_TOP[input >> 8] | offset];
412 }
413
414 /**
415 * Refills the input buffer.
416 *
417 * @return {@code false} iff there was new input.
418 * @exception java.io.IOException if any I/O-Error occurs
419 */
420 private boolean zzRefill() throws java.io.IOException {
421
422 /* first: make room (if you can) */
423 if (zzStartRead > 0) {
424 zzEndRead += zzFinalHighSurrogate;
425 zzFinalHighSurrogate = 0;
426 System.arraycopy(zzBuffer, zzStartRead,
427 zzBuffer, 0,
428 zzEndRead - zzStartRead);
429
430 /* translate stored positions */
431 zzEndRead -= zzStartRead;
432 zzCurrentPos -= zzStartRead;
433 zzMarkedPos -= zzStartRead;
434 zzStartRead = 0;
223 } 435 }
224 436
225 /** 437 /* is the buffer big enough? */
226 * Creates a new scanner. 438 if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) {
227 * There is also java.io.Reader version of this constructor. 439 /* if not: blow it up */
228 * 440 char newBuffer[] = new char[zzBuffer.length * 2];
229 * @param in the java.io.Inputstream to read input from. 441 System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
230 */ 442 zzBuffer = newBuffer;
231 public XMLLexer(java.io.InputStream in) { 443 zzEndRead += zzFinalHighSurrogate;
232 this(new java.io.InputStreamReader(in)); 444 zzFinalHighSurrogate = 0;
233 } 445 }
234 446
235 /** 447 /* fill the buffer with new input */
236 * Unpacks the compressed character translation table. 448 int requested = zzBuffer.length - zzEndRead;
237 * 449 int numRead = zzReader.read(zzBuffer, zzEndRead, requested);
238 * @param packed the packed character translation table
239 * @return the unpacked character translation table
240 */
241 private static char [] zzUnpackCMap(String packed) {
242 char [] map = new char[0x10000];
243 int i = 0; /* index in packed string */
244 int j = 0; /* index in unpacked array */
245 while (i < 132) {
246 int count = packed.charAt(i++);
247 char value = packed.charAt(i++);
248 do {
249 map[j++] = value;
250 } while (--count > 0);
251 }
252 return map;
253 }
254 450
255 451 /* not supposed to occur according to specification of java.io.Reader */
256 /** 452 if (numRead == 0) {
257 * Refills the input buffer. 453 throw new java.io.IOException(
258 * 454 "Reader returned 0 characters. See JFlex examples/zero-reader for a workaround.");
259 * @return <code>false</code>, iff there was new input.
260 *
261 * @exception java.io.IOException if any I/O-Error occurs
262 */
263 private boolean zzRefill() throws java.io.IOException {
264
265 /* first: make room (if you can) */
266 if (zzStartRead > 0) {
267 System.arraycopy(zzBuffer, zzStartRead,
268 zzBuffer, 0,
269 zzEndRead - zzStartRead);
270
271 /* translate stored positions */
272 zzEndRead -= zzStartRead;
273 zzCurrentPos -= zzStartRead;
274 zzMarkedPos -= zzStartRead;
275 zzStartRead = 0;
276 }
277
278 /* is the buffer big enough? */
279 if (zzCurrentPos >= zzBuffer.length) {
280 /* if not: blow it up */
281 char newBuffer[] = new char[zzCurrentPos * 2];
282 System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
283 zzBuffer = newBuffer;
284 }
285
286 /* finally: fill the buffer with new input */
287 int numRead = zzReader.read(zzBuffer, zzEndRead,
288 zzBuffer.length - zzEndRead);
289
290 if (numRead > 0) {
291 zzEndRead += numRead;
292 return false;
293 }
294 // unlikely but not impossible: read 0 characters, but not at end of stream
295 if (numRead == 0) {
296 int c = zzReader.read();
297 if (c == -1) {
298 return true;
299 } else {
300 zzBuffer[zzEndRead++] = (char) c;
301 return false;
302 }
303 }
304
305 // numRead < 0
306 return true;
307 } 455 }
308 456 if (numRead > 0) {
309 457 zzEndRead += numRead;
310 /** 458 if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
311 * Closes the input stream. 459 if (numRead == requested) { // We requested too few chars to encode a full Unicode character
312 */ 460 --zzEndRead;
313 public final void yyclose() throws java.io.IOException { 461 zzFinalHighSurrogate = 1;
314 zzAtEOF = true; /* indicate end of file */ 462 } else { // There is room in the buffer for at least one more char
315 zzEndRead = zzStartRead; /* invalidate buffer */ 463 int c = zzReader.read(); // Expecting to read a paired low surrogate char
316 464 if (c == -1) {
317 if (zzReader != null) { 465 return true;
318 zzReader.close(); 466 } else {
467 zzBuffer[zzEndRead++] = (char)c;
468 }
319 } 469 }
470 }
471 /* potentially more input available */
472 return false;
320 } 473 }
321 474
475 /* numRead < 0 ==> end of stream */
476 return true;
477 }
322 478
323 /**
324 * Resets the scanner to read from a new input stream.
325 * Does not close the old reader.
326 *
327 * All internal variables are reset, the old input stream
328 * <b>cannot</b> be reused (internal buffer is discarded and lost).
329 * Lexical state is set to <tt>ZZ_INITIAL</tt>.
330 *
331 * @param reader the new input stream
332 */
333 public final void yyreset(java.io.Reader reader) {
334 zzReader = reader;
335 zzAtBOL = true;
336 zzAtEOF = false;
337 zzEOFDone = false;
338 zzEndRead = zzStartRead = 0;
339 zzCurrentPos = zzMarkedPos = 0;
340 yyline = yychar = yycolumn = 0;
341 zzLexicalState = YYINITIAL;
342 }
343 479
480 /**
481 * Closes the input reader.
482 *
483 * @throws java.io.IOException if the reader could not be closed.
484 */
485 public final void yyclose() throws java.io.IOException {
486 zzAtEOF = true; // indicate end of file
487 zzEndRead = zzStartRead; // invalidate buffer
344 488
345 /** 489 if (zzReader != null) {
346 * Returns the current lexical state. 490 zzReader.close();
347 */
348 public final int yystate() {
349 return zzLexicalState;
350 } 491 }
351 492 }
352 493
353 /** 494
354 * Enters a new lexical state 495 /**
355 * 496 * Resets the scanner to read from a new input stream.
356 * @param newState the new lexical state 497 *
357 */ 498 * <p>Does not close the old reader.
358 public final void yybegin(int newState) { 499 *
359 zzLexicalState = newState; 500 * <p>All internal variables are reset, the old input stream <b>cannot</b> be reused (internal
501 * buffer is discarded and lost). Lexical state is set to {@code ZZ_INITIAL}.
502 *
503 * <p>Internal scan buffer is resized down to its initial length, if it has grown.
504 *
505 * @param reader The new input stream.
506 */
507 public final void yyreset(java.io.Reader reader) {
508 zzReader = reader;
509 zzEOFDone = false;
510 yyResetPosition();
511 zzLexicalState = YYINITIAL;
512 if (zzBuffer.length > ZZ_BUFFERSIZE) {
513 zzBuffer = new char[ZZ_BUFFERSIZE];
514 }
515 }
516
517 /**
518 * Resets the input position.
519 */
520 private final void yyResetPosition() {
521 zzAtBOL = true;
522 zzAtEOF = false;
523 zzCurrentPos = 0;
524 zzMarkedPos = 0;
525 zzStartRead = 0;
526 zzEndRead = 0;
527 zzFinalHighSurrogate = 0;
528 yyline = 0;
529 yycolumn = 0;
530 yychar = 0L;
531 }
532
533
534 /**
535 * Returns whether the scanner has reached the end of the reader it reads from.
536 *
537 * @return whether the scanner has reached EOF.
538 */
539 public final boolean yyatEOF() {
540 return zzAtEOF;
541 }
542
543
544 /**
545 * Returns the current lexical state.
546 *
547 * @return the current lexical state.
548 */
549 public final int yystate() {
550 return zzLexicalState;
551 }
552
553
554 /**
555 * Enters a new lexical state.
556 *
557 * @param newState the new lexical state
558 */
559 public final void yybegin(int newState) {
560 zzLexicalState = newState;
561 }
562
563
564 /**
565 * Returns the text matched by the current regular expression.
566 *
567 * @return the matched text.
568 */
569 public final String yytext() {
570 return new String(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);
571 }
572
573
574 /**
575 * Returns the character at the given position from the matched text.
576 *
577 * <p>It is equivalent to {@code yytext().charAt(pos)}, but faster.
578 *
579 * @param position the position of the character to fetch. A value from 0 to {@code yylength()-1}.
580 *
581 * @return the character at {@code position}.
582 */
583 public final char yycharat(int position) {
584 return zzBuffer[zzStartRead + position];
585 }
586
587
588 /**
589 * How many characters were matched.
590 *
591 * @return the length of the matched text region.
592 */
593 public final int yylength() {
594 return zzMarkedPos-zzStartRead;
595 }
596
597
598 /**
599 * Reports an error that occurred while scanning.
600 *
601 * <p>In a well-formed scanner (no or only correct usage of {@code yypushback(int)} and a
602 * match-all fallback rule) this method will only be called with things that
603 * "Can't Possibly Happen".
604 *
605 * <p>If this method is called, something is seriously wrong (e.g. a JFlex bug producing a faulty
606 * scanner etc.).
607 *
608 * <p>Usual syntax/scanner level error handling should be done in error fallback rules.
609 *
610 * @param errorCode the code of the error message to display.
611 */
612 private static void zzScanError(int errorCode) {
613 String message;
614 try {
615 message = ZZ_ERROR_MSG[errorCode];
616 } catch (ArrayIndexOutOfBoundsException e) {
617 message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
360 } 618 }
361 619
620 throw new Error(message);
621 }
362 622
363 /**
364 * Returns the text matched by the current regular expression.
365 */
366 public final String yytext() {
367 return new String( zzBuffer, zzStartRead, zzMarkedPos - zzStartRead );
368 }
369 623
624 /**
625 * Pushes the specified amount of characters back into the input stream.
626 *
627 * <p>They will be read again by then next call of the scanning method.
628 *
629 * @param number the number of characters to be read again. This number must not be greater than
630 * {@link #yylength()}.
631 */
632 public void yypushback(int number) {
633 if ( number > yylength() )
634 zzScanError(ZZ_PUSHBACK_2BIG);
370 635
371 /** 636 zzMarkedPos -= number;
372 * Returns the character at position <tt>pos</tt> from the 637 }
373 * matched text.
374 *
375 * It is equivalent to yytext().charAt(pos), but faster
376 *
377 * @param pos the position of the character to fetch.
378 * A value from 0 to yylength()-1.
379 *
380 * @return the character at position pos
381 */
382 public final char yycharat(int pos) {
383 return zzBuffer[zzStartRead + pos];
384 }
385 638
386 639
387 /**
388 * Returns the length of the matched text region.
389 */
390 public final int yylength() {
391 return zzMarkedPos - zzStartRead;
392 }
393 640
394 641
395 /** 642 /**
396 * Reports an error that occurred while scanning. 643 * Resumes scanning until the next regular expression is matched, the end of input is encountered
397 * 644 * or an I/O-Error occurs.
398 * In a wellformed scanner (no or only correct usage of 645 *
399 * yypushback(int) and a match-all fallback rule) this method 646 * @return the next token.
400 * will only be called with things that "Can't Possibly Happen". 647 * @exception java.io.IOException if any I/O-Error occurs.
401 * If this method is called, something is seriously wrong 648 */
402 * (e.g. a JFlex bug producing a faulty scanner etc.). 649 public void yylex() throws java.io.IOException {
403 * 650 int zzInput;
404 * Usual syntax/scanner level error handling should be done 651 int zzAction;
405 * in error fallback rules.
406 *
407 * @param errorCode the code of the errormessage to display
408 */
409 private void zzScanError(int errorCode) {
410 String message;
411 try {
412 message = ZZ_ERROR_MSG[errorCode];
413 } catch (ArrayIndexOutOfBoundsException e) {
414 message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
415 }
416 652
417 throw new Error(message); 653 // cached fields:
418 } 654 int zzCurrentPosL;
655 int zzMarkedPosL;
656 int zzEndReadL = zzEndRead;
657 char[] zzBufferL = zzBuffer;
419 658
659 int [] zzTransL = ZZ_TRANS;
660 int [] zzRowMapL = ZZ_ROWMAP;
661 int [] zzAttrL = ZZ_ATTRIBUTE;
420 662
421 /** 663 while (true) {
422 * Pushes the specified amount of characters back into the input stream. 664 zzMarkedPosL = zzMarkedPos;
423 *
424 * They will be read again by then next call of the scanning method
425 *
426 * @param number the number of characters to be read again.
427 * This number must not be greater than yylength()!
428 */
429 public void yypushback(int number) {
430 if ( number > yylength() ) {
431 zzScanError(ZZ_PUSHBACK_2BIG);
432 }
433 665
434 zzMarkedPos -= number; 666 yychar+= zzMarkedPosL-zzStartRead;
435 } 667
668 zzAction = -1;
436 669
670 zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
437 671
438 /** 672 zzState = ZZ_LEXSTATE[zzLexicalState];
439 * Resumes scanning until the next regular expression is matched,
440 * the end of input is encountered or an I/O-Error occurs.
441 *
442 * @return the next token
443 * @exception java.io.IOException if any I/O-Error occurs
444 */
445 public void yylex() throws java.io.IOException {
446 int zzInput;
447 int zzAction;
448 673
449 // cached fields: 674 // set up zzAction for empty match case:
450 int zzCurrentPosL; 675 int zzAttributes = zzAttrL[zzState];
451 int zzMarkedPosL; 676 if ( (zzAttributes & 1) == 1 ) {
452 int zzEndReadL = zzEndRead; 677 zzAction = zzState;
453 char [] zzBufferL = zzBuffer; 678 }
454 char [] zzCMapL = ZZ_CMAP;
455 679
456 680
681 zzForAction: {
457 while (true) { 682 while (true) {
458 zzMarkedPosL = zzMarkedPos; 683
459 684 if (zzCurrentPosL < zzEndReadL) {
460 yychar += zzMarkedPosL - zzStartRead; 685 zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
461 686 zzCurrentPosL += Character.charCount(zzInput);
462 zzAction = -1; 687 }
463 688 else if (zzAtEOF) {
464 zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; 689 zzInput = YYEOF;
465 690 break zzForAction;
466 zzState = ZZ_LEXSTATE[zzLexicalState]; 691 }
467 692 else {
468 693 // store back cached positions
469 zzForAction: { 694 zzCurrentPos = zzCurrentPosL;
470 while (true) { 695 zzMarkedPos = zzMarkedPosL;
471 696 boolean eof = zzRefill();
472 if (zzCurrentPosL < zzEndReadL) { 697 // get translated positions and possibly new buffer
473 zzInput = zzBufferL[zzCurrentPosL++]; 698 zzCurrentPosL = zzCurrentPos;
474 } else if (zzAtEOF) { 699 zzMarkedPosL = zzMarkedPos;
475 zzInput = YYEOF; 700 zzBufferL = zzBuffer;
476 break zzForAction; 701 zzEndReadL = zzEndRead;
477 } else { 702 if (eof) {
478 // store back cached positions 703 zzInput = YYEOF;
479 zzCurrentPos = zzCurrentPosL; 704 break zzForAction;
480 zzMarkedPos = zzMarkedPosL; 705 }
481 boolean eof = zzRefill(); 706 else {
482 // get translated positions and possibly new buffer 707 zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
483 zzCurrentPosL = zzCurrentPos; 708 zzCurrentPosL += Character.charCount(zzInput);
484 zzMarkedPosL = zzMarkedPos;
485 zzBufferL = zzBuffer;
486 zzEndReadL = zzEndRead;
487 if (eof) {
488 zzInput = YYEOF;
489 break zzForAction;
490 } else {
491 zzInput = zzBufferL[zzCurrentPosL++];
492 }
493 }
494 zzInput = zzCMapL[zzInput];
495
496 boolean zzIsFinal = false;
497 boolean zzNoLookAhead = false;
498
499 zzForNext: {
500 switch (zzState) {
501 case 0:
502 switch (zzInput) {
503 case 2:
504 zzIsFinal = true;
505 zzState = 8;
506 break zzForNext;
507 case 10:
508 zzState = 9;
509 break zzForNext;
510 case 13:
511 zzIsFinal = true;
512 zzState = 10;
513 break zzForNext;
514 default:
515 zzIsFinal = true;
516 zzState = 7;
517 break zzForNext;
518 }
519
520 case 1:
521 switch (zzInput) {
522 case 7:
523 zzState = 12;
524 break zzForNext;
525 case 13:
526 zzIsFinal = true;
527 zzState = 13;
528 break zzForNext;
529 default:
530 zzIsFinal = true;
531 zzState = 11;
532 break zzForNext;
533 }
534
535 case 2:
536 switch (zzInput) {
537 case 13:
538 zzIsFinal = true;
539 zzState = 15;
540 break zzForNext;
541 case 19:
542 zzState = 16;
543 break zzForNext;
544 default:
545 zzIsFinal = true;
546 zzState = 14;
547 break zzForNext;
548 }
549
550 case 3:
551 switch (zzInput) {
552 case 1:
553 zzIsFinal = true;
554 zzState = 18;
555 break zzForNext;
556 case 5:
557 case 6:
558 case 15:
559 case 16:
560 case 17:
561 case 18:
562 zzIsFinal = true;
563 zzState = 19;
564 break zzForNext;
565 case 12:
566 zzIsFinal = true;
567 zzNoLookAhead = true;
568 zzState = 20;
569 break zzForNext;
570 case 13:
571 zzIsFinal = true;
572 zzState = 21;
573 break zzForNext;
574 case 21:
575 zzIsFinal = true;
576 zzState = 22;
577 break zzForNext;
578 case 23:
579 zzIsFinal = true;
580 zzState = 23;
581 break zzForNext;
582 case 24:
583 zzIsFinal = true;
584 zzState = 24;
585 break zzForNext;
586 default:
587 zzIsFinal = true;
588 zzNoLookAhead = true;
589 zzState = 17;
590 break zzForNext;
591 }
592
593 case 4:
594 switch (zzInput) {
595 case 1:
596 zzIsFinal = true;
597 zzState = 18;
598 break zzForNext;
599 case 5:
600 case 6:
601 case 15:
602 case 16:
603 case 17:
604 case 18:
605 zzIsFinal = true;
606 zzState = 19;
607 break zzForNext;
608 case 23:
609 zzIsFinal = true;
610 zzState = 23;
611 break zzForNext;
612 case 24:
613 zzIsFinal = true;
614 zzState = 24;
615 break zzForNext;
616 case 13:
617 zzIsFinal = true;
618 zzState = 25;
619 break zzForNext;
620 case 20:
621 zzIsFinal = true;
622 zzState = 26;
623 break zzForNext;
624 default:
625 zzIsFinal = true;
626 zzNoLookAhead = true;
627 zzState = 17;
628 break zzForNext;
629 }
630
631 case 5:
632 switch (zzInput) {
633 case 1:
634 zzIsFinal = true;
635 zzState = 28;
636 break zzForNext;
637 case 13:
638 zzIsFinal = true;
639 zzState = 29;
640 break zzForNext;
641 default:
642 zzIsFinal = true;
643 zzNoLookAhead = true;
644 zzState = 27;
645 break zzForNext;
646 }
647
648 case 6:
649 switch (zzInput) {
650 case 1:
651 zzIsFinal = true;
652 zzState = 31;
653 break zzForNext;
654 case 13:
655 zzIsFinal = true;
656 zzState = 32;
657 break zzForNext;
658 default:
659 zzIsFinal = true;
660 zzNoLookAhead = true;
661 zzState = 30;
662 break zzForNext;
663 }
664
665 case 7:
666 switch (zzInput) {
667 case 10:
668 case 13:
669 break zzForAction;
670 default:
671 zzIsFinal = true;
672 break zzForNext;
673 }
674
675 case 8:
676 switch (zzInput) {
677 case 3:
678 case 6:
679 case 9:
680 case 15:
681 case 16:
682 case 17:
683 case 18:
684 zzIsFinal = true;
685 break zzForNext;
686 case 4:
687 zzIsFinal = true;
688 zzState = 33;
689 break zzForNext;
690 case 10:
691 case 13:
692 break zzForAction;
693 default:
694 zzIsFinal = true;
695 zzState = 7;
696 break zzForNext;
697 }
698
699 case 9:
700 switch (zzInput) {
701 case 5:
702 case 6:
703 case 15:
704 case 16:
705 case 17:
706 case 18:
707 zzIsFinal = true;
708 zzState = 34;
709 break zzForNext;
710 case 11:
711 zzState = 35;
712 break zzForNext;
713 case 20:
714 zzState = 36;
715 break zzForNext;
716 case 21:
717 zzState = 37;
718 break zzForNext;
719 default:
720 break zzForAction;
721 }
722
723 case 10:
724 switch (zzInput) {
725 case 13:
726 zzIsFinal = true;
727 break zzForNext;
728 default:
729 break zzForAction;
730 }
731
732 case 11:
733 switch (zzInput) {
734 case 7:
735 zzState = 38;
736 break zzForNext;
737 case 13:
738 break zzForAction;
739 default:
740 zzIsFinal = true;
741 break zzForNext;
742 }
743
744 case 12:
745 switch (zzInput) {
746 case 7:
747 zzState = 39;
748 break zzForNext;
749 case 13:
750 break zzForAction;
751 default:
752 zzIsFinal = true;
753 zzState = 11;
754 break zzForNext;
755 }
756
757 case 13:
758 switch (zzInput) {
759 case 13:
760 zzIsFinal = true;
761 break zzForNext;
762 default:
763 break zzForAction;
764 }
765
766 case 14:
767 switch (zzInput) {
768 case 19:
769 zzState = 40;
770 break zzForNext;
771 case 13:
772 break zzForAction;
773 default:
774 zzIsFinal = true;
775 break zzForNext;
776 }
777
778 case 15:
779 switch (zzInput) {
780 case 13:
781 zzIsFinal = true;
782 break zzForNext;
783 default:
784 break zzForAction;
785 }
786
787 case 16:
788 switch (zzInput) {
789 case 19:
790 zzState = 41;
791 break zzForNext;
792 case 13:
793 break zzForAction;
794 default:
795 zzIsFinal = true;
796 zzState = 14;
797 break zzForNext;
798 }
799
800 case 18:
801 switch (zzInput) {
802 case 1:
803 zzIsFinal = true;
804 break zzForNext;
805 default:
806 break zzForAction;
807 }
808
809 case 19:
810 switch (zzInput) {
811 case 5:
812 case 6:
813 case 7:
814 case 8:
815 case 9:
816 case 14:
817 case 15:
818 case 16:
819 case 17:
820 case 18:
821 case 19:
822 zzState = 42;
823 break zzForNext;
824 case 22:
825 zzIsFinal = true;
826 zzNoLookAhead = true;
827 zzState = 43;
828 break zzForNext;
829 default:
830 break zzForAction;
831 }
832
833 case 21:
834 switch (zzInput) {
835 case 13:
836 zzIsFinal = true;
837 break zzForNext;
838 default:
839 break zzForAction;
840 }
841
842 case 22:
843 switch (zzInput) {
844 case 12:
845 zzIsFinal = true;
846 zzNoLookAhead = true;
847 zzState = 44;
848 break zzForNext;
849 default:
850 break zzForAction;
851 }
852
853 case 23:
854 switch (zzInput) {
855 case 23:
856 zzIsFinal = true;
857 zzNoLookAhead = true;
858 zzState = 46;
859 break zzForNext;
860 case 13:
861 break zzForAction;
862 default:
863 zzState = 45;
864 break zzForNext;
865 }
866
867 case 24:
868 switch (zzInput) {
869 case 24:
870 zzIsFinal = true;
871 zzNoLookAhead = true;
872 zzState = 46;
873 break zzForNext;
874 case 13:
875 break zzForAction;
876 default:
877 zzState = 47;
878 break zzForNext;
879 }
880
881 case 25:
882 switch (zzInput) {
883 case 13:
884 zzIsFinal = true;
885 break zzForNext;
886 default:
887 break zzForAction;
888 }
889
890 case 26:
891 switch (zzInput) {
892 case 12:
893 zzIsFinal = true;
894 zzNoLookAhead = true;
895 zzState = 48;
896 break zzForNext;
897 default:
898 break zzForAction;
899 }
900
901 case 28:
902 switch (zzInput) {
903 case 1:
904 zzIsFinal = true;
905 break zzForNext;
906 default:
907 break zzForAction;
908 }
909
910 case 29:
911 switch (zzInput) {
912 case 13:
913 zzIsFinal = true;
914 break zzForNext;
915 default:
916 break zzForAction;
917 }
918
919 case 31:
920 switch (zzInput) {
921 case 1:
922 zzIsFinal = true;
923 break zzForNext;
924 case 13:
925 zzIsFinal = true;
926 zzState = 32;
927 break zzForNext;
928 default:
929 break zzForAction;
930 }
931
932 case 32:
933 switch (zzInput) {
934 case 13:
935 zzIsFinal = true;
936 break zzForNext;
937 default:
938 break zzForAction;
939 }
940
941 case 33:
942 switch (zzInput) {
943 case 10:
944 case 13:
945 break zzForAction;
946 default:
947 zzIsFinal = true;
948 zzState = 7;
949 break zzForNext;
950 }
951
952 case 34:
953 switch (zzInput) {
954 case 5:
955 case 6:
956 case 7:
957 case 8:
958 case 9:
959 case 14:
960 case 15:
961 case 16:
962 case 17:
963 case 18:
964 case 19:
965 zzIsFinal = true;
966 break zzForNext;
967 default:
968 break zzForAction;
969 }
970
971 case 35:
972 switch (zzInput) {
973 case 7:
974 zzState = 49;
975 break zzForNext;
976 case 14:
977 zzState = 50;
978 break zzForNext;
979 default:
980 break zzForAction;
981 }
982
983 case 36:
984 switch (zzInput) {
985 case 5:
986 case 6:
987 case 15:
988 case 16:
989 case 17:
990 case 18:
991 zzIsFinal = true;
992 zzState = 51;
993 break zzForNext;
994 default:
995 break zzForAction;
996 }
997
998 case 37:
999 switch (zzInput) {
1000 case 5:
1001 case 6:
1002 case 15:
1003 case 16:
1004 case 17:
1005 case 18:
1006 zzState = 52;
1007 break zzForNext;
1008 default:
1009 break zzForAction;
1010 }
1011
1012 case 38:
1013 switch (zzInput) {
1014 case 7:
1015 zzState = 53;
1016 break zzForNext;
1017 case 13:
1018 break zzForAction;
1019 default:
1020 zzIsFinal = true;
1021 zzState = 11;
1022 break zzForNext;
1023 }
1024
1025 case 39:
1026 switch (zzInput) {
1027 case 12:
1028 zzIsFinal = true;
1029 zzNoLookAhead = true;
1030 zzState = 54;
1031 break zzForNext;
1032 case 13:
1033 break zzForAction;
1034 default:
1035 zzIsFinal = true;
1036 zzState = 11;
1037 break zzForNext;
1038 }
1039
1040 case 40:
1041 switch (zzInput) {
1042 case 19:
1043 zzState = 55;
1044 break zzForNext;
1045 case 13:
1046 break zzForAction;
1047 default:
1048 zzIsFinal = true;
1049 zzState = 14;
1050 break zzForNext;
1051 }
1052
1053 case 41:
1054 switch (zzInput) {
1055 case 12:
1056 zzIsFinal = true;
1057 zzNoLookAhead = true;
1058 zzState = 56;
1059 break zzForNext;
1060 case 13:
1061 break zzForAction;
1062 default:
1063 zzIsFinal = true;
1064 zzState = 14;
1065 break zzForNext;
1066 }
1067
1068 case 42:
1069 switch (zzInput) {
1070 case 5:
1071 case 6:
1072 case 7:
1073 case 8:
1074 case 9:
1075 case 14:
1076 case 15:
1077 case 16:
1078 case 17:
1079 case 18:
1080 case 19:
1081 break zzForNext;
1082 case 22:
1083 zzIsFinal = true;
1084 zzNoLookAhead = true;
1085 zzState = 43;
1086 break zzForNext;
1087 default:
1088 break zzForAction;
1089 }
1090
1091 case 45:
1092 switch (zzInput) {
1093 case 23:
1094 zzIsFinal = true;
1095 zzNoLookAhead = true;
1096 zzState = 46;
1097 break zzForNext;
1098 case 13:
1099 break zzForAction;
1100 default:
1101 break zzForNext;
1102 }
1103
1104 case 47:
1105 switch (zzInput) {
1106 case 24:
1107 zzIsFinal = true;
1108 zzNoLookAhead = true;
1109 zzState = 46;
1110 break zzForNext;
1111 case 13:
1112 break zzForAction;
1113 default:
1114 break zzForNext;
1115 }
1116
1117 case 49:
1118 switch (zzInput) {
1119 case 7:
1120 zzIsFinal = true;
1121 zzNoLookAhead = true;
1122 zzState = 57;
1123 break zzForNext;
1124 default:
1125 break zzForAction;
1126 }
1127
1128 case 50:
1129 switch (zzInput) {
1130 case 15:
1131 zzState = 58;
1132 break zzForNext;
1133 default:
1134 break zzForAction;
1135 }
1136
1137 case 51:
1138 switch (zzInput) {
1139 case 5:
1140 case 6:
1141 case 7:
1142 case 8:
1143 case 9:
1144 case 14:
1145 case 15:
1146 case 16:
1147 case 17:
1148 case 18:
1149 case 19:
1150 zzIsFinal = true;
1151 break zzForNext;
1152 default:
1153 break zzForAction;
1154 }
1155
1156 case 52:
1157 switch (zzInput) {
1158 case 5:
1159 case 6:
1160 case 7:
1161 case 8:
1162 case 9:
1163 case 14:
1164 case 15:
1165 case 16:
1166 case 17:
1167 case 18:
1168 case 19:
1169 break zzForNext;
1170 case 1:
1171 zzState = 59;
1172 break zzForNext;
1173 case 12:
1174 zzIsFinal = true;
1175 zzNoLookAhead = true;
1176 zzState = 60;
1177 break zzForNext;
1178 default:
1179 break zzForAction;
1180 }
1181
1182 case 53:
1183 switch (zzInput) {
1184 case 12:
1185 case 13:
1186 break zzForAction;
1187 default:
1188 zzIsFinal = true;
1189 zzState = 11;
1190 break zzForNext;
1191 }
1192
1193 case 55:
1194 switch (zzInput) {
1195 case 12:
1196 case 13:
1197 break zzForAction;
1198 default:
1199 zzIsFinal = true;
1200 zzState = 14;
1201 break zzForNext;
1202 }
1203
1204 case 58:
1205 switch (zzInput) {
1206 case 16:
1207 zzState = 61;
1208 break zzForNext;
1209 default:
1210 break zzForAction;
1211 }
1212
1213 case 59:
1214 switch (zzInput) {
1215 case 1:
1216 break zzForNext;
1217 case 12:
1218 zzIsFinal = true;
1219 zzNoLookAhead = true;
1220 zzState = 60;
1221 break zzForNext;
1222 default:
1223 break zzForAction;
1224 }
1225
1226 case 61:
1227 switch (zzInput) {
1228 case 17:
1229 zzState = 62;
1230 break zzForNext;
1231 default:
1232 break zzForAction;
1233 }
1234
1235 case 62:
1236 switch (zzInput) {
1237 case 18:
1238 zzState = 63;
1239 break zzForNext;
1240 default:
1241 break zzForAction;
1242 }
1243
1244 case 63:
1245 switch (zzInput) {
1246 case 17:
1247 zzState = 64;
1248 break zzForNext;
1249 default: