Clover Coverage Report - KS Common 1.1 (Aggregated)
Coverage timestamp: Sun Mar 6 2011 20:59:55 EST
../../../../../../../../img/srcFileCovDistChart7.png 34% of files have more coverage
222   510   115   15.86
14   370   0.52   14
14     8.21  
1    
 
  BooleanFunctionLexer       Line # 27 222 0% 115 97 61.2% 0.612
 
  (44)
 
1    /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10    * software distributed under the License is distributed on an "AS IS"
11    * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12    * or implied. See the License for the specific language governing
13    * permissions and limitations under the License.
14    */
15   
16    // $ANTLR 3.1.1 BooleanFunction.g 2009-06-03 01:05:39
17    package org.kuali.student.common.messagebuilder.booleanmessage.ast.parsers;
18   
19    import org.antlr.runtime.CharStream;
20    import org.antlr.runtime.EarlyExitException;
21    import org.antlr.runtime.Lexer;
22    import org.antlr.runtime.MismatchedSetException;
23    import org.antlr.runtime.NoViableAltException;
24    import org.antlr.runtime.RecognitionException;
25    import org.antlr.runtime.RecognizerSharedState;
26   
 
27    public class BooleanFunctionLexer extends Lexer {
28    public static final int UPPERCASE=9;
29    public static final int LOWERCASE=12;
30    public static final int RP=7;
31    public static final int OR=4;
32    public static final int LP=6;
33    public static final int NUMBER=10;
34    public static final int WHITESPACE=11;
35    public static final int AND=5;
36    public static final int EOF=-1;
37    public static final int ALPHA=8;
38   
39    // delegates
40    // delegators
41   
 
42  0 toggle public BooleanFunctionLexer() {;}
 
43  92 toggle public BooleanFunctionLexer(CharStream input) {
44  92 this(input, new RecognizerSharedState());
45    }
 
46  92 toggle public BooleanFunctionLexer(CharStream input, RecognizerSharedState state) {
47  92 super(input,state);
48   
49    }
 
50  0 toggle public String getGrammarFileName() { return "BooleanFunction.g"; }
51   
52    // $ANTLR start "OR"
 
53  68 toggle public final void mOR() throws RecognitionException {
54  68 try {
55  68 int _type = OR;
56  68 int _channel = DEFAULT_TOKEN_CHANNEL;
57    // BooleanFunction.g:5:4: ( '+' )
58    // BooleanFunction.g:5:6: '+'
59    {
60  68 match('+');
61   
62    }
63   
64  68 state.type = _type;
65  68 state.channel = _channel;
66    }
67    finally {
68    }
69    }
70    // $ANTLR end "OR"
71   
72    // $ANTLR start "AND"
 
73  87 toggle public final void mAND() throws RecognitionException {
74  87 try {
75  87 int _type = AND;
76  87 int _channel = DEFAULT_TOKEN_CHANNEL;
77    // BooleanFunction.g:6:5: ( '*' )
78    // BooleanFunction.g:6:7: '*'
79    {
80  87 match('*');
81   
82    }
83   
84  87 state.type = _type;
85  87 state.channel = _channel;
86    }
87    finally {
88    }
89    }
90    // $ANTLR end "AND"
91   
92    // $ANTLR start "LP"
 
93  54 toggle public final void mLP() throws RecognitionException {
94  54 try {
95  54 int _type = LP;
96  54 int _channel = DEFAULT_TOKEN_CHANNEL;
97    // BooleanFunction.g:7:4: ( '(' )
98    // BooleanFunction.g:7:6: '('
99    {
100  54 match('(');
101   
102    }
103   
104  54 state.type = _type;
105  54 state.channel = _channel;
106    }
107    finally {
108    }
109    }
110    // $ANTLR end "LP"
111   
112    // $ANTLR start "RP"
 
113  54 toggle public final void mRP() throws RecognitionException {
114  54 try {
115  54 int _type = RP;
116  54 int _channel = DEFAULT_TOKEN_CHANNEL;
117    // BooleanFunction.g:8:4: ( ')' )
118    // BooleanFunction.g:8:6: ')'
119    {
120  54 match(')');
121   
122    }
123   
124  54 state.type = _type;
125  54 state.channel = _channel;
126    }
127    finally {
128    }
129    }
130    // $ANTLR end "RP"
131   
132    // $ANTLR start "ALPHA"
 
133  245 toggle public final void mALPHA() throws RecognitionException {
134  245 try {
135  245 int _type = ALPHA;
136  245 int _channel = DEFAULT_TOKEN_CHANNEL;
137    // BooleanFunction.g:69:9: ( UPPERCASE | ( UPPERCASE NUMBER ) )
138  245 int alt1=2;
139  245 int LA1_0 = input.LA(1);
140   
141  245 if ( ((LA1_0>='A' && LA1_0<='Z')) ) {
142  245 int LA1_1 = input.LA(2);
143   
144  245 if ( ((LA1_1>='0' && LA1_1<='9')) ) {
145  157 alt1=2;
146    }
147    else {
148  88 alt1=1;}
149    }
150    else {
151  0 NoViableAltException nvae =
152    new NoViableAltException("", 1, 0, input);
153   
154  0 throw nvae;
155    }
156  245 switch (alt1) {
157  88 case 1 :
158    // BooleanFunction.g:69:11: UPPERCASE
159    {
160  88 mUPPERCASE();
161   
162    }
163  88 break;
164  157 case 2 :
165    // BooleanFunction.g:69:23: ( UPPERCASE NUMBER )
166    {
167    // BooleanFunction.g:69:23: ( UPPERCASE NUMBER )
168    // BooleanFunction.g:69:24: UPPERCASE NUMBER
169    {
170  157 mUPPERCASE();
171  157 mNUMBER();
172   
173    }
174   
175   
176    }
177  157 break;
178   
179    }
180  245 state.type = _type;
181  245 state.channel = _channel;
182    }
183    finally {
184    }
185    }
186    // $ANTLR end "ALPHA"
187   
188    // $ANTLR start "NUMBER"
 
189  157 toggle public final void mNUMBER() throws RecognitionException {
190  157 try {
191  157 int _type = NUMBER;
192  157 int _channel = DEFAULT_TOKEN_CHANNEL;
193    // BooleanFunction.g:71:9: ( ( '0' .. '9' )+ )
194    // BooleanFunction.g:71:11: ( '0' .. '9' )+
195    {
196    // BooleanFunction.g:71:11: ( '0' .. '9' )+
197  157 int cnt2=0;
198  157 loop2:
199    do {
200  314 int alt2=2;
201  314 int LA2_0 = input.LA(1);
202   
203  314 if ( ((LA2_0>='0' && LA2_0<='9')) ) {
204  157 alt2=1;
205    }
206   
207   
208  314 switch (alt2) {
209  157 case 1 :
210    // BooleanFunction.g:71:12: '0' .. '9'
211    {
212  157 matchRange('0','9');
213   
214    }
215  157 break;
216   
217  157 default :
218  157 if ( cnt2 >= 1 ) break loop2;
219  0 EarlyExitException eee =
220    new EarlyExitException(2, input);
221  0 throw eee;
222    }
223  157 cnt2++;
224    } while (true);
225   
226   
227    }
228   
229  157 state.type = _type;
230  157 state.channel = _channel;
231    }
232    finally {
233    }
234    }
235    // $ANTLR end "NUMBER"
236   
237    // $ANTLR start "WHITESPACE"
 
238  80 toggle public final void mWHITESPACE() throws RecognitionException {
239  80 try {
240  80 int _type = WHITESPACE;
241  80 int _channel = DEFAULT_TOKEN_CHANNEL;
242    // BooleanFunction.g:73:12: ( ( '\\t' | ' ' | '\\r' | '\\n' | '\\u000C' )+ )
243    // BooleanFunction.g:73:14: ( '\\t' | ' ' | '\\r' | '\\n' | '\\u000C' )+
244    {
245    // BooleanFunction.g:73:14: ( '\\t' | ' ' | '\\r' | '\\n' | '\\u000C' )+
246  80 int cnt3=0;
247  80 loop3:
248    do {
249  160 int alt3=2;
250  160 int LA3_0 = input.LA(1);
251   
252  160 if ( ((LA3_0>='\t' && LA3_0<='\n')||(LA3_0>='\f' && LA3_0<='\r')||LA3_0==' ') ) {
253  80 alt3=1;
254    }
255   
256   
257  160 switch (alt3) {
258  80 case 1 :
259    // BooleanFunction.g:
260    {
261  80 if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||(input.LA(1)>='\f' && input.LA(1)<='\r')||input.LA(1)==' ' ) {
262  80 input.consume();
263   
264    }
265    else {
266  0 MismatchedSetException mse = new MismatchedSetException(null,input);
267  0 recover(mse);
268  0 throw mse;}
269   
270   
271    }
272  80 break;
273   
274  80 default :
275  80 if ( cnt3 >= 1 ) break loop3;
276  0 EarlyExitException eee =
277    new EarlyExitException(3, input);
278  0 throw eee;
279    }
280  80 cnt3++;
281    } while (true);
282   
283  80 _channel = HIDDEN;
284   
285    }
286   
287  80 state.type = _type;
288  80 state.channel = _channel;
289    }
290    finally {
291    }
292    }
293    // $ANTLR end "WHITESPACE"
294   
295    // $ANTLR start "LOWERCASE"
 
296  0 toggle public final void mLOWERCASE() throws RecognitionException {
297  0 try {
298  0 int _type = LOWERCASE;
299  0 int _channel = DEFAULT_TOKEN_CHANNEL;
300    // BooleanFunction.g:75:11: ( 'a' .. 'z' )
301    // BooleanFunction.g:75:13: 'a' .. 'z'
302    {
303  0 matchRange('a','z');
304   
305    }
306   
307  0 state.type = _type;
308  0 state.channel = _channel;
309    }
310    finally {
311    }
312    }
313    // $ANTLR end "LOWERCASE"
314   
315    // $ANTLR start "UPPERCASE"
 
316  245 toggle public final void mUPPERCASE() throws RecognitionException {
317  245 try {
318    // BooleanFunction.g:77:20: ( 'A' .. 'Z' )
319    // BooleanFunction.g:77:22: 'A' .. 'Z'
320    {
321  245 matchRange('A','Z');
322   
323    }
324   
325    }
326    finally {
327    }
328    }
329    // $ANTLR end "UPPERCASE"
330   
 
331  588 toggle public void mTokens() throws RecognitionException {
332    // BooleanFunction.g:1:8: ( OR | AND | LP | RP | ALPHA | NUMBER | WHITESPACE | LOWERCASE )
333  588 int alt4=8;
334  588 switch ( input.LA(1) ) {
335  68 case '+':
336    {
337  68 alt4=1;
338    }
339  68 break;
340  87 case '*':
341    {
342  87 alt4=2;
343    }
344  87 break;
345  54 case '(':
346    {
347  54 alt4=3;
348    }
349  54 break;
350  54 case ')':
351    {
352  54 alt4=4;
353    }
354  54 break;
355  28 case 'A':
356  28 case 'B':
357  18 case 'C':
358  14 case 'D':
359  0 case 'E':
360  0 case 'F':
361  0 case 'G':
362  0 case 'H':
363  0 case 'I':
364  0 case 'J':
365  0 case 'K':
366  0 case 'L':
367  77 case 'M':
368  0 case 'N':
369  0 case 'O':
370  0 case 'P':
371  0 case 'Q':
372  80 case 'R':
373  0 case 'S':
374  0 case 'T':
375  0 case 'U':
376  0 case 'V':
377  0 case 'W':
378  0 case 'X':
379  0 case 'Y':
380  0 case 'Z':
381    {
382  245 alt4=5;
383    }
384  245 break;
385  0 case '0':
386  0 case '1':
387  0 case '2':
388  0 case '3':
389  0 case '4':
390  0 case '5':
391  0 case '6':
392  0 case '7':
393  0 case '8':
394  0 case '9':
395    {
396  0 alt4=6;
397    }
398  0 break;
399  0 case '\t':
400  0 case '\n':
401  0 case '\f':
402  0 case '\r':
403  80 case ' ':
404    {
405  80 alt4=7;
406    }
407  80 break;
408  0 case 'a':
409  0 case 'b':
410  0 case 'c':
411  0 case 'd':
412  0 case 'e':
413  0 case 'f':
414  0 case 'g':
415  0 case 'h':
416  0 case 'i':
417  0 case 'j':
418  0 case 'k':
419  0 case 'l':
420  0 case 'm':
421  0 case 'n':
422  0 case 'o':
423  0 case 'p':
424  0 case 'q':
425  0 case 'r':
426  0 case 's':
427  0 case 't':
428  0 case 'u':
429  0 case 'v':
430  0 case 'w':
431  0 case 'x':
432  0 case 'y':
433  0 case 'z':
434    {
435  0 alt4=8;
436    }
437  0 break;
438  0 default:
439  0 NoViableAltException nvae =
440    new NoViableAltException("", 4, 0, input);
441   
442  0 throw nvae;
443    }
444   
445  588 switch (alt4) {
446  68 case 1 :
447    // BooleanFunction.g:1:10: OR
448    {
449  68 mOR();
450   
451    }
452  68 break;
453  87 case 2 :
454    // BooleanFunction.g:1:13: AND
455    {
456  87 mAND();
457   
458    }
459  87 break;
460  54 case 3 :
461    // BooleanFunction.g:1:17: LP
462    {
463  54 mLP();
464   
465    }
466  54 break;
467  54 case 4 :
468    // BooleanFunction.g:1:20: RP
469    {
470  54 mRP();
471   
472    }
473  54 break;
474  245 case 5 :
475    // BooleanFunction.g:1:23: ALPHA
476    {
477  245 mALPHA();
478   
479    }
480  245 break;
481  0 case 6 :
482    // BooleanFunction.g:1:29: NUMBER
483    {
484  0 mNUMBER();
485   
486    }
487  0 break;
488  80 case 7 :
489    // BooleanFunction.g:1:36: WHITESPACE
490    {
491  80 mWHITESPACE();
492   
493    }
494  80 break;
495  0 case 8 :
496    // BooleanFunction.g:1:47: LOWERCASE
497    {
498  0 mLOWERCASE();
499   
500    }
501  0 break;
502   
503    }
504   
505    }
506   
507   
508   
509   
510    }