1 package iotpolicy.parser;
3 /* The following code was generated by JFlex 1.6.1 */
5 // JFlex parser specification written by
8 // University of California, Irvine
10 // Technische Universitaet Muenchen
11 // Fakultaet fuer Informatik
13 import java_cup.runtime.Symbol;
14 import java_cup.runtime.ComplexSymbolFactory;
15 import java_cup.runtime.ComplexSymbolFactory.Location;
19 * This class is a scanner generated by
20 * <a href="http://www.jflex.de/">JFlex</a> 1.6.1
21 * from the specification file <tt>iotparser.jflex</tt>
23 public class Lexer implements java_cup.runtime.Scanner, sym {
25 /** This character denotes the end of file */
26 public static final int YYEOF = -1;
28 /** initial size of the lookahead buffer */
29 private static final int ZZ_BUFFERSIZE = 16384;
32 public static final int YYINITIAL = 0;
33 public static final int STRING = 2;
36 * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
37 * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
38 * at the beginning of a line
39 * l is of the form l = 2*k, k a non negative integer
41 private static final int ZZ_LEXSTATE[] = {
46 * Translates characters to character classes
48 private static final String ZZ_CMAP_PACKED =
49 "\11\0\1\6\1\4\1\50\1\6\1\3\22\0\1\6\1\0\1\36"+
50 "\1\0\1\1\3\0\1\40\1\41\2\0\1\37\3\0\12\2\1\0"+
51 "\1\5\1\42\1\46\1\43\2\0\22\1\1\30\7\1\1\2\1\47"+
52 "\1\2\1\0\1\1\1\0\1\24\1\16\1\27\1\25\1\20\1\23"+
53 "\1\22\1\13\1\7\2\1\1\21\1\33\1\10\1\14\1\32\1\34"+
54 "\1\15\1\12\1\11\1\26\1\31\1\35\1\1\1\17\1\1\1\44"+
55 "\1\0\1\45\7\0\1\50\u1fa2\0\1\50\1\50\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\udfe6\0";
58 * Translates characters to character classes
60 private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
63 * Translates DFA states to action switch labels.
65 private static final int [] ZZ_ACTION = zzUnpackAction();
67 private static final String ZZ_ACTION_PACKED_0 =
68 "\2\0\1\1\1\2\2\3\1\4\17\2\1\5\1\6"+
69 "\1\7\1\10\1\11\1\12\1\13\1\14\1\15\1\16"+
70 "\1\17\1\20\1\0\11\2\1\21\11\2\1\22\1\23"+
71 "\1\24\1\25\1\26\27\2\1\27\1\30\1\31\3\2"+
72 "\1\32\2\2\1\33\2\2\1\34\3\2\1\35\2\2"+
73 "\1\36\7\2\1\37\1\40\2\2\1\41\2\2\1\42"+
74 "\1\43\1\44\2\2\1\45\3\2\1\46\2\2\1\47"+
77 private static int [] zzUnpackAction() {
78 int [] result = new int[134];
80 offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
84 private static int zzUnpackAction(String packed, int offset, int [] result) {
85 int i = 0; /* index in packed string */
86 int j = offset; /* index in unpacked array */
87 int l = packed.length();
89 int count = packed.charAt(i++);
90 int value = packed.charAt(i++);
91 do result[j++] = value; while (--count > 0);
98 * Translates a state to a row index in the transition table
100 private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
102 private static final String ZZ_ROWMAP_PACKED_0 =
103 "\0\0\0\51\0\122\0\173\0\244\0\122\0\122\0\315"+
104 "\0\366\0\u011f\0\u0148\0\u0171\0\u019a\0\u01c3\0\u01ec\0\u0215"+
105 "\0\u023e\0\u0267\0\u0290\0\u02b9\0\u02e2\0\u030b\0\122\0\122"+
106 "\0\122\0\122\0\122\0\122\0\122\0\122\0\122\0\u0334"+
107 "\0\122\0\u035d\0\u0386\0\u03af\0\u03d8\0\u0401\0\u042a\0\u0453"+
108 "\0\u047c\0\u04a5\0\u04ce\0\u04f7\0\173\0\u0520\0\u0549\0\u0572"+
109 "\0\u059b\0\u05c4\0\u05ed\0\u0616\0\u063f\0\u0668\0\122\0\122"+
110 "\0\122\0\122\0\u0691\0\u06ba\0\u06e3\0\u070c\0\u0735\0\u075e"+
111 "\0\u0787\0\u07b0\0\u07d9\0\u0802\0\u082b\0\u0854\0\u087d\0\u08a6"+
112 "\0\u08cf\0\u08f8\0\u0921\0\u094a\0\u0973\0\u099c\0\u09c5\0\u09ee"+
113 "\0\u0a17\0\u0a40\0\173\0\173\0\173\0\u0a69\0\u0a92\0\u0abb"+
114 "\0\173\0\u0ae4\0\u0b0d\0\173\0\u0b36\0\u0b5f\0\173\0\u0b88"+
115 "\0\u0bb1\0\u0bda\0\173\0\u0c03\0\u0c2c\0\173\0\u0c55\0\u0c7e"+
116 "\0\u0ca7\0\u0cd0\0\u0cf9\0\u0d22\0\u0d4b\0\173\0\173\0\u0d74"+
117 "\0\u0d9d\0\173\0\u0dc6\0\u0def\0\173\0\173\0\173\0\u0e18"+
118 "\0\u0e41\0\173\0\u0e6a\0\u0e93\0\u0ebc\0\173\0\u0ee5\0\u0f0e"+
119 "\0\173\0\u0f37\0\u0f60\0\u0f89\0\173\0\173";
121 private static int [] zzUnpackRowMap() {
122 int [] result = new int[134];
124 offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
128 private static int zzUnpackRowMap(String packed, int offset, int [] result) {
129 int i = 0; /* index in packed string */
130 int j = offset; /* index in unpacked array */
131 int l = packed.length();
133 int high = packed.charAt(i++) << 16;
134 result[j++] = high | packed.charAt(i++);
140 * The transition table of the DFA
142 private static final int [] ZZ_TRANS = zzUnpackTrans();
144 private static final String ZZ_TRANS_PACKED_0 =
145 "\1\3\1\4\1\3\1\5\1\6\1\7\1\6\1\10"+
146 "\2\4\1\11\2\4\1\12\1\13\1\4\1\14\1\15"+
147 "\1\4\1\16\1\17\1\20\1\4\1\21\1\22\1\23"+
148 "\1\24\1\25\1\4\1\26\1\27\1\30\1\31\1\32"+
149 "\1\33\1\34\1\35\1\36\1\37\1\3\1\0\3\40"+
150 "\1\0\1\3\31\40\1\41\10\40\1\42\1\40\52\0"+
151 "\2\4\4\0\27\4\17\0\1\43\45\0\2\4\4\0"+
152 "\1\4\1\44\25\4\14\0\2\4\4\0\2\4\1\45"+
153 "\1\4\1\46\22\4\14\0\2\4\4\0\11\4\1\47"+
154 "\15\4\14\0\2\4\4\0\5\4\1\50\2\4\1\51"+
155 "\16\4\14\0\2\4\4\0\1\4\1\52\25\4\14\0"+
156 "\2\4\4\0\5\4\1\53\21\4\14\0\2\4\4\0"+
157 "\12\4\1\54\14\4\14\0\2\4\4\0\3\4\1\55"+
158 "\23\4\14\0\2\4\4\0\5\4\1\56\3\4\1\57"+
159 "\15\4\14\0\2\4\4\0\4\4\1\60\10\4\1\61"+
160 "\11\4\14\0\2\4\4\0\2\4\1\62\24\4\14\0"+
161 "\2\4\4\0\5\4\1\63\21\4\14\0\2\4\4\0"+
162 "\17\4\1\64\7\4\14\0\2\4\4\0\11\4\1\65"+
163 "\15\4\14\0\2\4\4\0\1\66\26\4\13\0\3\40"+
164 "\2\0\31\40\1\0\10\40\1\0\1\40\10\0\1\67"+
165 "\1\70\3\0\1\71\20\0\1\72\17\0\1\6\44\0"+
166 "\2\4\4\0\2\4\1\73\24\4\14\0\2\4\4\0"+
167 "\6\4\1\74\20\4\14\0\2\4\4\0\5\4\1\75"+
168 "\21\4\14\0\2\4\4\0\25\4\1\76\1\4\14\0"+
169 "\2\4\4\0\5\4\1\77\21\4\14\0\2\4\4\0"+
170 "\2\4\1\100\24\4\14\0\2\4\4\0\17\4\1\101"+
171 "\7\4\14\0\2\4\4\0\1\4\1\102\25\4\14\0"+
172 "\2\4\4\0\5\4\1\103\21\4\14\0\2\4\4\0"+
173 "\17\4\1\104\7\4\14\0\2\4\4\0\3\4\1\105"+
174 "\23\4\14\0\2\4\4\0\15\4\1\106\11\4\14\0"+
175 "\2\4\4\0\23\4\1\107\3\4\14\0\2\4\4\0"+
176 "\6\4\1\110\20\4\14\0\2\4\4\0\1\111\26\4"+
177 "\14\0\2\4\4\0\7\4\1\112\17\4\14\0\2\4"+
178 "\4\0\2\4\1\113\24\4\14\0\2\4\4\0\2\4"+
179 "\1\114\24\4\14\0\2\4\4\0\11\4\1\115\15\4"+
180 "\14\0\2\4\4\0\1\116\16\4\1\117\7\4\14\0"+
181 "\2\4\4\0\6\4\1\120\20\4\14\0\2\4\4\0"+
182 "\17\4\1\121\7\4\14\0\2\4\4\0\12\4\1\122"+
183 "\14\4\14\0\2\4\4\0\11\4\1\123\15\4\14\0"+
184 "\2\4\4\0\24\4\1\124\2\4\14\0\2\4\4\0"+
185 "\13\4\1\125\13\4\14\0\2\4\4\0\15\4\1\126"+
186 "\11\4\14\0\2\4\4\0\7\4\1\127\17\4\14\0"+
187 "\2\4\4\0\20\4\1\130\6\4\14\0\2\4\4\0"+
188 "\6\4\1\131\20\4\14\0\2\4\4\0\15\4\1\132"+
189 "\11\4\14\0\2\4\4\0\1\133\26\4\14\0\2\4"+
190 "\4\0\16\4\1\134\10\4\14\0\2\4\4\0\12\4"+
191 "\1\135\14\4\14\0\2\4\4\0\4\4\1\136\22\4"+
192 "\14\0\2\4\4\0\4\4\1\137\22\4\14\0\2\4"+
193 "\4\0\6\4\1\140\20\4\14\0\2\4\4\0\1\4"+
194 "\1\141\25\4\14\0\2\4\4\0\20\4\1\142\6\4"+
195 "\14\0\2\4\4\0\2\4\1\143\24\4\14\0\2\4"+
196 "\4\0\1\144\26\4\14\0\2\4\4\0\11\4\1\145"+
197 "\15\4\14\0\2\4\4\0\2\4\1\146\24\4\14\0"+
198 "\2\4\4\0\12\4\1\147\14\4\14\0\2\4\4\0"+
199 "\6\4\1\150\20\4\14\0\2\4\4\0\7\4\1\151"+
200 "\17\4\14\0\2\4\4\0\1\4\1\152\25\4\14\0"+
201 "\2\4\4\0\1\153\26\4\14\0\2\4\4\0\5\4"+
202 "\1\154\21\4\14\0\2\4\4\0\14\4\1\155\12\4"+
203 "\14\0\2\4\4\0\13\4\1\156\13\4\14\0\2\4"+
204 "\4\0\2\4\1\157\24\4\14\0\2\4\4\0\6\4"+
205 "\1\160\20\4\14\0\2\4\4\0\15\4\1\161\11\4"+
206 "\14\0\2\4\4\0\11\4\1\162\15\4\14\0\2\4"+
207 "\4\0\1\163\26\4\14\0\2\4\4\0\1\164\26\4"+
208 "\14\0\2\4\4\0\13\4\1\165\13\4\14\0\2\4"+
209 "\4\0\20\4\1\166\6\4\14\0\2\4\4\0\16\4"+
210 "\1\167\10\4\14\0\2\4\4\0\15\4\1\170\11\4"+
211 "\14\0\2\4\4\0\11\4\1\171\15\4\14\0\2\4"+
212 "\4\0\1\4\1\172\25\4\14\0\2\4\4\0\23\4"+
213 "\1\173\3\4\14\0\2\4\4\0\12\4\1\174\14\4"+
214 "\14\0\2\4\4\0\20\4\1\175\6\4\14\0\2\4"+
215 "\4\0\3\4\1\176\23\4\14\0\2\4\4\0\2\4"+
216 "\1\177\24\4\14\0\2\4\4\0\1\200\26\4\14\0"+
217 "\2\4\4\0\11\4\1\201\15\4\14\0\2\4\4\0"+
218 "\1\202\26\4\14\0\2\4\4\0\2\4\1\203\24\4"+
219 "\14\0\2\4\4\0\5\4\1\204\21\4\14\0\2\4"+
220 "\4\0\10\4\1\205\16\4\14\0\2\4\4\0\1\4"+
223 private static int [] zzUnpackTrans() {
224 int [] result = new int[4018];
226 offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
230 private static int zzUnpackTrans(String packed, int offset, int [] result) {
231 int i = 0; /* index in packed string */
232 int j = offset; /* index in unpacked array */
233 int l = packed.length();
235 int count = packed.charAt(i++);
236 int value = packed.charAt(i++);
238 do result[j++] = value; while (--count > 0);
245 private static final int ZZ_UNKNOWN_ERROR = 0;
246 private static final int ZZ_NO_MATCH = 1;
247 private static final int ZZ_PUSHBACK_2BIG = 2;
249 /* error messages for the codes above */
250 private static final String ZZ_ERROR_MSG[] = {
251 "Unknown internal scanner error",
252 "Error: could not match input",
253 "Error: pushback value was too large"
257 * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
259 private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
261 private static final String ZZ_ATTRIBUTE_PACKED_0 =
262 "\2\0\1\11\2\1\2\11\17\1\11\11\1\1\1\11"+
263 "\1\1\1\0\23\1\4\11\114\1";
265 private static int [] zzUnpackAttribute() {
266 int [] result = new int[134];
268 offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
272 private static int zzUnpackAttribute(String packed, int offset, int [] result) {
273 int i = 0; /* index in packed string */
274 int j = offset; /* index in unpacked array */
275 int l = packed.length();
277 int count = packed.charAt(i++);
278 int value = packed.charAt(i++);
279 do result[j++] = value; while (--count > 0);
284 /** the input device */
285 private java.io.Reader zzReader;
287 /** the current state of the DFA */
290 /** the current lexical state */
291 private int zzLexicalState = YYINITIAL;
293 /** this buffer contains the current text to be matched and is
294 the source of the yytext() string */
295 private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
297 /** the textposition at the last accepting state */
298 private int zzMarkedPos;
300 /** the current text position in the buffer */
301 private int zzCurrentPos;
303 /** startRead marks the beginning of the yytext() string in the buffer */
304 private int zzStartRead;
306 /** endRead marks the last character in the buffer, that has been read
308 private int zzEndRead;
310 /** number of newlines encountered up to the start of the matched text */
313 /** the number of characters up to the start of the matched text */
317 * the number of characters from the last newline up to the start of the
320 private int yycolumn;
323 * zzAtBOL == true <=> the scanner is currently at the beginning of a line
325 private boolean zzAtBOL = true;
327 /** zzAtEOF == true <=> the scanner is at the EOF */
328 private boolean zzAtEOF;
330 /** denotes if the user-EOF-code has already been executed */
331 private boolean zzEOFDone;
334 * The number of occupied positions in zzBuffer beyond zzEndRead.
335 * When a lead/high surrogate has been read from the input stream
336 * into the final zzBuffer position, this will have a value of 1;
337 * otherwise, it will have a value of 0.
339 private int zzFinalHighSurrogate = 0;
342 StringBuffer string = new StringBuffer();
343 public Lexer(java.io.Reader in, ComplexSymbolFactory sf){
347 ComplexSymbolFactory symbolFactory;
349 private Symbol symbol(String name, int sym) {
350 return symbolFactory.newSymbol(name, sym, new Location(yyline+1,yycolumn+1,yychar), new Location(yyline+1,yycolumn+yylength(),yychar+yylength()));
353 private Symbol symbol(String name, int sym, Object val) {
354 Location left = new Location(yyline+1,yycolumn+1,yychar);
355 Location right= new Location(yyline+1,yycolumn+yylength(), yychar+yylength());
356 return symbolFactory.newSymbol(name, sym, left, right,val);
358 private Symbol symbol(String name, int sym, Object val,int buflength) {
359 Location left = new Location(yyline+1,yycolumn+yylength()-buflength,yychar+yylength()-buflength);
360 Location right= new Location(yyline+1,yycolumn+yylength(), yychar+yylength());
361 return symbolFactory.newSymbol(name, sym, left, right,val);
363 private void error(String message) {
364 System.out.println("Error at line "+(yyline+1)+", column "+(yycolumn+1)+" : "+message);
369 * Creates a new scanner
371 * @param in the java.io.Reader to read input from.
373 public Lexer(java.io.Reader in) {
379 * Unpacks the compressed character translation table.
381 * @param packed the packed character translation table
382 * @return the unpacked character translation table
384 private static char [] zzUnpackCMap(String packed) {
385 char [] map = new char[0x110000];
386 int i = 0; /* index in packed string */
387 int j = 0; /* index in unpacked array */
389 int count = packed.charAt(i++);
390 char value = packed.charAt(i++);
391 do map[j++] = value; while (--count > 0);
398 * Refills the input buffer.
400 * @return <code>false</code>, iff there was new input.
402 * @exception java.io.IOException if any I/O-Error occurs
404 private boolean zzRefill() throws java.io.IOException {
406 /* first: make room (if you can) */
407 if (zzStartRead > 0) {
408 zzEndRead += zzFinalHighSurrogate;
409 zzFinalHighSurrogate = 0;
410 System.arraycopy(zzBuffer, zzStartRead,
412 zzEndRead-zzStartRead);
414 /* translate stored positions */
415 zzEndRead-= zzStartRead;
416 zzCurrentPos-= zzStartRead;
417 zzMarkedPos-= zzStartRead;
421 /* is the buffer big enough? */
422 if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) {
423 /* if not: blow it up */
424 char newBuffer[] = new char[zzBuffer.length*2];
425 System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
426 zzBuffer = newBuffer;
427 zzEndRead += zzFinalHighSurrogate;
428 zzFinalHighSurrogate = 0;
431 /* fill the buffer with new input */
432 int requested = zzBuffer.length - zzEndRead;
433 int numRead = zzReader.read(zzBuffer, zzEndRead, requested);
435 /* not supposed to occur according to specification of java.io.Reader */
437 throw new java.io.IOException("Reader returned 0 characters. See JFlex examples for workaround.");
440 zzEndRead += numRead;
441 /* If numRead == requested, we might have requested to few chars to
442 encode a full Unicode character. We assume that a Reader would
443 otherwise never return half characters. */
444 if (numRead == requested) {
445 if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
447 zzFinalHighSurrogate = 1;
450 /* potentially more input available */
454 /* numRead < 0 ==> end of stream */
460 * Closes the input stream.
462 public final void yyclose() throws java.io.IOException {
463 zzAtEOF = true; /* indicate end of file */
464 zzEndRead = zzStartRead; /* invalidate buffer */
466 if (zzReader != null)
472 * Resets the scanner to read from a new input stream.
473 * Does not close the old reader.
475 * All internal variables are reset, the old input stream
476 * <b>cannot</b> be reused (internal buffer is discarded and lost).
477 * Lexical state is set to <tt>ZZ_INITIAL</tt>.
479 * Internal scan buffer is resized down to its initial length, if it has grown.
481 * @param reader the new input stream
483 public final void yyreset(java.io.Reader reader) {
488 zzEndRead = zzStartRead = 0;
489 zzCurrentPos = zzMarkedPos = 0;
490 zzFinalHighSurrogate = 0;
491 yyline = yychar = yycolumn = 0;
492 zzLexicalState = YYINITIAL;
493 if (zzBuffer.length > ZZ_BUFFERSIZE)
494 zzBuffer = new char[ZZ_BUFFERSIZE];
499 * Returns the current lexical state.
501 public final int yystate() {
502 return zzLexicalState;
507 * Enters a new lexical state
509 * @param newState the new lexical state
511 public final void yybegin(int newState) {
512 zzLexicalState = newState;
517 * Returns the text matched by the current regular expression.
519 public final String yytext() {
520 return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
525 * Returns the character at position <tt>pos</tt> from the
528 * It is equivalent to yytext().charAt(pos), but faster
530 * @param pos the position of the character to fetch.
531 * A value from 0 to yylength()-1.
533 * @return the character at position pos
535 public final char yycharat(int pos) {
536 return zzBuffer[zzStartRead+pos];
541 * Returns the length of the matched text region.
543 public final int yylength() {
544 return zzMarkedPos-zzStartRead;
549 * Reports an error that occured while scanning.
551 * In a wellformed scanner (no or only correct usage of
552 * yypushback(int) and a match-all fallback rule) this method
553 * will only be called with things that "Can't Possibly Happen".
554 * If this method is called, something is seriously wrong
555 * (e.g. a JFlex bug producing a faulty scanner etc.).
557 * Usual syntax/scanner level error handling should be done
558 * in error fallback rules.
560 * @param errorCode the code of the errormessage to display
562 private void zzScanError(int errorCode) {
565 message = ZZ_ERROR_MSG[errorCode];
567 catch (ArrayIndexOutOfBoundsException e) {
568 message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
571 throw new Error(message);
576 * Pushes the specified amount of characters back into the input stream.
578 * They will be read again by then next call of the scanning method
580 * @param number the number of characters to be read again.
581 * This number must not be greater than yylength()!
583 public void yypushback(int number) {
584 if ( number > yylength() )
585 zzScanError(ZZ_PUSHBACK_2BIG);
587 zzMarkedPos -= number;
592 * Contains user EOF-code, which will be executed exactly once,
593 * when the end of file is reached
595 private void zzDoEOF() throws java.io.IOException {
604 * Resumes scanning until the next regular expression is matched,
605 * the end of input is encountered or an I/O-Error occurs.
607 * @return the next token
608 * @exception java.io.IOException if any I/O-Error occurs
610 public java_cup.runtime.Symbol next_token() throws java.io.IOException {
617 int zzEndReadL = zzEndRead;
618 char [] zzBufferL = zzBuffer;
619 char [] zzCMapL = ZZ_CMAP;
621 int [] zzTransL = ZZ_TRANS;
622 int [] zzRowMapL = ZZ_ROWMAP;
623 int [] zzAttrL = ZZ_ATTRIBUTE;
626 zzMarkedPosL = zzMarkedPos;
628 yychar+= zzMarkedPosL-zzStartRead;
633 for (zzCurrentPosL = zzStartRead ;
634 zzCurrentPosL < zzMarkedPosL ;
635 zzCurrentPosL += zzCharCount ) {
636 zzCh = Character.codePointAt(zzBufferL, zzCurrentPosL, zzMarkedPosL);
637 zzCharCount = Character.charCount(zzCh);
663 yycolumn += zzCharCount;
668 // peek one character ahead if it is \n (if we have counted one line too much)
670 if (zzMarkedPosL < zzEndReadL)
671 zzPeek = zzBufferL[zzMarkedPosL] == '\n';
675 boolean eof = zzRefill();
676 zzEndReadL = zzEndRead;
677 zzMarkedPosL = zzMarkedPos;
678 zzBufferL = zzBuffer;
682 zzPeek = zzBufferL[zzMarkedPosL] == '\n';
684 if (zzPeek) yyline--;
688 zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
690 zzState = ZZ_LEXSTATE[zzLexicalState];
692 // set up zzAction for empty match case:
693 int zzAttributes = zzAttrL[zzState];
694 if ( (zzAttributes & 1) == 1 ) {
702 if (zzCurrentPosL < zzEndReadL) {
703 zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
704 zzCurrentPosL += Character.charCount(zzInput);
711 // store back cached positions
712 zzCurrentPos = zzCurrentPosL;
713 zzMarkedPos = zzMarkedPosL;
714 boolean eof = zzRefill();
715 // get translated positions and possibly new buffer
716 zzCurrentPosL = zzCurrentPos;
717 zzMarkedPosL = zzMarkedPos;
718 zzBufferL = zzBuffer;
719 zzEndReadL = zzEndRead;
725 zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
726 zzCurrentPosL += Character.charCount(zzInput);
729 int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
730 if (zzNext == -1) break zzForAction;
733 zzAttributes = zzAttrL[zzState];
734 if ( (zzAttributes & 1) == 1 ) {
736 zzMarkedPosL = zzCurrentPosL;
737 if ( (zzAttributes & 8) == 8 ) break zzForAction;
743 // store back cached position
744 zzMarkedPos = zzMarkedPosL;
746 if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
749 { return symbolFactory.newSymbol("EOF", EOF, new Location(yyline+1,yycolumn+1,yychar), new Location(yyline+1,yycolumn+1,yychar+1));
753 switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
755 { /* throw new Error("Illegal character <"+ yytext()+">");*/
756 error("Illegal character <"+ yytext()+">");
760 { return symbol("Identifier",IDENT, yytext());
768 { return symbol("semicolon",SEMICOLON);
772 { string.setLength(0); yybegin(STRING);
776 { return symbol("comma",COMMA);
780 { return symbol("(",LPAR);
784 { return symbol(")",RPAR);
788 { return symbol("<",LANG);
792 { return symbol(">",RANG);
796 { return symbol("{",BEGIN);
800 { return symbol("}",END);
804 { return symbol("=",ASSIGN);
808 { string.append( yytext() );
812 { yybegin(YYINITIAL);
813 return symbol("StringConst",STRINGCONST,string.toString(),string.length());
817 { string.append('\\');
821 { return symbol("as",AS);
825 { string.append('\n');
829 { string.append('\t');
833 { string.append('\r');
837 { string.append('\"');
841 { return symbol("int",TYPE, "int" );
845 { return symbol("byte",TYPE, "byte" );
849 { return symbol("enum",ENUM);
853 { return symbol("long",TYPE, "long" );
857 { return symbol("char",TYPE, "char" );
861 { return symbol("void",TYPE, "void" );
865 { return symbol("with",WITH);
869 { return symbol("short",TYPE, "short" );
873 { return symbol("float",TYPE, "float" );
877 { return symbol("string",TYPE, "String" );
881 { return symbol("struct",STRUCT);
885 { return symbol("double",TYPE, "double" );
889 { return symbol("String",TYPE, "String" );
893 { return symbol("public",PUBLIC);
897 { return symbol("method",METHOD);
901 { return symbol("boolean",TYPE, "boolean" );
905 { return symbol("requires",REQUIRES);
909 { return symbol("interface",INTERFACE);
913 { return symbol("capability",CAPABILITY);
917 { return symbol("description",DESCRIPTION);
921 zzScanError(ZZ_NO_MATCH);