OSDN Git Service

Added TreeParser implementations for XML, Silk, JSON, Map types
[xerial/xerial-core.git] / src / main / java / org / xerial / silk / impl / SilkParser.java
1 // $ANTLR 3.1.1 F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g 2009-05-29 11:54:59
2
3 /*--------------------------------------------------------------------------
4  *  Copyright 2009 Taro L. Saito
5  *
6  *  Licensed under the Apache License, Version 2.0 (the "License");
7  *  you may not use this file except in compliance with the License.
8  *  You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *  Unless required by applicable law or agreed to in writing, software
13  *  distributed under the License is distributed on an "AS IS" BASIS,
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *  See the License for the specific language governing permissions and
16  *  limitations under the License.
17  *--------------------------------------------------------------------------*/
18 //--------------------------------------
19 // XerialJ
20 //
21 // SilkParser.java
22 // Since: Jan 28, 2009 1:00:02 PM
23 //
24 //--------------------------------------
25 package org.xerial.silk.impl;
26
27
28 import org.antlr.runtime.*;
29 import java.util.Stack;
30 import java.util.List;
31 import java.util.ArrayList;
32
33
34 import org.antlr.runtime.tree.*;
35
36 public class SilkParser extends Parser {
37     public static final String[] tokenNames = new String[] {
38         "<invalid>", "<EOR>", "<DOWN>", "<UP>", "Silk", "SilkNode", "SilkLine", "Name", "Value", "Occurrence", "DataType", "Function", "Argument", "KeyValuePair", "Key", "WhiteSpace", "LineBreakChar", "LineComment", "NodeIndent", "FunctionIndent", "BlankLine", "LParen", "RParen", "Comma", "Colon", "Seq", "TabSeq", "Star", "At", "Plus", "LBracket", "RBracket", "Question", "Digit", "Letter", "HexDigit", "UnicodeChar", "EscapeSequence", "StringChar", "StringChar_s", "String", "ScopeIndicator", "FlowIndicator", "Indicator", "PlainUnsafeChar", "PlainSafeKey", "PlainSafeIn", "PlainSafeOut", "NonSpaceChar", "PlainFirst", "PlainOneLine", "JSON", "Separation"
39     };
40     public static final int Key=14;
41     public static final int PlainUnsafeChar=44;
42     public static final int PlainSafeKey=45;
43     public static final int DataType=10;
44     public static final int SilkNode=5;
45     public static final int SilkLine=6;
46     public static final int LBracket=30;
47     public static final int NodeIndent=18;
48     public static final int Digit=33;
49     public static final int HexDigit=35;
50     public static final int PlainOneLine=50;
51     public static final int Plus=29;
52     public static final int Occurrence=9;
53     public static final int Argument=12;
54     public static final int Separation=52;
55     public static final int FlowIndicator=42;
56     public static final int Letter=34;
57     public static final int PlainSafeIn=46;
58     public static final int Comma=23;
59     public static final int TabSeq=26;
60     public static final int NonSpaceChar=48;
61     public static final int EscapeSequence=37;
62     public static final int PlainFirst=49;
63     public static final int WhiteSpace=15;
64     public static final int PlainSafeOut=47;
65     public static final int JSON=51;
66     public static final int Question=32;
67     public static final int LineComment=17;
68     public static final int Colon=24;
69     public static final int At=28;
70     public static final int KeyValuePair=13;
71     public static final int Star=27;
72     public static final int Seq=25;
73     public static final int FunctionIndent=19;
74     public static final int RParen=22;
75     public static final int Indicator=43;
76     public static final int UnicodeChar=36;
77     public static final int Silk=4;
78     public static final int BlankLine=20;
79     public static final int StringChar=38;
80     public static final int Function=11;
81     public static final int Name=7;
82     public static final int LParen=21;
83     public static final int String=40;
84     public static final int LineBreakChar=16;
85     public static final int ScopeIndicator=41;
86     public static final int EOF=-1;
87     public static final int StringChar_s=39;
88     public static final int Value=8;
89     public static final int RBracket=31;
90
91     // delegates
92     // delegators
93
94
95         public SilkParser(TokenStream input) {
96             this(input, new RecognizerSharedState());
97         }
98         public SilkParser(TokenStream input, RecognizerSharedState state) {
99             super(input, state);
100              
101         }
102         
103     protected TreeAdaptor adaptor = new CommonTreeAdaptor();
104
105     public void setTreeAdaptor(TreeAdaptor adaptor) {
106         this.adaptor = adaptor;
107     }
108     public TreeAdaptor getTreeAdaptor() {
109         return adaptor;
110     }
111
112     public String[] getTokenNames() { return SilkParser.tokenNames; }
113     public String getGrammarFileName() { return "F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g"; }
114
115
116     public static class silkFile_return extends ParserRuleReturnScope {
117         Object tree;
118         public Object getTree() { return tree; }
119     };
120
121     // $ANTLR start "silkFile"
122     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:266:1: silkFile : ( silkLine )* -> ^( Silk ( silkLine )* ) ;
123     public final SilkParser.silkFile_return silkFile() throws RecognitionException {
124         SilkParser.silkFile_return retval = new SilkParser.silkFile_return();
125         retval.start = input.LT(1);
126
127         Object root_0 = null;
128
129         SilkParser.silkLine_return silkLine1 = null;
130
131
132         RewriteRuleSubtreeStream stream_silkLine=new RewriteRuleSubtreeStream(adaptor,"rule silkLine");
133         try {
134             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:266:9: ( ( silkLine )* -> ^( Silk ( silkLine )* ) )
135             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:266:11: ( silkLine )*
136             {
137             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:266:11: ( silkLine )*
138             loop1:
139             do {
140                 int alt1=2;
141                 int LA1_0 = input.LA(1);
142
143                 if ( (LA1_0==WhiteSpace||(LA1_0>=LineComment && LA1_0<=FunctionIndent)) ) {
144                     alt1=1;
145                 }
146
147
148                 switch (alt1) {
149                 case 1 :
150                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:266:11: silkLine
151                     {
152                     pushFollow(FOLLOW_silkLine_in_silkFile856);
153                     silkLine1=silkLine();
154
155                     state._fsp--;
156
157                     stream_silkLine.add(silkLine1.getTree());
158
159                     }
160                     break;
161
162                 default :
163                     break loop1;
164                 }
165             } while (true);
166
167
168
169             // AST REWRITE
170             // elements: silkLine
171             // token labels: 
172             // rule labels: retval
173             // token list labels: 
174             // rule list labels: 
175             retval.tree = root_0;
176             RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
177
178             root_0 = (Object)adaptor.nil();
179             // 266:21: -> ^( Silk ( silkLine )* )
180             {
181                 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:266:24: ^( Silk ( silkLine )* )
182                 {
183                 Object root_1 = (Object)adaptor.nil();
184                 root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(Silk, "Silk"), root_1);
185
186                 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:266:31: ( silkLine )*
187                 while ( stream_silkLine.hasNext() ) {
188                     adaptor.addChild(root_1, stream_silkLine.nextTree());
189
190                 }
191                 stream_silkLine.reset();
192
193                 adaptor.addChild(root_0, root_1);
194                 }
195
196             }
197
198             retval.tree = root_0;
199             }
200
201             retval.stop = input.LT(-1);
202
203             retval.tree = (Object)adaptor.rulePostProcessing(root_0);
204             adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
205
206         }
207         catch (RecognitionException re) {
208             reportError(re);
209             recover(input,re);
210         retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
211
212         }
213         finally {
214         }
215         return retval;
216     }
217     // $ANTLR end "silkFile"
218
219     public static class silkLine_return extends ParserRuleReturnScope {
220         Object tree;
221         public Object getTree() { return tree; }
222     };
223
224     // $ANTLR start "silkLine"
225     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:269:1: silkLine : ( silkNode | LineComment | WhiteSpace -> BlankLine );
226     public final SilkParser.silkLine_return silkLine() throws RecognitionException {
227         SilkParser.silkLine_return retval = new SilkParser.silkLine_return();
228         retval.start = input.LT(1);
229
230         Object root_0 = null;
231
232         Token LineComment3=null;
233         Token WhiteSpace4=null;
234         SilkParser.silkNode_return silkNode2 = null;
235
236
237         Object LineComment3_tree=null;
238         Object WhiteSpace4_tree=null;
239         RewriteRuleTokenStream stream_WhiteSpace=new RewriteRuleTokenStream(adaptor,"token WhiteSpace");
240
241         try {
242             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:270:2: ( silkNode | LineComment | WhiteSpace -> BlankLine )
243             int alt2=3;
244             switch ( input.LA(1) ) {
245             case NodeIndent:
246             case FunctionIndent:
247                 {
248                 alt2=1;
249                 }
250                 break;
251             case LineComment:
252                 {
253                 alt2=2;
254                 }
255                 break;
256             case WhiteSpace:
257                 {
258                 alt2=3;
259                 }
260                 break;
261             default:
262                 NoViableAltException nvae =
263                     new NoViableAltException("", 2, 0, input);
264
265                 throw nvae;
266             }
267
268             switch (alt2) {
269                 case 1 :
270                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:270:4: silkNode
271                     {
272                     root_0 = (Object)adaptor.nil();
273
274                     pushFollow(FOLLOW_silkNode_in_silkLine877);
275                     silkNode2=silkNode();
276
277                     state._fsp--;
278
279                     adaptor.addChild(root_0, silkNode2.getTree());
280
281                     }
282                     break;
283                 case 2 :
284                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:4: LineComment
285                     {
286                     root_0 = (Object)adaptor.nil();
287
288                     LineComment3=(Token)match(input,LineComment,FOLLOW_LineComment_in_silkLine883); 
289                     LineComment3_tree = (Object)adaptor.create(LineComment3);
290                     adaptor.addChild(root_0, LineComment3_tree);
291
292
293                     }
294                     break;
295                 case 3 :
296                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:272:4: WhiteSpace
297                     {
298                     WhiteSpace4=(Token)match(input,WhiteSpace,FOLLOW_WhiteSpace_in_silkLine888);  
299                     stream_WhiteSpace.add(WhiteSpace4);
300
301
302
303                     // AST REWRITE
304                     // elements: 
305                     // token labels: 
306                     // rule labels: retval
307                     // token list labels: 
308                     // rule list labels: 
309                     retval.tree = root_0;
310                     RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
311
312                     root_0 = (Object)adaptor.nil();
313                     // 272:15: -> BlankLine
314                     {
315                         adaptor.addChild(root_0, (Object)adaptor.create(BlankLine, "BlankLine"));
316
317                     }
318
319                     retval.tree = root_0;
320                     }
321                     break;
322
323             }
324             retval.stop = input.LT(-1);
325
326             retval.tree = (Object)adaptor.rulePostProcessing(root_0);
327             adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
328
329         }
330         catch (RecognitionException re) {
331             reportError(re);
332             recover(input,re);
333         retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
334
335         }
336         finally {
337         }
338         return retval;
339     }
340     // $ANTLR end "silkLine"
341
342     public static class nodeName_return extends ParserRuleReturnScope {
343         Object tree;
344         public Object getTree() { return tree; }
345     };
346
347     // $ANTLR start "nodeName"
348     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:275:1: fragment nodeName : ( PlainOneLine | String );
349     public final SilkParser.nodeName_return nodeName() throws RecognitionException {
350         SilkParser.nodeName_return retval = new SilkParser.nodeName_return();
351         retval.start = input.LT(1);
352
353         Object root_0 = null;
354
355         Token set5=null;
356
357         Object set5_tree=null;
358
359         try {
360             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:276:9: ( PlainOneLine | String )
361             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:
362             {
363             root_0 = (Object)adaptor.nil();
364
365             set5=(Token)input.LT(1);
366             if ( input.LA(1)==String||input.LA(1)==PlainOneLine ) {
367                 input.consume();
368                 adaptor.addChild(root_0, (Object)adaptor.create(set5));
369                 state.errorRecovery=false;
370             }
371             else {
372                 MismatchedSetException mse = new MismatchedSetException(null,input);
373                 throw mse;
374             }
375
376
377             }
378
379             retval.stop = input.LT(-1);
380
381             retval.tree = (Object)adaptor.rulePostProcessing(root_0);
382             adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
383
384         }
385         catch (RecognitionException re) {
386             reportError(re);
387             recover(input,re);
388         retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
389
390         }
391         finally {
392         }
393         return retval;
394     }
395     // $ANTLR end "nodeName"
396
397     public static class nodeValue_return extends ParserRuleReturnScope {
398         Object tree;
399         public Object getTree() { return tree; }
400     };
401
402     // $ANTLR start "nodeValue"
403     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:278:1: fragment nodeValue : ( function_i -> ^( Function function_i ) | ( PlainOneLine | String ) -> Value[$nodeValue.text] | JSON );
404     public final SilkParser.nodeValue_return nodeValue() throws RecognitionException {
405         SilkParser.nodeValue_return retval = new SilkParser.nodeValue_return();
406         retval.start = input.LT(1);
407
408         Object root_0 = null;
409
410         Token PlainOneLine7=null;
411         Token String8=null;
412         Token JSON9=null;
413         SilkParser.function_i_return function_i6 = null;
414
415
416         Object PlainOneLine7_tree=null;
417         Object String8_tree=null;
418         Object JSON9_tree=null;
419         RewriteRuleTokenStream stream_String=new RewriteRuleTokenStream(adaptor,"token String");
420         RewriteRuleTokenStream stream_PlainOneLine=new RewriteRuleTokenStream(adaptor,"token PlainOneLine");
421         RewriteRuleSubtreeStream stream_function_i=new RewriteRuleSubtreeStream(adaptor,"rule function_i");
422         try {
423             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:280:2: ( function_i -> ^( Function function_i ) | ( PlainOneLine | String ) -> Value[$nodeValue.text] | JSON )
424             int alt4=3;
425             switch ( input.LA(1) ) {
426             case At:
427                 {
428                 alt4=1;
429                 }
430                 break;
431             case String:
432             case PlainOneLine:
433                 {
434                 alt4=2;
435                 }
436                 break;
437             case JSON:
438                 {
439                 alt4=3;
440                 }
441                 break;
442             default:
443                 NoViableAltException nvae =
444                     new NoViableAltException("", 4, 0, input);
445
446                 throw nvae;
447             }
448
449             switch (alt4) {
450                 case 1 :
451                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:280:4: function_i
452                     {
453                     pushFollow(FOLLOW_function_i_in_nodeValue918);
454                     function_i6=function_i();
455
456                     state._fsp--;
457
458                     stream_function_i.add(function_i6.getTree());
459
460
461                     // AST REWRITE
462                     // elements: function_i
463                     // token labels: 
464                     // rule labels: retval
465                     // token list labels: 
466                     // rule list labels: 
467                     retval.tree = root_0;
468                     RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
469
470                     root_0 = (Object)adaptor.nil();
471                     // 280:15: -> ^( Function function_i )
472                     {
473                         // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:280:18: ^( Function function_i )
474                         {
475                         Object root_1 = (Object)adaptor.nil();
476                         root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(Function, "Function"), root_1);
477
478                         adaptor.addChild(root_1, stream_function_i.nextTree());
479
480                         adaptor.addChild(root_0, root_1);
481                         }
482
483                     }
484
485                     retval.tree = root_0;
486                     }
487                     break;
488                 case 2 :
489                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:281:4: ( PlainOneLine | String )
490                     {
491                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:281:4: ( PlainOneLine | String )
492                     int alt3=2;
493                     int LA3_0 = input.LA(1);
494
495                     if ( (LA3_0==PlainOneLine) ) {
496                         alt3=1;
497                     }
498                     else if ( (LA3_0==String) ) {
499                         alt3=2;
500                     }
501                     else {
502                         NoViableAltException nvae =
503                             new NoViableAltException("", 3, 0, input);
504
505                         throw nvae;
506                     }
507                     switch (alt3) {
508                         case 1 :
509                             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:281:5: PlainOneLine
510                             {
511                             PlainOneLine7=(Token)match(input,PlainOneLine,FOLLOW_PlainOneLine_in_nodeValue932);  
512                             stream_PlainOneLine.add(PlainOneLine7);
513
514
515                             }
516                             break;
517                         case 2 :
518                             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:281:20: String
519                             {
520                             String8=(Token)match(input,String,FOLLOW_String_in_nodeValue936);  
521                             stream_String.add(String8);
522
523
524                             }
525                             break;
526
527                     }
528
529
530
531                     // AST REWRITE
532                     // elements: 
533                     // token labels: 
534                     // rule labels: retval
535                     // token list labels: 
536                     // rule list labels: 
537                     retval.tree = root_0;
538                     RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
539
540                     root_0 = (Object)adaptor.nil();
541                     // 281:28: -> Value[$nodeValue.text]
542                     {
543                         adaptor.addChild(root_0, (Object)adaptor.create(Value, input.toString(retval.start,input.LT(-1))));
544
545                     }
546
547                     retval.tree = root_0;
548                     }
549                     break;
550                 case 3 :
551                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:282:4: JSON
552                     {
553                     root_0 = (Object)adaptor.nil();
554
555                     JSON9=(Token)match(input,JSON,FOLLOW_JSON_in_nodeValue947); 
556                     JSON9_tree = (Object)adaptor.create(JSON9);
557                     adaptor.addChild(root_0, JSON9_tree);
558
559
560                     }
561                     break;
562
563             }
564             retval.stop = input.LT(-1);
565
566             retval.tree = (Object)adaptor.rulePostProcessing(root_0);
567             adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
568
569         }
570         catch (RecognitionException re) {
571             reportError(re);
572             recover(input,re);
573         retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
574
575         }
576         finally {
577         }
578         return retval;
579     }
580     // $ANTLR end "nodeValue"
581
582     public static class silkNode_return extends ParserRuleReturnScope {
583         Object tree;
584         public Object getTree() { return tree; }
585     };
586
587     // $ANTLR start "silkNode"
588     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:286:1: silkNode : ( NodeIndent nodeItem -> ^( SilkNode NodeIndent nodeItem ) | NodeIndent ( LParen attributeList RParen )? ( plural )? ( Colon nodeValue )? -> ^( SilkNode NodeIndent ( attributeList )? ( plural )? ( nodeValue )? ) | function );
589     public final SilkParser.silkNode_return silkNode() throws RecognitionException {
590         SilkParser.silkNode_return retval = new SilkParser.silkNode_return();
591         retval.start = input.LT(1);
592
593         Object root_0 = null;
594
595         Token NodeIndent10=null;
596         Token NodeIndent12=null;
597         Token LParen13=null;
598         Token RParen15=null;
599         Token Colon17=null;
600         SilkParser.nodeItem_return nodeItem11 = null;
601
602         SilkParser.attributeList_return attributeList14 = null;
603
604         SilkParser.plural_return plural16 = null;
605
606         SilkParser.nodeValue_return nodeValue18 = null;
607
608         SilkParser.function_return function19 = null;
609
610
611         Object NodeIndent10_tree=null;
612         Object NodeIndent12_tree=null;
613         Object LParen13_tree=null;
614         Object RParen15_tree=null;
615         Object Colon17_tree=null;
616         RewriteRuleTokenStream stream_RParen=new RewriteRuleTokenStream(adaptor,"token RParen");
617         RewriteRuleTokenStream stream_NodeIndent=new RewriteRuleTokenStream(adaptor,"token NodeIndent");
618         RewriteRuleTokenStream stream_Colon=new RewriteRuleTokenStream(adaptor,"token Colon");
619         RewriteRuleTokenStream stream_LParen=new RewriteRuleTokenStream(adaptor,"token LParen");
620         RewriteRuleSubtreeStream stream_nodeItem=new RewriteRuleSubtreeStream(adaptor,"rule nodeItem");
621         RewriteRuleSubtreeStream stream_attributeList=new RewriteRuleSubtreeStream(adaptor,"rule attributeList");
622         RewriteRuleSubtreeStream stream_plural=new RewriteRuleSubtreeStream(adaptor,"rule plural");
623         RewriteRuleSubtreeStream stream_nodeValue=new RewriteRuleSubtreeStream(adaptor,"rule nodeValue");
624         try {
625             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:287:2: ( NodeIndent nodeItem -> ^( SilkNode NodeIndent nodeItem ) | NodeIndent ( LParen attributeList RParen )? ( plural )? ( Colon nodeValue )? -> ^( SilkNode NodeIndent ( attributeList )? ( plural )? ( nodeValue )? ) | function )
626             int alt8=3;
627             int LA8_0 = input.LA(1);
628
629             if ( (LA8_0==NodeIndent) ) {
630                 switch ( input.LA(2) ) {
631                 case EOF:
632                 case WhiteSpace:
633                 case LineComment:
634                 case NodeIndent:
635                 case FunctionIndent:
636                 case LParen:
637                 case Colon:
638                 case Seq:
639                 case TabSeq:
640                 case Star:
641                 case Plus:
642                 case Question:
643                     {
644                     alt8=2;
645                     }
646                     break;
647                 case String:
648                 case PlainOneLine:
649                     {
650                     alt8=1;
651                     }
652                     break;
653                 case At:
654                     {
655                     alt8=3;
656                     }
657                     break;
658                 default:
659                     NoViableAltException nvae =
660                         new NoViableAltException("", 8, 1, input);
661
662                     throw nvae;
663                 }
664
665             }
666             else if ( (LA8_0==FunctionIndent) ) {
667                 alt8=3;
668             }
669             else {
670                 NoViableAltException nvae =
671                     new NoViableAltException("", 8, 0, input);
672
673                 throw nvae;
674             }
675             switch (alt8) {
676                 case 1 :
677                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:287:4: NodeIndent nodeItem
678                     {
679                     NodeIndent10=(Token)match(input,NodeIndent,FOLLOW_NodeIndent_in_silkNode961);  
680                     stream_NodeIndent.add(NodeIndent10);
681
682                     pushFollow(FOLLOW_nodeItem_in_silkNode963);
683                     nodeItem11=nodeItem();
684
685                     state._fsp--;
686
687                     stream_nodeItem.add(nodeItem11.getTree());
688
689
690                     // AST REWRITE
691                     // elements: nodeItem, NodeIndent
692                     // token labels: 
693                     // rule labels: retval
694                     // token list labels: 
695                     // rule list labels: 
696                     retval.tree = root_0;
697                     RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
698
699                     root_0 = (Object)adaptor.nil();
700                     // 287:24: -> ^( SilkNode NodeIndent nodeItem )
701                     {
702                         // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:287:27: ^( SilkNode NodeIndent nodeItem )
703                         {
704                         Object root_1 = (Object)adaptor.nil();
705                         root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(SilkNode, "SilkNode"), root_1);
706
707                         adaptor.addChild(root_1, stream_NodeIndent.nextNode());
708                         adaptor.addChild(root_1, stream_nodeItem.nextTree());
709
710                         adaptor.addChild(root_0, root_1);
711                         }
712
713                     }
714
715                     retval.tree = root_0;
716                     }
717                     break;
718                 case 2 :
719                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:288:4: NodeIndent ( LParen attributeList RParen )? ( plural )? ( Colon nodeValue )?
720                     {
721                     NodeIndent12=(Token)match(input,NodeIndent,FOLLOW_NodeIndent_in_silkNode978);  
722                     stream_NodeIndent.add(NodeIndent12);
723
724                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:288:15: ( LParen attributeList RParen )?
725                     int alt5=2;
726                     int LA5_0 = input.LA(1);
727
728                     if ( (LA5_0==LParen) ) {
729                         alt5=1;
730                     }
731                     switch (alt5) {
732                         case 1 :
733                             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:288:16: LParen attributeList RParen
734                             {
735                             LParen13=(Token)match(input,LParen,FOLLOW_LParen_in_silkNode981);  
736                             stream_LParen.add(LParen13);
737
738                             pushFollow(FOLLOW_attributeList_in_silkNode983);
739                             attributeList14=attributeList();
740
741                             state._fsp--;
742
743                             stream_attributeList.add(attributeList14.getTree());
744                             RParen15=(Token)match(input,RParen,FOLLOW_RParen_in_silkNode985);  
745                             stream_RParen.add(RParen15);
746
747
748                             }
749                             break;
750
751                     }
752
753                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:288:46: ( plural )?
754                     int alt6=2;
755                     int LA6_0 = input.LA(1);
756
757                     if ( ((LA6_0>=Seq && LA6_0<=Star)||LA6_0==Plus||LA6_0==Question) ) {
758                         alt6=1;
759                     }
760                     switch (alt6) {
761                         case 1 :
762                             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:288:46: plural
763                             {
764                             pushFollow(FOLLOW_plural_in_silkNode989);
765                             plural16=plural();
766
767                             state._fsp--;
768
769                             stream_plural.add(plural16.getTree());
770
771                             }
772                             break;
773
774                     }
775
776                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:288:54: ( Colon nodeValue )?
777                     int alt7=2;
778                     int LA7_0 = input.LA(1);
779
780                     if ( (LA7_0==Colon) ) {
781                         alt7=1;
782                     }
783                     switch (alt7) {
784                         case 1 :
785                             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:288:55: Colon nodeValue
786                             {
787                             Colon17=(Token)match(input,Colon,FOLLOW_Colon_in_silkNode993);  
788                             stream_Colon.add(Colon17);
789
790                             pushFollow(FOLLOW_nodeValue_in_silkNode995);
791                             nodeValue18=nodeValue();
792
793                             state._fsp--;
794
795                             stream_nodeValue.add(nodeValue18.getTree());
796
797                             }
798                             break;
799
800                     }
801
802
803
804                     // AST REWRITE
805                     // elements: attributeList, plural, nodeValue, NodeIndent
806                     // token labels: 
807                     // rule labels: retval
808                     // token list labels: 
809                     // rule list labels: 
810                     retval.tree = root_0;
811                     RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
812
813                     root_0 = (Object)adaptor.nil();
814                     // 289:2: -> ^( SilkNode NodeIndent ( attributeList )? ( plural )? ( nodeValue )? )
815                     {
816                         // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:289:5: ^( SilkNode NodeIndent ( attributeList )? ( plural )? ( nodeValue )? )
817                         {
818                         Object root_1 = (Object)adaptor.nil();
819                         root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(SilkNode, "SilkNode"), root_1);
820
821                         adaptor.addChild(root_1, stream_NodeIndent.nextNode());
822                         // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:289:27: ( attributeList )?
823                         if ( stream_attributeList.hasNext() ) {
824                             adaptor.addChild(root_1, stream_attributeList.nextTree());
825
826                         }
827                         stream_attributeList.reset();
828                         // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:289:42: ( plural )?
829                         if ( stream_plural.hasNext() ) {
830                             adaptor.addChild(root_1, stream_plural.nextTree());
831
832                         }
833                         stream_plural.reset();
834                         // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:289:50: ( nodeValue )?
835                         if ( stream_nodeValue.hasNext() ) {
836                             adaptor.addChild(root_1, stream_nodeValue.nextTree());
837
838                         }
839                         stream_nodeValue.reset();
840
841                         adaptor.addChild(root_0, root_1);
842                         }
843
844                     }
845
846                     retval.tree = root_0;
847                     }
848                     break;
849                 case 3 :
850                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:290:4: function
851                     {
852                     root_0 = (Object)adaptor.nil();
853
854                     pushFollow(FOLLOW_function_in_silkNode1020);
855                     function19=function();
856
857                     state._fsp--;
858
859                     adaptor.addChild(root_0, function19.getTree());
860
861                     }
862                     break;
863
864             }
865             retval.stop = input.LT(-1);
866
867             retval.tree = (Object)adaptor.rulePostProcessing(root_0);
868             adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
869
870         }
871         catch (RecognitionException re) {
872             reportError(re);
873             recover(input,re);
874         retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
875
876         }
877         finally {
878         }
879         return retval;
880     }
881     // $ANTLR end "silkNode"
882
883     public static class nodeItem_return extends ParserRuleReturnScope {
884         Object tree;
885         public Object getTree() { return tree; }
886     };
887
888     // $ANTLR start "nodeItem"
889     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:293:1: fragment nodeItem : nodeName ( dataType )? ( LParen attributeList RParen )? ( plural )? ( Colon nodeValue )? -> Name[$nodeName.text.trim()] ( dataType )? ( attributeList )? ( plural )? ( nodeValue )? ;
890     public final SilkParser.nodeItem_return nodeItem() throws RecognitionException {
891         SilkParser.nodeItem_return retval = new SilkParser.nodeItem_return();
892         retval.start = input.LT(1);
893
894         Object root_0 = null;
895
896         Token LParen22=null;
897         Token RParen24=null;
898         Token Colon26=null;
899         SilkParser.nodeName_return nodeName20 = null;
900
901         SilkParser.dataType_return dataType21 = null;
902
903         SilkParser.attributeList_return attributeList23 = null;
904
905         SilkParser.plural_return plural25 = null;
906
907         SilkParser.nodeValue_return nodeValue27 = null;
908
909
910         Object LParen22_tree=null;
911         Object RParen24_tree=null;
912         Object Colon26_tree=null;
913         RewriteRuleTokenStream stream_RParen=new RewriteRuleTokenStream(adaptor,"token RParen");
914         RewriteRuleTokenStream stream_Colon=new RewriteRuleTokenStream(adaptor,"token Colon");
915         RewriteRuleTokenStream stream_LParen=new RewriteRuleTokenStream(adaptor,"token LParen");
916         RewriteRuleSubtreeStream stream_nodeName=new RewriteRuleSubtreeStream(adaptor,"rule nodeName");
917         RewriteRuleSubtreeStream stream_dataType=new RewriteRuleSubtreeStream(adaptor,"rule dataType");
918         RewriteRuleSubtreeStream stream_attributeList=new RewriteRuleSubtreeStream(adaptor,"rule attributeList");
919         RewriteRuleSubtreeStream stream_plural=new RewriteRuleSubtreeStream(adaptor,"rule plural");
920         RewriteRuleSubtreeStream stream_nodeValue=new RewriteRuleSubtreeStream(adaptor,"rule nodeValue");
921         try {
922             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:9: ( nodeName ( dataType )? ( LParen attributeList RParen )? ( plural )? ( Colon nodeValue )? -> Name[$nodeName.text.trim()] ( dataType )? ( attributeList )? ( plural )? ( nodeValue )? )
923             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:11: nodeName ( dataType )? ( LParen attributeList RParen )? ( plural )? ( Colon nodeValue )?
924             {
925             pushFollow(FOLLOW_nodeName_in_nodeItem1033);
926             nodeName20=nodeName();
927
928             state._fsp--;
929
930             stream_nodeName.add(nodeName20.getTree());
931             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:20: ( dataType )?
932             int alt9=2;
933             int LA9_0 = input.LA(1);
934
935             if ( (LA9_0==LBracket) ) {
936                 alt9=1;
937             }
938             switch (alt9) {
939                 case 1 :
940                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:20: dataType
941                     {
942                     pushFollow(FOLLOW_dataType_in_nodeItem1035);
943                     dataType21=dataType();
944
945                     state._fsp--;
946
947                     stream_dataType.add(dataType21.getTree());
948
949                     }
950                     break;
951
952             }
953
954             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:31: ( LParen attributeList RParen )?
955             int alt10=2;
956             int LA10_0 = input.LA(1);
957
958             if ( (LA10_0==LParen) ) {
959                 alt10=1;
960             }
961             switch (alt10) {
962                 case 1 :
963                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:32: LParen attributeList RParen
964                     {
965                     LParen22=(Token)match(input,LParen,FOLLOW_LParen_in_nodeItem1040);  
966                     stream_LParen.add(LParen22);
967
968                     pushFollow(FOLLOW_attributeList_in_nodeItem1042);
969                     attributeList23=attributeList();
970
971                     state._fsp--;
972
973                     stream_attributeList.add(attributeList23.getTree());
974                     RParen24=(Token)match(input,RParen,FOLLOW_RParen_in_nodeItem1044);  
975                     stream_RParen.add(RParen24);
976
977
978                     }
979                     break;
980
981             }
982
983             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:62: ( plural )?
984             int alt11=2;
985             int LA11_0 = input.LA(1);
986
987             if ( ((LA11_0>=Seq && LA11_0<=Star)||LA11_0==Plus||LA11_0==Question) ) {
988                 alt11=1;
989             }
990             switch (alt11) {
991                 case 1 :
992                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:62: plural
993                     {
994                     pushFollow(FOLLOW_plural_in_nodeItem1048);
995                     plural25=plural();
996
997                     state._fsp--;
998
999                     stream_plural.add(plural25.getTree());
1000
1001                     }
1002                     break;
1003
1004             }
1005
1006             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:70: ( Colon nodeValue )?
1007             int alt12=2;
1008             int LA12_0 = input.LA(1);
1009
1010             if ( (LA12_0==Colon) ) {
1011                 alt12=1;
1012             }
1013             switch (alt12) {
1014                 case 1 :
1015                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:71: Colon nodeValue
1016                     {
1017                     Colon26=(Token)match(input,Colon,FOLLOW_Colon_in_nodeItem1052);  
1018                     stream_Colon.add(Colon26);
1019
1020                     pushFollow(FOLLOW_nodeValue_in_nodeItem1054);
1021                     nodeValue27=nodeValue();
1022
1023                     state._fsp--;
1024
1025                     stream_nodeValue.add(nodeValue27.getTree());
1026
1027                     }
1028                     break;
1029
1030             }
1031
1032
1033
1034             // AST REWRITE
1035             // elements: plural, dataType, nodeValue, attributeList
1036             // token labels: 
1037             // rule labels: retval
1038             // token list labels: 
1039             // rule list labels: 
1040             retval.tree = root_0;
1041             RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
1042
1043             root_0 = (Object)adaptor.nil();
1044             // 295:2: -> Name[$nodeName.text.trim()] ( dataType )? ( attributeList )? ( plural )? ( nodeValue )?
1045             {
1046                 adaptor.addChild(root_0, (Object)adaptor.create(Name, (nodeName20!=null?input.toString(nodeName20.start,nodeName20.stop):null).trim()));
1047                 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:295:33: ( dataType )?
1048                 if ( stream_dataType.hasNext() ) {
1049                     adaptor.addChild(root_0, stream_dataType.nextTree());
1050
1051                 }
1052                 stream_dataType.reset();
1053                 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:295:43: ( attributeList )?
1054                 if ( stream_attributeList.hasNext() ) {
1055                     adaptor.addChild(root_0, stream_attributeList.nextTree());
1056
1057                 }
1058                 stream_attributeList.reset();
1059                 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:295:58: ( plural )?
1060                 if ( stream_plural.hasNext() ) {
1061                     adaptor.addChild(root_0, stream_plural.nextTree());
1062
1063                 }
1064                 stream_plural.reset();
1065                 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:295:66: ( nodeValue )?
1066                 if ( stream_nodeValue.hasNext() ) {
1067                     adaptor.addChild(root_0, stream_nodeValue.nextTree());
1068
1069                 }
1070                 stream_nodeValue.reset();
1071
1072             }
1073
1074             retval.tree = root_0;
1075             }
1076
1077             retval.stop = input.LT(-1);
1078
1079             retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1080             adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1081
1082         }
1083         catch (RecognitionException re) {
1084             reportError(re);
1085             recover(input,re);
1086         retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1087
1088         }
1089         finally {
1090         }
1091         return retval;
1092     }
1093     // $ANTLR end "nodeItem"
1094
1095     public static class dataType_return extends ParserRuleReturnScope {
1096         Object tree;
1097         public Object getTree() { return tree; }
1098     };
1099
1100     // $ANTLR start "dataType"
1101     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:298:1: fragment dataType : LBracket dataTypeName RBracket ;
1102     public final SilkParser.dataType_return dataType() throws RecognitionException {
1103         SilkParser.dataType_return retval = new SilkParser.dataType_return();
1104         retval.start = input.LT(1);
1105
1106         Object root_0 = null;
1107
1108         Token LBracket28=null;
1109         Token RBracket30=null;
1110         SilkParser.dataTypeName_return dataTypeName29 = null;
1111
1112
1113         Object LBracket28_tree=null;
1114         Object RBracket30_tree=null;
1115
1116         try {
1117             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:299:9: ( LBracket dataTypeName RBracket )
1118             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:299:11: LBracket dataTypeName RBracket
1119             {
1120             root_0 = (Object)adaptor.nil();
1121
1122             LBracket28=(Token)match(input,LBracket,FOLLOW_LBracket_in_dataType1087); 
1123             pushFollow(FOLLOW_dataTypeName_in_dataType1090);
1124             dataTypeName29=dataTypeName();
1125
1126             state._fsp--;
1127
1128             adaptor.addChild(root_0, dataTypeName29.getTree());
1129             RBracket30=(Token)match(input,RBracket,FOLLOW_RBracket_in_dataType1092); 
1130
1131             }
1132
1133             retval.stop = input.LT(-1);
1134
1135             retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1136             adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1137
1138         }
1139         catch (RecognitionException re) {
1140             reportError(re);
1141             recover(input,re);
1142         retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1143
1144         }
1145         finally {
1146         }
1147         return retval;
1148     }
1149     // $ANTLR end "dataType"
1150
1151     public static class dataTypeName_return extends ParserRuleReturnScope {
1152         Object tree;
1153         public Object getTree() { return tree; }
1154     };
1155
1156     // $ANTLR start "dataTypeName"
1157     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:302:1: fragment dataTypeName : PlainOneLine -> DataType[$dataTypeName.text] ;
1158     public final SilkParser.dataTypeName_return dataTypeName() throws RecognitionException {
1159         SilkParser.dataTypeName_return retval = new SilkParser.dataTypeName_return();
1160         retval.start = input.LT(1);
1161
1162         Object root_0 = null;
1163
1164         Token PlainOneLine31=null;
1165
1166         Object PlainOneLine31_tree=null;
1167         RewriteRuleTokenStream stream_PlainOneLine=new RewriteRuleTokenStream(adaptor,"token PlainOneLine");
1168
1169         try {
1170             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:303:13: ( PlainOneLine -> DataType[$dataTypeName.text] )
1171             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:303:15: PlainOneLine
1172             {
1173             PlainOneLine31=(Token)match(input,PlainOneLine,FOLLOW_PlainOneLine_in_dataTypeName1105);  
1174             stream_PlainOneLine.add(PlainOneLine31);
1175
1176
1177
1178             // AST REWRITE
1179             // elements: 
1180             // token labels: 
1181             // rule labels: retval
1182             // token list labels: 
1183             // rule list labels: 
1184             retval.tree = root_0;
1185             RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
1186
1187             root_0 = (Object)adaptor.nil();
1188             // 304:2: -> DataType[$dataTypeName.text]
1189             {
1190                 adaptor.addChild(root_0, (Object)adaptor.create(DataType, input.toString(retval.start,input.LT(-1))));
1191
1192             }
1193
1194             retval.tree = root_0;
1195             }
1196
1197             retval.stop = input.LT(-1);
1198
1199             retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1200             adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1201
1202         }
1203         catch (RecognitionException re) {
1204             reportError(re);
1205             recover(input,re);
1206         retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1207
1208         }
1209         finally {
1210         }
1211         return retval;
1212     }
1213     // $ANTLR end "dataTypeName"
1214
1215     public static class attributeList_return extends ParserRuleReturnScope {
1216         Object tree;
1217         public Object getTree() { return tree; }
1218     };
1219
1220     // $ANTLR start "attributeList"
1221     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:307:1: fragment attributeList : attributeItem ( Comma attributeItem )* ;
1222     public final SilkParser.attributeList_return attributeList() throws RecognitionException {
1223         SilkParser.attributeList_return retval = new SilkParser.attributeList_return();
1224         retval.start = input.LT(1);
1225
1226         Object root_0 = null;
1227
1228         Token Comma33=null;
1229         SilkParser.attributeItem_return attributeItem32 = null;
1230
1231         SilkParser.attributeItem_return attributeItem34 = null;
1232
1233
1234         Object Comma33_tree=null;
1235
1236         try {
1237             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:308:14: ( attributeItem ( Comma attributeItem )* )
1238             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:308:16: attributeItem ( Comma attributeItem )*
1239             {
1240             root_0 = (Object)adaptor.nil();
1241
1242             pushFollow(FOLLOW_attributeItem_in_attributeList1125);
1243             attributeItem32=attributeItem();
1244
1245             state._fsp--;
1246
1247             adaptor.addChild(root_0, attributeItem32.getTree());
1248             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:308:30: ( Comma attributeItem )*
1249             loop13:
1250             do {
1251                 int alt13=2;
1252                 int LA13_0 = input.LA(1);
1253
1254                 if ( (LA13_0==Comma) ) {
1255                     alt13=1;
1256                 }
1257
1258
1259                 switch (alt13) {
1260                 case 1 :
1261                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:308:31: Comma attributeItem
1262                     {
1263                     Comma33=(Token)match(input,Comma,FOLLOW_Comma_in_attributeList1128); 
1264                     pushFollow(FOLLOW_attributeItem_in_attributeList1131);
1265                     attributeItem34=attributeItem();
1266
1267                     state._fsp--;
1268
1269                     adaptor.addChild(root_0, attributeItem34.getTree());
1270
1271                     }
1272                     break;
1273
1274                 default :
1275                     break loop13;
1276                 }
1277             } while (true);
1278
1279
1280             }
1281
1282             retval.stop = input.LT(-1);
1283
1284             retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1285             adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1286
1287         }
1288         catch (RecognitionException re) {
1289             reportError(re);
1290             recover(input,re);
1291         retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1292
1293         }
1294         finally {
1295         }
1296         return retval;
1297     }
1298     // $ANTLR end "attributeList"
1299
1300     public static class attributeItem_return extends ParserRuleReturnScope {
1301         Object tree;
1302         public Object getTree() { return tree; }
1303     };
1304
1305     // $ANTLR start "attributeItem"
1306     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:310:1: fragment attributeItem : nodeItem -> ^( SilkNode nodeItem ) ;
1307     public final SilkParser.attributeItem_return attributeItem() throws RecognitionException {
1308         SilkParser.attributeItem_return retval = new SilkParser.attributeItem_return();
1309         retval.start = input.LT(1);
1310
1311         Object root_0 = null;
1312
1313         SilkParser.nodeItem_return nodeItem35 = null;
1314
1315
1316         RewriteRuleSubtreeStream stream_nodeItem=new RewriteRuleSubtreeStream(adaptor,"rule nodeItem");
1317         try {
1318             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:311:14: ( nodeItem -> ^( SilkNode nodeItem ) )
1319             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:311:16: nodeItem
1320             {
1321             pushFollow(FOLLOW_nodeItem_in_attributeItem1144);
1322             nodeItem35=nodeItem();
1323
1324             state._fsp--;
1325
1326             stream_nodeItem.add(nodeItem35.getTree());
1327
1328
1329             // AST REWRITE
1330             // elements: nodeItem
1331             // token labels: 
1332             // rule labels: retval
1333             // token list labels: 
1334             // rule list labels: 
1335             retval.tree = root_0;
1336             RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
1337
1338             root_0 = (Object)adaptor.nil();
1339             // 311:25: -> ^( SilkNode nodeItem )
1340             {
1341                 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:311:28: ^( SilkNode nodeItem )
1342                 {
1343                 Object root_1 = (Object)adaptor.nil();
1344                 root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(SilkNode, "SilkNode"), root_1);
1345
1346                 adaptor.addChild(root_1, stream_nodeItem.nextTree());
1347
1348                 adaptor.addChild(root_0, root_1);
1349                 }
1350
1351             }
1352
1353             retval.tree = root_0;
1354             }
1355
1356             retval.stop = input.LT(-1);
1357
1358             retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1359             adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1360
1361         }
1362         catch (RecognitionException re) {
1363             reportError(re);
1364             recover(input,re);
1365         retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1366
1367         }
1368         finally {
1369         }
1370         return retval;
1371     }
1372     // $ANTLR end "attributeItem"
1373
1374     public static class seqseq_return extends ParserRuleReturnScope {
1375         Object tree;
1376         public Object getTree() { return tree; }
1377     };
1378
1379     // $ANTLR start "seqseq"
1380     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:313:1: fragment seqseq : Seq Seq ;
1381     public final SilkParser.seqseq_return seqseq() throws RecognitionException {
1382         SilkParser.seqseq_return retval = new SilkParser.seqseq_return();
1383         retval.start = input.LT(1);
1384
1385         Object root_0 = null;
1386
1387         Token Seq36=null;
1388         Token Seq37=null;
1389
1390         Object Seq36_tree=null;
1391         Object Seq37_tree=null;
1392
1393         try {
1394             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:314:7: ( Seq Seq )
1395             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:314:9: Seq Seq
1396             {
1397             root_0 = (Object)adaptor.nil();
1398
1399             Seq36=(Token)match(input,Seq,FOLLOW_Seq_in_seqseq1161); 
1400             Seq36_tree = (Object)adaptor.create(Seq36);
1401             adaptor.addChild(root_0, Seq36_tree);
1402
1403             Seq37=(Token)match(input,Seq,FOLLOW_Seq_in_seqseq1163); 
1404             Seq37_tree = (Object)adaptor.create(Seq37);
1405             adaptor.addChild(root_0, Seq37_tree);
1406
1407
1408             }
1409
1410             retval.stop = input.LT(-1);
1411
1412             retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1413             adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1414
1415         }
1416         catch (RecognitionException re) {
1417             reportError(re);
1418             recover(input,re);
1419         retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1420
1421         }
1422         finally {
1423         }
1424         return retval;
1425     }
1426     // $ANTLR end "seqseq"
1427
1428     public static class plural_return extends ParserRuleReturnScope {
1429         Object tree;
1430         public Object getTree() { return tree; }
1431     };
1432
1433     // $ANTLR start "plural"
1434     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:316:1: fragment plural : ( Star -> Occurrence[\"ZERO_OR_MORE\"] | Plus -> Occurrence[\"ONE_OR_MORE\"] | Question -> Occurrence[\"ZERO_OR_ONE\"] | seqseq -> Occurrence[\"MULTILINE_SEQUENCE\"] | Seq -> Occurrence[\"SEQUENCE\"] | TabSeq -> Occurrence[\"TABBED_SEQUENCE\"] );
1435     public final SilkParser.plural_return plural() throws RecognitionException {
1436         SilkParser.plural_return retval = new SilkParser.plural_return();
1437         retval.start = input.LT(1);
1438
1439         Object root_0 = null;
1440
1441         Token Star38=null;
1442         Token Plus39=null;
1443         Token Question40=null;
1444         Token Seq42=null;
1445         Token TabSeq43=null;
1446         SilkParser.seqseq_return seqseq41 = null;
1447
1448
1449         Object Star38_tree=null;
1450         Object Plus39_tree=null;
1451         Object Question40_tree=null;
1452         Object Seq42_tree=null;
1453         Object TabSeq43_tree=null;
1454         RewriteRuleTokenStream stream_Plus=new RewriteRuleTokenStream(adaptor,"token Plus");
1455         RewriteRuleTokenStream stream_TabSeq=new RewriteRuleTokenStream(adaptor,"token TabSeq");
1456         RewriteRuleTokenStream stream_Question=new RewriteRuleTokenStream(adaptor,"token Question");
1457         RewriteRuleTokenStream stream_Star=new RewriteRuleTokenStream(adaptor,"token Star");
1458         RewriteRuleTokenStream stream_Seq=new RewriteRuleTokenStream(adaptor,"token Seq");
1459         RewriteRuleSubtreeStream stream_seqseq=new RewriteRuleSubtreeStream(adaptor,"rule seqseq");
1460         try {
1461             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:318:2: ( Star -> Occurrence[\"ZERO_OR_MORE\"] | Plus -> Occurrence[\"ONE_OR_MORE\"] | Question -> Occurrence[\"ZERO_OR_ONE\"] | seqseq -> Occurrence[\"MULTILINE_SEQUENCE\"] | Seq -> Occurrence[\"SEQUENCE\"] | TabSeq -> Occurrence[\"TABBED_SEQUENCE\"] )
1462             int alt14=6;
1463             switch ( input.LA(1) ) {
1464             case Star:
1465                 {
1466                 alt14=1;
1467                 }
1468                 break;
1469             case Plus:
1470                 {
1471                 alt14=2;
1472                 }
1473                 break;
1474             case Question:
1475                 {
1476                 alt14=3;
1477                 }
1478                 break;
1479             case Seq:
1480                 {
1481                 int LA14_4 = input.LA(2);
1482
1483                 if ( (LA14_4==Seq) ) {
1484                     alt14=4;
1485                 }
1486                 else if ( (LA14_4==EOF||LA14_4==WhiteSpace||(LA14_4>=LineComment && LA14_4<=FunctionIndent)||(LA14_4>=RParen && LA14_4<=Colon)) ) {
1487                     alt14=5;
1488                 }
1489                 else {
1490                     NoViableAltException nvae =
1491                         new NoViableAltException("", 14, 4, input);
1492
1493                     throw nvae;
1494                 }
1495                 }
1496                 break;
1497             case TabSeq:
1498                 {
1499                 alt14=6;
1500                 }
1501                 break;
1502             default:
1503                 NoViableAltException nvae =
1504                     new NoViableAltException("", 14, 0, input);
1505
1506                 throw nvae;
1507             }
1508
1509             switch (alt14) {
1510                 case 1 :
1511                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:318:4: Star
1512                     {
1513                     Star38=(Token)match(input,Star,FOLLOW_Star_in_plural1174);  
1514                     stream_Star.add(Star38);
1515
1516
1517
1518                     // AST REWRITE
1519                     // elements: 
1520                     // token labels: 
1521                     // rule labels: retval
1522                     // token list labels: 
1523                     // rule list labels: 
1524                     retval.tree = root_0;
1525                     RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
1526
1527                     root_0 = (Object)adaptor.nil();
1528                     // 318:9: -> Occurrence[\"ZERO_OR_MORE\"]
1529                     {
1530                         adaptor.addChild(root_0, (Object)adaptor.create(Occurrence, "ZERO_OR_MORE"));
1531
1532                     }
1533
1534                     retval.tree = root_0;
1535                     }
1536                     break;
1537                 case 2 :
1538                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:319:4: Plus
1539                     {
1540                     Plus39=(Token)match(input,Plus,FOLLOW_Plus_in_plural1184);  
1541                     stream_Plus.add(Plus39);
1542
1543
1544
1545                     // AST REWRITE
1546                     // elements: 
1547                     // token labels: 
1548                     // rule labels: retval
1549                     // token list labels: 
1550                     // rule list labels: 
1551                     retval.tree = root_0;
1552                     RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
1553
1554                     root_0 = (Object)adaptor.nil();
1555                     // 319:9: -> Occurrence[\"ONE_OR_MORE\"]
1556                     {
1557                         adaptor.addChild(root_0, (Object)adaptor.create(Occurrence, "ONE_OR_MORE"));
1558
1559                     }
1560
1561                     retval.tree = root_0;
1562                     }
1563                     break;
1564                 case 3 :
1565                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:320:4: Question
1566                     {
1567                     Question40=(Token)match(input,Question,FOLLOW_Question_in_plural1194);  
1568                     stream_Question.add(Question40);
1569
1570
1571
1572                     // AST REWRITE
1573                     // elements: 
1574                     // token labels: 
1575                     // rule labels: retval
1576                     // token list labels: 
1577                     // rule list labels: 
1578                     retval.tree = root_0;
1579                     RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
1580
1581                     root_0 = (Object)adaptor.nil();
1582                     // 320:13: -> Occurrence[\"ZERO_OR_ONE\"]
1583                     {
1584                         adaptor.addChild(root_0, (Object)adaptor.create(Occurrence, "ZERO_OR_ONE"));
1585
1586                     }
1587
1588                     retval.tree = root_0;
1589                     }
1590                     break;
1591                 case 4 :
1592                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:321:4: seqseq
1593                     {
1594                     pushFollow(FOLLOW_seqseq_in_plural1204);
1595                     seqseq41=seqseq();
1596
1597                     state._fsp--;
1598
1599                     stream_seqseq.add(seqseq41.getTree());
1600
1601
1602                     // AST REWRITE
1603                     // elements: 
1604                     // token labels: 
1605                     // rule labels: retval
1606                     // token list labels: 
1607                     // rule list labels: 
1608                     retval.tree = root_0;
1609                     RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
1610
1611                     root_0 = (Object)adaptor.nil();
1612                     // 321:11: -> Occurrence[\"MULTILINE_SEQUENCE\"]
1613                     {
1614                         adaptor.addChild(root_0, (Object)adaptor.create(Occurrence, "MULTILINE_SEQUENCE"));
1615
1616                     }
1617
1618                     retval.tree = root_0;
1619                     }
1620                     break;
1621                 case 5 :
1622                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:322:4: Seq
1623                     {
1624                     Seq42=(Token)match(input,Seq,FOLLOW_Seq_in_plural1214);  
1625                     stream_Seq.add(Seq42);
1626
1627
1628
1629                     // AST REWRITE
1630                     // elements: 
1631                     // token labels: 
1632                     // rule labels: retval
1633                     // token list labels: 
1634                     // rule list labels: 
1635                     retval.tree = root_0;
1636                     RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
1637
1638                     root_0 = (Object)adaptor.nil();
1639                     // 322:8: -> Occurrence[\"SEQUENCE\"]
1640                     {
1641                         adaptor.addChild(root_0, (Object)adaptor.create(Occurrence, "SEQUENCE"));
1642
1643                     }
1644
1645                     retval.tree = root_0;
1646                     }
1647                     break;
1648                 case 6 :
1649                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:323:4: TabSeq
1650                     {
1651                     TabSeq43=(Token)match(input,TabSeq,FOLLOW_TabSeq_in_plural1224);  
1652                     stream_TabSeq.add(TabSeq43);
1653
1654
1655
1656                     // AST REWRITE
1657                     // elements: 
1658                     // token labels: 
1659                     // rule labels: retval
1660                     // token list labels: 
1661                     // rule list labels: 
1662                     retval.tree = root_0;
1663                     RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
1664
1665                     root_0 = (Object)adaptor.nil();
1666                     // 323:11: -> Occurrence[\"TABBED_SEQUENCE\"]
1667                     {
1668                         adaptor.addChild(root_0, (Object)adaptor.create(Occurrence, "TABBED_SEQUENCE"));
1669
1670                     }
1671
1672                     retval.tree = root_0;
1673                     }
1674                     break;
1675
1676             }
1677             retval.stop = input.LT(-1);
1678
1679             retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1680             adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1681
1682         }
1683         catch (RecognitionException re) {
1684             reportError(re);
1685             recover(input,re);
1686         retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1687
1688         }
1689         finally {
1690         }
1691         return retval;
1692     }
1693     // $ANTLR end "plural"
1694
1695     public static class function_return extends ParserRuleReturnScope {
1696         Object tree;
1697         public Object getTree() { return tree; }
1698     };
1699
1700     // $ANTLR start "function"
1701     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:326:1: function : ( NodeIndent function_i -> ^( Function NodeIndent function_i ) | FunctionIndent PlainOneLine LParen ( functionArg ( Comma functionArg )* )? RParen -> ^( Function NodeIndent[$FunctionIndent.text] Name[$PlainOneLine.text.trim()] ( functionArg )* ) );
1702     public final SilkParser.function_return function() throws RecognitionException {
1703         SilkParser.function_return retval = new SilkParser.function_return();
1704         retval.start = input.LT(1);
1705
1706         Object root_0 = null;
1707
1708         Token NodeIndent44=null;
1709         Token FunctionIndent46=null;
1710         Token PlainOneLine47=null;
1711         Token LParen48=null;
1712         Token Comma50=null;
1713         Token RParen52=null;
1714         SilkParser.function_i_return function_i45 = null;
1715
1716         SilkParser.functionArg_return functionArg49 = null;
1717
1718         SilkParser.functionArg_return functionArg51 = null;
1719
1720
1721         Object NodeIndent44_tree=null;
1722         Object FunctionIndent46_tree=null;
1723         Object PlainOneLine47_tree=null;
1724         Object LParen48_tree=null;
1725         Object Comma50_tree=null;
1726         Object RParen52_tree=null;
1727         RewriteRuleTokenStream stream_FunctionIndent=new RewriteRuleTokenStream(adaptor,"token FunctionIndent");
1728         RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
1729         RewriteRuleTokenStream stream_RParen=new RewriteRuleTokenStream(adaptor,"token RParen");
1730         RewriteRuleTokenStream stream_NodeIndent=new RewriteRuleTokenStream(adaptor,"token NodeIndent");
1731         RewriteRuleTokenStream stream_PlainOneLine=new RewriteRuleTokenStream(adaptor,"token PlainOneLine");
1732         RewriteRuleTokenStream stream_LParen=new RewriteRuleTokenStream(adaptor,"token LParen");
1733         RewriteRuleSubtreeStream stream_function_i=new RewriteRuleSubtreeStream(adaptor,"rule function_i");
1734         RewriteRuleSubtreeStream stream_functionArg=new RewriteRuleSubtreeStream(adaptor,"rule functionArg");
1735         try {
1736             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:327:2: ( NodeIndent function_i -> ^( Function NodeIndent function_i ) | FunctionIndent PlainOneLine LParen ( functionArg ( Comma functionArg )* )? RParen -> ^( Function NodeIndent[$FunctionIndent.text] Name[$PlainOneLine.text.trim()] ( functionArg )* ) )
1737             int alt17=2;
1738             int LA17_0 = input.LA(1);
1739
1740             if ( (LA17_0==NodeIndent) ) {
1741                 alt17=1;
1742             }
1743             else if ( (LA17_0==FunctionIndent) ) {
1744                 alt17=2;
1745             }
1746             else {
1747                 NoViableAltException nvae =
1748                     new NoViableAltException("", 17, 0, input);
1749
1750                 throw nvae;
1751             }
1752             switch (alt17) {
1753                 case 1 :
1754                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:327:4: NodeIndent function_i
1755                     {
1756                     NodeIndent44=(Token)match(input,NodeIndent,FOLLOW_NodeIndent_in_function1240);  
1757                     stream_NodeIndent.add(NodeIndent44);
1758
1759                     pushFollow(FOLLOW_function_i_in_function1242);
1760                     function_i45=function_i();
1761
1762                     state._fsp--;
1763
1764                     stream_function_i.add(function_i45.getTree());
1765
1766
1767                     // AST REWRITE
1768                     // elements: function_i, NodeIndent
1769                     // token labels: 
1770                     // rule labels: retval
1771                     // token list labels: 
1772                     // rule list labels: 
1773                     retval.tree = root_0;
1774                     RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
1775
1776                     root_0 = (Object)adaptor.nil();
1777                     // 328:2: -> ^( Function NodeIndent function_i )
1778                     {
1779                         // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:328:5: ^( Function NodeIndent function_i )
1780                         {
1781                         Object root_1 = (Object)adaptor.nil();
1782                         root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(Function, "Function"), root_1);
1783
1784                         adaptor.addChild(root_1, stream_NodeIndent.nextNode());
1785                         adaptor.addChild(root_1, stream_function_i.nextTree());
1786
1787                         adaptor.addChild(root_0, root_1);
1788                         }
1789
1790                     }
1791
1792                     retval.tree = root_0;
1793                     }
1794                     break;
1795                 case 2 :
1796                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:329:4: FunctionIndent PlainOneLine LParen ( functionArg ( Comma functionArg )* )? RParen
1797                     {
1798                     FunctionIndent46=(Token)match(input,FunctionIndent,FOLLOW_FunctionIndent_in_function1258);  
1799                     stream_FunctionIndent.add(FunctionIndent46);
1800
1801                     PlainOneLine47=(Token)match(input,PlainOneLine,FOLLOW_PlainOneLine_in_function1260);  
1802                     stream_PlainOneLine.add(PlainOneLine47);
1803
1804                     LParen48=(Token)match(input,LParen,FOLLOW_LParen_in_function1262);  
1805                     stream_LParen.add(LParen48);
1806
1807                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:329:39: ( functionArg ( Comma functionArg )* )?
1808                     int alt16=2;
1809                     int LA16_0 = input.LA(1);
1810
1811                     if ( (LA16_0==At||LA16_0==String||(LA16_0>=PlainOneLine && LA16_0<=JSON)) ) {
1812                         alt16=1;
1813                     }
1814                     switch (alt16) {
1815                         case 1 :
1816                             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:329:40: functionArg ( Comma functionArg )*
1817                             {
1818                             pushFollow(FOLLOW_functionArg_in_function1265);
1819                             functionArg49=functionArg();
1820
1821                             state._fsp--;
1822
1823                             stream_functionArg.add(functionArg49.getTree());
1824                             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:329:52: ( Comma functionArg )*
1825                             loop15:
1826                             do {
1827                                 int alt15=2;
1828                                 int LA15_0 = input.LA(1);
1829
1830                                 if ( (LA15_0==Comma) ) {
1831                                     alt15=1;
1832                                 }
1833
1834
1835                                 switch (alt15) {
1836                                 case 1 :
1837                                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:329:53: Comma functionArg
1838                                     {
1839                                     Comma50=(Token)match(input,Comma,FOLLOW_Comma_in_function1268);  
1840                                     stream_Comma.add(Comma50);
1841
1842                                     pushFollow(FOLLOW_functionArg_in_function1270);
1843                                     functionArg51=functionArg();
1844
1845                                     state._fsp--;
1846
1847                                     stream_functionArg.add(functionArg51.getTree());
1848
1849                                     }
1850                                     break;
1851
1852                                 default :
1853                                     break loop15;
1854                                 }
1855                             } while (true);
1856
1857
1858                             }
1859                             break;
1860
1861                     }
1862
1863                     RParen52=(Token)match(input,RParen,FOLLOW_RParen_in_function1276);  
1864                     stream_RParen.add(RParen52);
1865
1866
1867
1868                     // AST REWRITE
1869                     // elements: functionArg
1870                     // token labels: 
1871                     // rule labels: retval
1872                     // token list labels: 
1873                     // rule list labels: 
1874                     retval.tree = root_0;
1875                     RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
1876
1877                     root_0 = (Object)adaptor.nil();
1878                     // 330:2: -> ^( Function NodeIndent[$FunctionIndent.text] Name[$PlainOneLine.text.trim()] ( functionArg )* )
1879                     {
1880                         // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:330:5: ^( Function NodeIndent[$FunctionIndent.text] Name[$PlainOneLine.text.trim()] ( functionArg )* )
1881                         {
1882                         Object root_1 = (Object)adaptor.nil();
1883                         root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(Function, "Function"), root_1);
1884
1885                         adaptor.addChild(root_1, (Object)adaptor.create(NodeIndent, (FunctionIndent46!=null?FunctionIndent46.getText():null)));
1886                         adaptor.addChild(root_1, (Object)adaptor.create(Name, (PlainOneLine47!=null?PlainOneLine47.getText():null).trim()));
1887                         // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:330:81: ( functionArg )*
1888                         while ( stream_functionArg.hasNext() ) {
1889                             adaptor.addChild(root_1, stream_functionArg.nextTree());
1890
1891                         }
1892                         stream_functionArg.reset();
1893
1894                         adaptor.addChild(root_0, root_1);
1895                         }
1896
1897                     }
1898
1899                     retval.tree = root_0;
1900                     }
1901                     break;
1902
1903             }
1904             retval.stop = input.LT(-1);
1905
1906             retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1907             adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1908
1909         }
1910         catch (RecognitionException re) {
1911             reportError(re);
1912             recover(input,re);
1913         retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1914
1915         }
1916         finally {
1917         }
1918         return retval;
1919     }
1920     // $ANTLR end "function"
1921
1922     public static class function_i_return extends ParserRuleReturnScope {
1923         Object tree;
1924         public Object getTree() { return tree; }
1925     };
1926
1927     // $ANTLR start "function_i"
1928     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:333:1: fragment function_i : At PlainOneLine LParen ( functionArg ( Comma functionArg )* )? RParen -> Name[$PlainOneLine.text.trim()] ( functionArg )* ;
1929     public final SilkParser.function_i_return function_i() throws RecognitionException {
1930         SilkParser.function_i_return retval = new SilkParser.function_i_return();
1931         retval.start = input.LT(1);
1932
1933         Object root_0 = null;
1934
1935         Token At53=null;
1936         Token PlainOneLine54=null;
1937         Token LParen55=null;
1938         Token Comma57=null;
1939         Token RParen59=null;
1940         SilkParser.functionArg_return functionArg56 = null;
1941
1942         SilkParser.functionArg_return functionArg58 = null;
1943
1944
1945         Object At53_tree=null;
1946         Object PlainOneLine54_tree=null;
1947         Object LParen55_tree=null;
1948         Object Comma57_tree=null;
1949         Object RParen59_tree=null;
1950         RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
1951         RewriteRuleTokenStream stream_RParen=new RewriteRuleTokenStream(adaptor,"token RParen");
1952         RewriteRuleTokenStream stream_PlainOneLine=new RewriteRuleTokenStream(adaptor,"token PlainOneLine");
1953         RewriteRuleTokenStream stream_At=new RewriteRuleTokenStream(adaptor,"token At");
1954         RewriteRuleTokenStream stream_LParen=new RewriteRuleTokenStream(adaptor,"token LParen");
1955         RewriteRuleSubtreeStream stream_functionArg=new RewriteRuleSubtreeStream(adaptor,"rule functionArg");
1956         try {
1957             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:334:11: ( At PlainOneLine LParen ( functionArg ( Comma functionArg )* )? RParen -> Name[$PlainOneLine.text.trim()] ( functionArg )* )
1958             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:334:13: At PlainOneLine LParen ( functionArg ( Comma functionArg )* )? RParen
1959             {
1960             At53=(Token)match(input,At,FOLLOW_At_in_function_i1303);  
1961             stream_At.add(At53);
1962
1963             PlainOneLine54=(Token)match(input,PlainOneLine,FOLLOW_PlainOneLine_in_function_i1305);  
1964             stream_PlainOneLine.add(PlainOneLine54);
1965
1966             LParen55=(Token)match(input,LParen,FOLLOW_LParen_in_function_i1307);  
1967             stream_LParen.add(LParen55);
1968
1969             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:334:36: ( functionArg ( Comma functionArg )* )?
1970             int alt19=2;
1971             int LA19_0 = input.LA(1);
1972
1973             if ( (LA19_0==At||LA19_0==String||(LA19_0>=PlainOneLine && LA19_0<=JSON)) ) {
1974                 alt19=1;
1975             }
1976             switch (alt19) {
1977                 case 1 :
1978                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:334:37: functionArg ( Comma functionArg )*
1979                     {
1980                     pushFollow(FOLLOW_functionArg_in_function_i1310);
1981                     functionArg56=functionArg();
1982
1983                     state._fsp--;
1984
1985                     stream_functionArg.add(functionArg56.getTree());
1986                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:334:49: ( Comma functionArg )*
1987                     loop18:
1988                     do {
1989                         int alt18=2;
1990                         int LA18_0 = input.LA(1);
1991
1992                         if ( (LA18_0==Comma) ) {
1993                             alt18=1;
1994                         }
1995
1996
1997                         switch (alt18) {
1998                         case 1 :
1999                             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:334:50: Comma functionArg
2000                             {
2001                             Comma57=(Token)match(input,Comma,FOLLOW_Comma_in_function_i1313);  
2002                             stream_Comma.add(Comma57);
2003
2004                             pushFollow(FOLLOW_functionArg_in_function_i1315);
2005                             functionArg58=functionArg();
2006
2007                             state._fsp--;
2008
2009                             stream_functionArg.add(functionArg58.getTree());
2010
2011                             }
2012                             break;
2013
2014                         default :
2015                             break loop18;
2016                         }
2017                     } while (true);
2018
2019
2020                     }
2021                     break;
2022
2023             }
2024
2025             RParen59=(Token)match(input,RParen,FOLLOW_RParen_in_function_i1321);  
2026             stream_RParen.add(RParen59);
2027
2028
2029
2030             // AST REWRITE
2031             // elements: functionArg
2032             // token labels: 
2033             // rule labels: retval
2034             // token list labels: 
2035             // rule list labels: 
2036             retval.tree = root_0;
2037             RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
2038
2039             root_0 = (Object)adaptor.nil();
2040             // 335:2: -> Name[$PlainOneLine.text.trim()] ( functionArg )*
2041             {
2042                 adaptor.addChild(root_0, (Object)adaptor.create(Name, (PlainOneLine54!=null?PlainOneLine54.getText():null).trim()));
2043                 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:335:37: ( functionArg )*
2044                 while ( stream_functionArg.hasNext() ) {
2045                     adaptor.addChild(root_0, stream_functionArg.nextTree());
2046
2047                 }
2048                 stream_functionArg.reset();
2049
2050             }
2051
2052             retval.tree = root_0;
2053             }
2054
2055             retval.stop = input.LT(-1);
2056
2057             retval.tree = (Object)adaptor.rulePostProcessing(root_0);
2058             adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
2059
2060         }
2061         catch (RecognitionException re) {
2062             reportError(re);
2063             recover(input,re);
2064         retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
2065
2066         }
2067         finally {
2068         }
2069         return retval;
2070     }
2071     // $ANTLR end "function_i"
2072
2073     public static class functionArg_return extends ParserRuleReturnScope {
2074         Object tree;
2075         public Object getTree() { return tree; }
2076     };
2077
2078     // $ANTLR start "functionArg"
2079     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:338:1: fragment functionArg : ( nodeValue -> Argument[$functionArg.text] | nodeName Colon nodeValue -> ^( KeyValuePair Key[$nodeName.text.trim()] Value[$nodeValue.text.trim()] ) );
2080     public final SilkParser.functionArg_return functionArg() throws RecognitionException {
2081         SilkParser.functionArg_return retval = new SilkParser.functionArg_return();
2082         retval.start = input.LT(1);
2083
2084         Object root_0 = null;
2085
2086         Token Colon62=null;
2087         SilkParser.nodeValue_return nodeValue60 = null;
2088
2089         SilkParser.nodeName_return nodeName61 = null;
2090
2091         SilkParser.nodeValue_return nodeValue63 = null;
2092
2093
2094         Object Colon62_tree=null;
2095         RewriteRuleTokenStream stream_Colon=new RewriteRuleTokenStream(adaptor,"token Colon");
2096         RewriteRuleSubtreeStream stream_nodeName=new RewriteRuleSubtreeStream(adaptor,"rule nodeName");
2097         RewriteRuleSubtreeStream stream_nodeValue=new RewriteRuleSubtreeStream(adaptor,"rule nodeValue");
2098         try {
2099             // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:340:2: ( nodeValue -> Argument[$functionArg.text] | nodeName Colon nodeValue -> ^( KeyValuePair Key[$nodeName.text.trim()] Value[$nodeValue.text.trim()] ) )
2100             int alt20=2;
2101             switch ( input.LA(1) ) {
2102             case At:
2103             case JSON:
2104                 {
2105                 alt20=1;
2106                 }
2107                 break;
2108             case PlainOneLine:
2109                 {
2110                 int LA20_2 = input.LA(2);
2111
2112                 if ( (LA20_2==Colon) ) {
2113                     alt20=2;
2114                 }
2115                 else if ( ((LA20_2>=RParen && LA20_2<=Comma)) ) {
2116                     alt20=1;
2117                 }
2118                 else {
2119                     NoViableAltException nvae =
2120                         new NoViableAltException("", 20, 2, input);
2121
2122                     throw nvae;
2123                 }
2124                 }
2125                 break;
2126             case String:
2127                 {
2128                 int LA20_3 = input.LA(2);
2129
2130                 if ( (LA20_3==Colon) ) {
2131                     alt20=2;
2132                 }
2133                 else if ( ((LA20_3>=RParen && LA20_3<=Comma)) ) {
2134                     alt20=1;
2135                 }
2136                 else {
2137                     NoViableAltException nvae =
2138                         new NoViableAltException("", 20, 3, input);
2139
2140                     throw nvae;
2141                 }
2142                 }
2143                 break;
2144             default:
2145                 NoViableAltException nvae =
2146                     new NoViableAltException("", 20, 0, input);
2147
2148                 throw nvae;
2149             }
2150
2151             switch (alt20) {
2152                 case 1 :
2153                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:340:4: nodeValue
2154                     {
2155                     pushFollow(FOLLOW_nodeValue_in_functionArg1343);
2156                     nodeValue60=nodeValue();
2157
2158                     state._fsp--;
2159
2160                     stream_nodeValue.add(nodeValue60.getTree());
2161
2162
2163                     // AST REWRITE
2164                     // elements: 
2165                     // token labels: 
2166                     // rule labels: retval
2167                     // token list labels: 
2168                     // rule list labels: 
2169                     retval.tree = root_0;
2170                     RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
2171
2172                     root_0 = (Object)adaptor.nil();
2173                     // 340:14: -> Argument[$functionArg.text]
2174                     {
2175                         adaptor.addChild(root_0, (Object)adaptor.create(Argument, input.toString(retval.start,input.LT(-1))));
2176
2177                     }
2178
2179                     retval.tree = root_0;
2180                     }
2181                     break;
2182                 case 2 :
2183                     // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:341:4: nodeName Colon nodeValue
2184                     {
2185                     pushFollow(FOLLOW_nodeName_in_functionArg1353);
2186                     nodeName61=nodeName();
2187
2188                     state._fsp--;
2189
2190                     stream_nodeName.add(nodeName61.getTree());
2191                     Colon62=(Token)match(input,Colon,FOLLOW_Colon_in_functionArg1355);  
2192                     stream_Colon.add(Colon62);
2193
2194                     pushFollow(FOLLOW_nodeValue_in_functionArg1357);
2195                     nodeValue63=nodeValue();
2196
2197                     state._fsp--;
2198
2199                     stream_nodeValue.add(nodeValue63.getTree());
2200
2201
2202                     // AST REWRITE
2203                     // elements: 
2204                     // token labels: 
2205                     // rule labels: retval
2206                     // token list labels: 
2207                     // rule list labels: 
2208                     retval.tree = root_0;
2209                     RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
2210
2211                     root_0 = (Object)adaptor.nil();
2212                     // 341:29: -> ^( KeyValuePair Key[$nodeName.text.trim()] Value[$nodeValue.text.trim()] )
2213                     {
2214                         // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:341:32: ^( KeyValuePair Key[$nodeName.text.trim()] Value[$nodeValue.text.trim()] )
2215                         {
2216                         Object root_1 = (Object)adaptor.nil();
2217                         root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(KeyValuePair, "KeyValuePair"), root_1);
2218
2219                         adaptor.addChild(root_1, (Object)adaptor.create(Key, (nodeName61!=null?input.toString(nodeName61.start,nodeName61.stop):null).trim()));
2220                         adaptor.addChild(root_1, (Object)adaptor.create(Value, (nodeValue63!=null?input.toString(nodeValue63.start,nodeValue63.stop):null).trim()));
2221
2222                         adaptor.addChild(root_0, root_1);
2223                         }
2224
2225                     }
2226
2227                     retval.tree = root_0;
2228                     }
2229                     break;
2230
2231             }
2232             retval.stop = input.LT(-1);
2233
2234             retval.tree = (Object)adaptor.rulePostProcessing(root_0);
2235             adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
2236
2237         }
2238         catch (RecognitionException re) {
2239             reportError(re);
2240             recover(input,re);
2241         retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
2242
2243         }
2244         finally {
2245         }
2246         return retval;
2247     }
2248     // $ANTLR end "functionArg"
2249
2250     // Delegated rules
2251
2252
2253  
2254
2255     public static final BitSet FOLLOW_silkLine_in_silkFile856 = new BitSet(new long[]{0x00000000000E8002L});
2256     public static final BitSet FOLLOW_silkNode_in_silkLine877 = new BitSet(new long[]{0x0000000000000002L});
2257     public static final BitSet FOLLOW_LineComment_in_silkLine883 = new BitSet(new long[]{0x0000000000000002L});
2258     public static final BitSet FOLLOW_WhiteSpace_in_silkLine888 = new BitSet(new long[]{0x0000000000000002L});
2259     public static final BitSet FOLLOW_set_in_nodeName0 = new BitSet(new long[]{0x0000000000000002L});
2260     public static final BitSet FOLLOW_function_i_in_nodeValue918 = new BitSet(new long[]{0x0000000000000002L});
2261     public static final BitSet FOLLOW_PlainOneLine_in_nodeValue932 = new BitSet(new long[]{0x0000000000000002L});
2262     public static final BitSet FOLLOW_String_in_nodeValue936 = new BitSet(new long[]{0x0000000000000002L});
2263     public static final BitSet FOLLOW_JSON_in_nodeValue947 = new BitSet(new long[]{0x0000000000000002L});
2264     public static final BitSet FOLLOW_NodeIndent_in_silkNode961 = new BitSet(new long[]{0x0004010000000000L});
2265     public static final BitSet FOLLOW_nodeItem_in_silkNode963 = new BitSet(new long[]{0x0000000000000002L});
2266     public static final BitSet FOLLOW_NodeIndent_in_silkNode978 = new BitSet(new long[]{0x000000012F200002L});
2267     public static final BitSet FOLLOW_LParen_in_silkNode981 = new BitSet(new long[]{0x0004010000000000L});
2268     public static final BitSet FOLLOW_attributeList_in_silkNode983 = new BitSet(new long[]{0x0000000000400000L});
2269     public static final BitSet FOLLOW_RParen_in_silkNode985 = new BitSet(new long[]{0x000000012F000002L});
2270     public static final BitSet FOLLOW_plural_in_silkNode989 = new BitSet(new long[]{0x0000000001000002L});
2271     public static final BitSet FOLLOW_Colon_in_silkNode993 = new BitSet(new long[]{0x000C010010000000L});
2272     public static final BitSet FOLLOW_nodeValue_in_silkNode995 = new BitSet(new long[]{0x0000000000000002L});
2273     public static final BitSet FOLLOW_function_in_silkNode1020 = new BitSet(new long[]{0x0000000000000002L});
2274     public static final BitSet FOLLOW_nodeName_in_nodeItem1033 = new BitSet(new long[]{0x000000016F200002L});
2275     public static final BitSet FOLLOW_dataType_in_nodeItem1035 = new BitSet(new long[]{0x000000012F200002L});
2276     public static final BitSet FOLLOW_LParen_in_nodeItem1040 = new BitSet(new long[]{0x0004010000000000L});
2277     public static final BitSet FOLLOW_attributeList_in_nodeItem1042 = new BitSet(new long[]{0x0000000000400000L});
2278     public static final BitSet FOLLOW_RParen_in_nodeItem1044 = new BitSet(new long[]{0x000000012F000002L});
2279     public static final BitSet FOLLOW_plural_in_nodeItem1048 = new BitSet(new long[]{0x0000000001000002L});
2280     public static final BitSet FOLLOW_Colon_in_nodeItem1052 = new BitSet(new long[]{0x000C010010000000L});
2281     public static final BitSet FOLLOW_nodeValue_in_nodeItem1054 = new BitSet(new long[]{0x0000000000000002L});
2282     public static final BitSet FOLLOW_LBracket_in_dataType1087 = new BitSet(new long[]{0x0004000000000000L});
2283     public static final BitSet FOLLOW_dataTypeName_in_dataType1090 = new BitSet(new long[]{0x0000000080000000L});
2284     public static final BitSet FOLLOW_RBracket_in_dataType1092 = new BitSet(new long[]{0x0000000000000002L});
2285     public static final BitSet FOLLOW_PlainOneLine_in_dataTypeName1105 = new BitSet(new long[]{0x0000000000000002L});
2286     public static final BitSet FOLLOW_attributeItem_in_attributeList1125 = new BitSet(new long[]{0x0000000000800002L});
2287     public static final BitSet FOLLOW_Comma_in_attributeList1128 = new BitSet(new long[]{0x0004010000000000L});
2288     public static final BitSet FOLLOW_attributeItem_in_attributeList1131 = new BitSet(new long[]{0x0000000000800002L});
2289     public static final BitSet FOLLOW_nodeItem_in_attributeItem1144 = new BitSet(new long[]{0x0000000000000002L});
2290     public static final BitSet FOLLOW_Seq_in_seqseq1161 = new BitSet(new long[]{0x0000000002000000L});
2291     public static final BitSet FOLLOW_Seq_in_seqseq1163 = new BitSet(new long[]{0x0000000000000002L});
2292     public static final BitSet FOLLOW_Star_in_plural1174 = new BitSet(new long[]{0x0000000000000002L});
2293     public static final BitSet FOLLOW_Plus_in_plural1184 = new BitSet(new long[]{0x0000000000000002L});
2294     public static final BitSet FOLLOW_Question_in_plural1194 = new BitSet(new long[]{0x0000000000000002L});
2295     public static final BitSet FOLLOW_seqseq_in_plural1204 = new BitSet(new long[]{0x0000000000000002L});
2296     public static final BitSet FOLLOW_Seq_in_plural1214 = new BitSet(new long[]{0x0000000000000002L});
2297     public static final BitSet FOLLOW_TabSeq_in_plural1224 = new BitSet(new long[]{0x0000000000000002L});
2298     public static final BitSet FOLLOW_NodeIndent_in_function1240 = new BitSet(new long[]{0x0000000010000000L});
2299     public static final BitSet FOLLOW_function_i_in_function1242 = new BitSet(new long[]{0x0000000000000002L});
2300     public static final BitSet FOLLOW_FunctionIndent_in_function1258 = new BitSet(new long[]{0x0004000000000000L});
2301     public static final BitSet FOLLOW_PlainOneLine_in_function1260 = new BitSet(new long[]{0x0000000000200000L});
2302     public static final BitSet FOLLOW_LParen_in_function1262 = new BitSet(new long[]{0x000C010010400000L});
2303     public static final BitSet FOLLOW_functionArg_in_function1265 = new BitSet(new long[]{0x0000000000C00000L});
2304     public static final BitSet FOLLOW_Comma_in_function1268 = new BitSet(new long[]{0x000C010010000000L});
2305     public static final BitSet FOLLOW_functionArg_in_function1270 = new BitSet(new long[]{0x0000000000C00000L});
2306     public static final BitSet FOLLOW_RParen_in_function1276 = new BitSet(new long[]{0x0000000000000002L});
2307     public static final BitSet FOLLOW_At_in_function_i1303 = new BitSet(new long[]{0x0004000000000000L});
2308     public static final BitSet FOLLOW_PlainOneLine_in_function_i1305 = new BitSet(new long[]{0x0000000000200000L});
2309     public static final BitSet FOLLOW_LParen_in_function_i1307 = new BitSet(new long[]{0x000C010010400000L});
2310     public static final BitSet FOLLOW_functionArg_in_function_i1310 = new BitSet(new long[]{0x0000000000C00000L});
2311     public static final BitSet FOLLOW_Comma_in_function_i1313 = new BitSet(new long[]{0x000C010010000000L});
2312     public static final BitSet FOLLOW_functionArg_in_function_i1315 = new BitSet(new long[]{0x0000000000C00000L});
2313     public static final BitSet FOLLOW_RParen_in_function_i1321 = new BitSet(new long[]{0x0000000000000002L});
2314     public static final BitSet FOLLOW_nodeValue_in_functionArg1343 = new BitSet(new long[]{0x0000000000000002L});
2315     public static final BitSet FOLLOW_nodeName_in_functionArg1353 = new BitSet(new long[]{0x0000000001000000L});
2316     public static final BitSet FOLLOW_Colon_in_functionArg1355 = new BitSet(new long[]{0x000C010010000000L});
2317     public static final BitSet FOLLOW_nodeValue_in_functionArg1357 = new BitSet(new long[]{0x0000000000000002L});
2318
2319 }