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
3 /*--------------------------------------------------------------------------
4 * Copyright 2009 Taro L. Saito
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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 //--------------------------------------
22 // Since: Jan 28, 2009 1:00:02 PM
24 //--------------------------------------
25 package org.xerial.silk.impl;
28 import org.antlr.runtime.*;
29 import java.util.Stack;
30 import java.util.List;
31 import java.util.ArrayList;
34 import org.antlr.runtime.tree.*;
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"
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;
95 public SilkParser(TokenStream input) {
96 this(input, new RecognizerSharedState());
98 public SilkParser(TokenStream input, RecognizerSharedState state) {
103 protected TreeAdaptor adaptor = new CommonTreeAdaptor();
105 public void setTreeAdaptor(TreeAdaptor adaptor) {
106 this.adaptor = adaptor;
108 public TreeAdaptor getTreeAdaptor() {
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"; }
116 public static class silkFile_return extends ParserRuleReturnScope {
118 public Object getTree() { return tree; }
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);
127 Object root_0 = null;
129 SilkParser.silkLine_return silkLine1 = null;
132 RewriteRuleSubtreeStream stream_silkLine=new RewriteRuleSubtreeStream(adaptor,"rule silkLine");
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 )*
137 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:266:11: ( silkLine )*
141 int LA1_0 = input.LA(1);
143 if ( (LA1_0==WhiteSpace||(LA1_0>=LineComment && LA1_0<=FunctionIndent)) ) {
150 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:266:11: silkLine
152 pushFollow(FOLLOW_silkLine_in_silkFile856);
153 silkLine1=silkLine();
157 stream_silkLine.add(silkLine1.getTree());
170 // elements: silkLine
172 // rule labels: retval
173 // token list labels:
175 retval.tree = root_0;
176 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
178 root_0 = (Object)adaptor.nil();
179 // 266:21: -> ^( Silk ( silkLine )* )
181 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:266:24: ^( Silk ( silkLine )* )
183 Object root_1 = (Object)adaptor.nil();
184 root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(Silk, "Silk"), root_1);
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());
191 stream_silkLine.reset();
193 adaptor.addChild(root_0, root_1);
198 retval.tree = root_0;
201 retval.stop = input.LT(-1);
203 retval.tree = (Object)adaptor.rulePostProcessing(root_0);
204 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
207 catch (RecognitionException re) {
210 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
217 // $ANTLR end "silkFile"
219 public static class silkLine_return extends ParserRuleReturnScope {
221 public Object getTree() { return tree; }
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);
230 Object root_0 = null;
232 Token LineComment3=null;
233 Token WhiteSpace4=null;
234 SilkParser.silkNode_return silkNode2 = null;
237 Object LineComment3_tree=null;
238 Object WhiteSpace4_tree=null;
239 RewriteRuleTokenStream stream_WhiteSpace=new RewriteRuleTokenStream(adaptor,"token WhiteSpace");
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 )
244 switch ( input.LA(1) ) {
262 NoViableAltException nvae =
263 new NoViableAltException("", 2, 0, input);
270 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:270:4: silkNode
272 root_0 = (Object)adaptor.nil();
274 pushFollow(FOLLOW_silkNode_in_silkLine877);
275 silkNode2=silkNode();
279 adaptor.addChild(root_0, silkNode2.getTree());
284 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:4: LineComment
286 root_0 = (Object)adaptor.nil();
288 LineComment3=(Token)match(input,LineComment,FOLLOW_LineComment_in_silkLine883);
289 LineComment3_tree = (Object)adaptor.create(LineComment3);
290 adaptor.addChild(root_0, LineComment3_tree);
296 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:272:4: WhiteSpace
298 WhiteSpace4=(Token)match(input,WhiteSpace,FOLLOW_WhiteSpace_in_silkLine888);
299 stream_WhiteSpace.add(WhiteSpace4);
306 // rule labels: retval
307 // token list labels:
309 retval.tree = root_0;
310 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
312 root_0 = (Object)adaptor.nil();
313 // 272:15: -> BlankLine
315 adaptor.addChild(root_0, (Object)adaptor.create(BlankLine, "BlankLine"));
319 retval.tree = root_0;
324 retval.stop = input.LT(-1);
326 retval.tree = (Object)adaptor.rulePostProcessing(root_0);
327 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
330 catch (RecognitionException re) {
333 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
340 // $ANTLR end "silkLine"
342 public static class nodeName_return extends ParserRuleReturnScope {
344 public Object getTree() { return tree; }
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);
353 Object root_0 = null;
357 Object set5_tree=null;
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:
363 root_0 = (Object)adaptor.nil();
365 set5=(Token)input.LT(1);
366 if ( input.LA(1)==String||input.LA(1)==PlainOneLine ) {
368 adaptor.addChild(root_0, (Object)adaptor.create(set5));
369 state.errorRecovery=false;
372 MismatchedSetException mse = new MismatchedSetException(null,input);
379 retval.stop = input.LT(-1);
381 retval.tree = (Object)adaptor.rulePostProcessing(root_0);
382 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
385 catch (RecognitionException re) {
388 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
395 // $ANTLR end "nodeName"
397 public static class nodeValue_return extends ParserRuleReturnScope {
399 public Object getTree() { return tree; }
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);
408 Object root_0 = null;
410 Token PlainOneLine7=null;
413 SilkParser.function_i_return function_i6 = null;
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");
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 )
425 switch ( input.LA(1) ) {
443 NoViableAltException nvae =
444 new NoViableAltException("", 4, 0, input);
451 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:280:4: function_i
453 pushFollow(FOLLOW_function_i_in_nodeValue918);
454 function_i6=function_i();
458 stream_function_i.add(function_i6.getTree());
462 // elements: function_i
464 // rule labels: retval
465 // token list labels:
467 retval.tree = root_0;
468 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
470 root_0 = (Object)adaptor.nil();
471 // 280:15: -> ^( Function function_i )
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 )
475 Object root_1 = (Object)adaptor.nil();
476 root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(Function, "Function"), root_1);
478 adaptor.addChild(root_1, stream_function_i.nextTree());
480 adaptor.addChild(root_0, root_1);
485 retval.tree = root_0;
489 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:281:4: ( PlainOneLine | String )
491 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:281:4: ( PlainOneLine | String )
493 int LA3_0 = input.LA(1);
495 if ( (LA3_0==PlainOneLine) ) {
498 else if ( (LA3_0==String) ) {
502 NoViableAltException nvae =
503 new NoViableAltException("", 3, 0, input);
509 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:281:5: PlainOneLine
511 PlainOneLine7=(Token)match(input,PlainOneLine,FOLLOW_PlainOneLine_in_nodeValue932);
512 stream_PlainOneLine.add(PlainOneLine7);
518 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:281:20: String
520 String8=(Token)match(input,String,FOLLOW_String_in_nodeValue936);
521 stream_String.add(String8);
534 // rule labels: retval
535 // token list labels:
537 retval.tree = root_0;
538 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
540 root_0 = (Object)adaptor.nil();
541 // 281:28: -> Value[$nodeValue.text]
543 adaptor.addChild(root_0, (Object)adaptor.create(Value, input.toString(retval.start,input.LT(-1))));
547 retval.tree = root_0;
551 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:282:4: JSON
553 root_0 = (Object)adaptor.nil();
555 JSON9=(Token)match(input,JSON,FOLLOW_JSON_in_nodeValue947);
556 JSON9_tree = (Object)adaptor.create(JSON9);
557 adaptor.addChild(root_0, JSON9_tree);
564 retval.stop = input.LT(-1);
566 retval.tree = (Object)adaptor.rulePostProcessing(root_0);
567 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
570 catch (RecognitionException re) {
573 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
580 // $ANTLR end "nodeValue"
582 public static class silkNode_return extends ParserRuleReturnScope {
584 public Object getTree() { return tree; }
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);
593 Object root_0 = null;
595 Token NodeIndent10=null;
596 Token NodeIndent12=null;
600 SilkParser.nodeItem_return nodeItem11 = null;
602 SilkParser.attributeList_return attributeList14 = null;
604 SilkParser.plural_return plural16 = null;
606 SilkParser.nodeValue_return nodeValue18 = null;
608 SilkParser.function_return function19 = null;
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");
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 )
627 int LA8_0 = input.LA(1);
629 if ( (LA8_0==NodeIndent) ) {
630 switch ( input.LA(2) ) {
659 NoViableAltException nvae =
660 new NoViableAltException("", 8, 1, input);
666 else if ( (LA8_0==FunctionIndent) ) {
670 NoViableAltException nvae =
671 new NoViableAltException("", 8, 0, input);
677 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:287:4: NodeIndent nodeItem
679 NodeIndent10=(Token)match(input,NodeIndent,FOLLOW_NodeIndent_in_silkNode961);
680 stream_NodeIndent.add(NodeIndent10);
682 pushFollow(FOLLOW_nodeItem_in_silkNode963);
683 nodeItem11=nodeItem();
687 stream_nodeItem.add(nodeItem11.getTree());
691 // elements: nodeItem, NodeIndent
693 // rule labels: retval
694 // token list labels:
696 retval.tree = root_0;
697 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
699 root_0 = (Object)adaptor.nil();
700 // 287:24: -> ^( SilkNode NodeIndent nodeItem )
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 )
704 Object root_1 = (Object)adaptor.nil();
705 root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(SilkNode, "SilkNode"), root_1);
707 adaptor.addChild(root_1, stream_NodeIndent.nextNode());
708 adaptor.addChild(root_1, stream_nodeItem.nextTree());
710 adaptor.addChild(root_0, root_1);
715 retval.tree = root_0;
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 )?
721 NodeIndent12=(Token)match(input,NodeIndent,FOLLOW_NodeIndent_in_silkNode978);
722 stream_NodeIndent.add(NodeIndent12);
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 )?
726 int LA5_0 = input.LA(1);
728 if ( (LA5_0==LParen) ) {
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
735 LParen13=(Token)match(input,LParen,FOLLOW_LParen_in_silkNode981);
736 stream_LParen.add(LParen13);
738 pushFollow(FOLLOW_attributeList_in_silkNode983);
739 attributeList14=attributeList();
743 stream_attributeList.add(attributeList14.getTree());
744 RParen15=(Token)match(input,RParen,FOLLOW_RParen_in_silkNode985);
745 stream_RParen.add(RParen15);
753 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:288:46: ( plural )?
755 int LA6_0 = input.LA(1);
757 if ( ((LA6_0>=Seq && LA6_0<=Star)||LA6_0==Plus||LA6_0==Question) ) {
762 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:288:46: plural
764 pushFollow(FOLLOW_plural_in_silkNode989);
769 stream_plural.add(plural16.getTree());
776 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:288:54: ( Colon nodeValue )?
778 int LA7_0 = input.LA(1);
780 if ( (LA7_0==Colon) ) {
785 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:288:55: Colon nodeValue
787 Colon17=(Token)match(input,Colon,FOLLOW_Colon_in_silkNode993);
788 stream_Colon.add(Colon17);
790 pushFollow(FOLLOW_nodeValue_in_silkNode995);
791 nodeValue18=nodeValue();
795 stream_nodeValue.add(nodeValue18.getTree());
805 // elements: attributeList, plural, nodeValue, NodeIndent
807 // rule labels: retval
808 // token list labels:
810 retval.tree = root_0;
811 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
813 root_0 = (Object)adaptor.nil();
814 // 289:2: -> ^( SilkNode NodeIndent ( attributeList )? ( plural )? ( nodeValue )? )
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 )? )
818 Object root_1 = (Object)adaptor.nil();
819 root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(SilkNode, "SilkNode"), root_1);
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());
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());
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());
839 stream_nodeValue.reset();
841 adaptor.addChild(root_0, root_1);
846 retval.tree = root_0;
850 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:290:4: function
852 root_0 = (Object)adaptor.nil();
854 pushFollow(FOLLOW_function_in_silkNode1020);
855 function19=function();
859 adaptor.addChild(root_0, function19.getTree());
865 retval.stop = input.LT(-1);
867 retval.tree = (Object)adaptor.rulePostProcessing(root_0);
868 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
871 catch (RecognitionException re) {
874 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
881 // $ANTLR end "silkNode"
883 public static class nodeItem_return extends ParserRuleReturnScope {
885 public Object getTree() { return tree; }
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);
894 Object root_0 = null;
899 SilkParser.nodeName_return nodeName20 = null;
901 SilkParser.dataType_return dataType21 = null;
903 SilkParser.attributeList_return attributeList23 = null;
905 SilkParser.plural_return plural25 = null;
907 SilkParser.nodeValue_return nodeValue27 = null;
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");
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 )?
925 pushFollow(FOLLOW_nodeName_in_nodeItem1033);
926 nodeName20=nodeName();
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 )?
933 int LA9_0 = input.LA(1);
935 if ( (LA9_0==LBracket) ) {
940 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:20: dataType
942 pushFollow(FOLLOW_dataType_in_nodeItem1035);
943 dataType21=dataType();
947 stream_dataType.add(dataType21.getTree());
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 )?
956 int LA10_0 = input.LA(1);
958 if ( (LA10_0==LParen) ) {
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
965 LParen22=(Token)match(input,LParen,FOLLOW_LParen_in_nodeItem1040);
966 stream_LParen.add(LParen22);
968 pushFollow(FOLLOW_attributeList_in_nodeItem1042);
969 attributeList23=attributeList();
973 stream_attributeList.add(attributeList23.getTree());
974 RParen24=(Token)match(input,RParen,FOLLOW_RParen_in_nodeItem1044);
975 stream_RParen.add(RParen24);
983 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:62: ( plural )?
985 int LA11_0 = input.LA(1);
987 if ( ((LA11_0>=Seq && LA11_0<=Star)||LA11_0==Plus||LA11_0==Question) ) {
992 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:62: plural
994 pushFollow(FOLLOW_plural_in_nodeItem1048);
999 stream_plural.add(plural25.getTree());
1006 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:70: ( Colon nodeValue )?
1008 int LA12_0 = input.LA(1);
1010 if ( (LA12_0==Colon) ) {
1015 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:71: Colon nodeValue
1017 Colon26=(Token)match(input,Colon,FOLLOW_Colon_in_nodeItem1052);
1018 stream_Colon.add(Colon26);
1020 pushFollow(FOLLOW_nodeValue_in_nodeItem1054);
1021 nodeValue27=nodeValue();
1025 stream_nodeValue.add(nodeValue27.getTree());
1035 // elements: plural, dataType, nodeValue, attributeList
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);
1043 root_0 = (Object)adaptor.nil();
1044 // 295:2: -> Name[$nodeName.text.trim()] ( dataType )? ( attributeList )? ( plural )? ( nodeValue )?
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());
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());
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());
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());
1070 stream_nodeValue.reset();
1074 retval.tree = root_0;
1077 retval.stop = input.LT(-1);
1079 retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1080 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1083 catch (RecognitionException re) {
1086 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1093 // $ANTLR end "nodeItem"
1095 public static class dataType_return extends ParserRuleReturnScope {
1097 public Object getTree() { return tree; }
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);
1106 Object root_0 = null;
1108 Token LBracket28=null;
1109 Token RBracket30=null;
1110 SilkParser.dataTypeName_return dataTypeName29 = null;
1113 Object LBracket28_tree=null;
1114 Object RBracket30_tree=null;
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
1120 root_0 = (Object)adaptor.nil();
1122 LBracket28=(Token)match(input,LBracket,FOLLOW_LBracket_in_dataType1087);
1123 pushFollow(FOLLOW_dataTypeName_in_dataType1090);
1124 dataTypeName29=dataTypeName();
1128 adaptor.addChild(root_0, dataTypeName29.getTree());
1129 RBracket30=(Token)match(input,RBracket,FOLLOW_RBracket_in_dataType1092);
1133 retval.stop = input.LT(-1);
1135 retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1136 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1139 catch (RecognitionException re) {
1142 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1149 // $ANTLR end "dataType"
1151 public static class dataTypeName_return extends ParserRuleReturnScope {
1153 public Object getTree() { return tree; }
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);
1162 Object root_0 = null;
1164 Token PlainOneLine31=null;
1166 Object PlainOneLine31_tree=null;
1167 RewriteRuleTokenStream stream_PlainOneLine=new RewriteRuleTokenStream(adaptor,"token PlainOneLine");
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
1173 PlainOneLine31=(Token)match(input,PlainOneLine,FOLLOW_PlainOneLine_in_dataTypeName1105);
1174 stream_PlainOneLine.add(PlainOneLine31);
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);
1187 root_0 = (Object)adaptor.nil();
1188 // 304:2: -> DataType[$dataTypeName.text]
1190 adaptor.addChild(root_0, (Object)adaptor.create(DataType, input.toString(retval.start,input.LT(-1))));
1194 retval.tree = root_0;
1197 retval.stop = input.LT(-1);
1199 retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1200 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1203 catch (RecognitionException re) {
1206 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1213 // $ANTLR end "dataTypeName"
1215 public static class attributeList_return extends ParserRuleReturnScope {
1217 public Object getTree() { return tree; }
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);
1226 Object root_0 = null;
1229 SilkParser.attributeItem_return attributeItem32 = null;
1231 SilkParser.attributeItem_return attributeItem34 = null;
1234 Object Comma33_tree=null;
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 )*
1240 root_0 = (Object)adaptor.nil();
1242 pushFollow(FOLLOW_attributeItem_in_attributeList1125);
1243 attributeItem32=attributeItem();
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 )*
1252 int LA13_0 = input.LA(1);
1254 if ( (LA13_0==Comma) ) {
1261 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:308:31: Comma attributeItem
1263 Comma33=(Token)match(input,Comma,FOLLOW_Comma_in_attributeList1128);
1264 pushFollow(FOLLOW_attributeItem_in_attributeList1131);
1265 attributeItem34=attributeItem();
1269 adaptor.addChild(root_0, attributeItem34.getTree());
1282 retval.stop = input.LT(-1);
1284 retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1285 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1288 catch (RecognitionException re) {
1291 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1298 // $ANTLR end "attributeList"
1300 public static class attributeItem_return extends ParserRuleReturnScope {
1302 public Object getTree() { return tree; }
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);
1311 Object root_0 = null;
1313 SilkParser.nodeItem_return nodeItem35 = null;
1316 RewriteRuleSubtreeStream stream_nodeItem=new RewriteRuleSubtreeStream(adaptor,"rule nodeItem");
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
1321 pushFollow(FOLLOW_nodeItem_in_attributeItem1144);
1322 nodeItem35=nodeItem();
1326 stream_nodeItem.add(nodeItem35.getTree());
1330 // elements: nodeItem
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);
1338 root_0 = (Object)adaptor.nil();
1339 // 311:25: -> ^( SilkNode nodeItem )
1341 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:311:28: ^( SilkNode nodeItem )
1343 Object root_1 = (Object)adaptor.nil();
1344 root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(SilkNode, "SilkNode"), root_1);
1346 adaptor.addChild(root_1, stream_nodeItem.nextTree());
1348 adaptor.addChild(root_0, root_1);
1353 retval.tree = root_0;
1356 retval.stop = input.LT(-1);
1358 retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1359 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1362 catch (RecognitionException re) {
1365 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1372 // $ANTLR end "attributeItem"
1374 public static class seqseq_return extends ParserRuleReturnScope {
1376 public Object getTree() { return tree; }
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);
1385 Object root_0 = null;
1390 Object Seq36_tree=null;
1391 Object Seq37_tree=null;
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
1397 root_0 = (Object)adaptor.nil();
1399 Seq36=(Token)match(input,Seq,FOLLOW_Seq_in_seqseq1161);
1400 Seq36_tree = (Object)adaptor.create(Seq36);
1401 adaptor.addChild(root_0, Seq36_tree);
1403 Seq37=(Token)match(input,Seq,FOLLOW_Seq_in_seqseq1163);
1404 Seq37_tree = (Object)adaptor.create(Seq37);
1405 adaptor.addChild(root_0, Seq37_tree);
1410 retval.stop = input.LT(-1);
1412 retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1413 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1416 catch (RecognitionException re) {
1419 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1426 // $ANTLR end "seqseq"
1428 public static class plural_return extends ParserRuleReturnScope {
1430 public Object getTree() { return tree; }
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);
1439 Object root_0 = null;
1443 Token Question40=null;
1445 Token TabSeq43=null;
1446 SilkParser.seqseq_return seqseq41 = null;
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");
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\"] )
1463 switch ( input.LA(1) ) {
1481 int LA14_4 = input.LA(2);
1483 if ( (LA14_4==Seq) ) {
1486 else if ( (LA14_4==EOF||LA14_4==WhiteSpace||(LA14_4>=LineComment && LA14_4<=FunctionIndent)||(LA14_4>=RParen && LA14_4<=Colon)) ) {
1490 NoViableAltException nvae =
1491 new NoViableAltException("", 14, 4, input);
1503 NoViableAltException nvae =
1504 new NoViableAltException("", 14, 0, input);
1511 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:318:4: Star
1513 Star38=(Token)match(input,Star,FOLLOW_Star_in_plural1174);
1514 stream_Star.add(Star38);
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);
1527 root_0 = (Object)adaptor.nil();
1528 // 318:9: -> Occurrence[\"ZERO_OR_MORE\"]
1530 adaptor.addChild(root_0, (Object)adaptor.create(Occurrence, "ZERO_OR_MORE"));
1534 retval.tree = root_0;
1538 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:319:4: Plus
1540 Plus39=(Token)match(input,Plus,FOLLOW_Plus_in_plural1184);
1541 stream_Plus.add(Plus39);
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);
1554 root_0 = (Object)adaptor.nil();
1555 // 319:9: -> Occurrence[\"ONE_OR_MORE\"]
1557 adaptor.addChild(root_0, (Object)adaptor.create(Occurrence, "ONE_OR_MORE"));
1561 retval.tree = root_0;
1565 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:320:4: Question
1567 Question40=(Token)match(input,Question,FOLLOW_Question_in_plural1194);
1568 stream_Question.add(Question40);
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);
1581 root_0 = (Object)adaptor.nil();
1582 // 320:13: -> Occurrence[\"ZERO_OR_ONE\"]
1584 adaptor.addChild(root_0, (Object)adaptor.create(Occurrence, "ZERO_OR_ONE"));
1588 retval.tree = root_0;
1592 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:321:4: seqseq
1594 pushFollow(FOLLOW_seqseq_in_plural1204);
1599 stream_seqseq.add(seqseq41.getTree());
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);
1611 root_0 = (Object)adaptor.nil();
1612 // 321:11: -> Occurrence[\"MULTILINE_SEQUENCE\"]
1614 adaptor.addChild(root_0, (Object)adaptor.create(Occurrence, "MULTILINE_SEQUENCE"));
1618 retval.tree = root_0;
1622 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:322:4: Seq
1624 Seq42=(Token)match(input,Seq,FOLLOW_Seq_in_plural1214);
1625 stream_Seq.add(Seq42);
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);
1638 root_0 = (Object)adaptor.nil();
1639 // 322:8: -> Occurrence[\"SEQUENCE\"]
1641 adaptor.addChild(root_0, (Object)adaptor.create(Occurrence, "SEQUENCE"));
1645 retval.tree = root_0;
1649 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:323:4: TabSeq
1651 TabSeq43=(Token)match(input,TabSeq,FOLLOW_TabSeq_in_plural1224);
1652 stream_TabSeq.add(TabSeq43);
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);
1665 root_0 = (Object)adaptor.nil();
1666 // 323:11: -> Occurrence[\"TABBED_SEQUENCE\"]
1668 adaptor.addChild(root_0, (Object)adaptor.create(Occurrence, "TABBED_SEQUENCE"));
1672 retval.tree = root_0;
1677 retval.stop = input.LT(-1);
1679 retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1680 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1683 catch (RecognitionException re) {
1686 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1693 // $ANTLR end "plural"
1695 public static class function_return extends ParserRuleReturnScope {
1697 public Object getTree() { return tree; }
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);
1706 Object root_0 = null;
1708 Token NodeIndent44=null;
1709 Token FunctionIndent46=null;
1710 Token PlainOneLine47=null;
1711 Token LParen48=null;
1713 Token RParen52=null;
1714 SilkParser.function_i_return function_i45 = null;
1716 SilkParser.functionArg_return functionArg49 = null;
1718 SilkParser.functionArg_return functionArg51 = null;
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");
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 )* ) )
1738 int LA17_0 = input.LA(1);
1740 if ( (LA17_0==NodeIndent) ) {
1743 else if ( (LA17_0==FunctionIndent) ) {
1747 NoViableAltException nvae =
1748 new NoViableAltException("", 17, 0, input);
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
1756 NodeIndent44=(Token)match(input,NodeIndent,FOLLOW_NodeIndent_in_function1240);
1757 stream_NodeIndent.add(NodeIndent44);
1759 pushFollow(FOLLOW_function_i_in_function1242);
1760 function_i45=function_i();
1764 stream_function_i.add(function_i45.getTree());
1768 // elements: function_i, NodeIndent
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);
1776 root_0 = (Object)adaptor.nil();
1777 // 328:2: -> ^( Function NodeIndent function_i )
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 )
1781 Object root_1 = (Object)adaptor.nil();
1782 root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(Function, "Function"), root_1);
1784 adaptor.addChild(root_1, stream_NodeIndent.nextNode());
1785 adaptor.addChild(root_1, stream_function_i.nextTree());
1787 adaptor.addChild(root_0, root_1);
1792 retval.tree = root_0;
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
1798 FunctionIndent46=(Token)match(input,FunctionIndent,FOLLOW_FunctionIndent_in_function1258);
1799 stream_FunctionIndent.add(FunctionIndent46);
1801 PlainOneLine47=(Token)match(input,PlainOneLine,FOLLOW_PlainOneLine_in_function1260);
1802 stream_PlainOneLine.add(PlainOneLine47);
1804 LParen48=(Token)match(input,LParen,FOLLOW_LParen_in_function1262);
1805 stream_LParen.add(LParen48);
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 )* )?
1809 int LA16_0 = input.LA(1);
1811 if ( (LA16_0==At||LA16_0==String||(LA16_0>=PlainOneLine && LA16_0<=JSON)) ) {
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 )*
1818 pushFollow(FOLLOW_functionArg_in_function1265);
1819 functionArg49=functionArg();
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 )*
1828 int LA15_0 = input.LA(1);
1830 if ( (LA15_0==Comma) ) {
1837 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:329:53: Comma functionArg
1839 Comma50=(Token)match(input,Comma,FOLLOW_Comma_in_function1268);
1840 stream_Comma.add(Comma50);
1842 pushFollow(FOLLOW_functionArg_in_function1270);
1843 functionArg51=functionArg();
1847 stream_functionArg.add(functionArg51.getTree());
1863 RParen52=(Token)match(input,RParen,FOLLOW_RParen_in_function1276);
1864 stream_RParen.add(RParen52);
1869 // elements: functionArg
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);
1877 root_0 = (Object)adaptor.nil();
1878 // 330:2: -> ^( Function NodeIndent[$FunctionIndent.text] Name[$PlainOneLine.text.trim()] ( functionArg )* )
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 )* )
1882 Object root_1 = (Object)adaptor.nil();
1883 root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(Function, "Function"), root_1);
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());
1892 stream_functionArg.reset();
1894 adaptor.addChild(root_0, root_1);
1899 retval.tree = root_0;
1904 retval.stop = input.LT(-1);
1906 retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1907 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1910 catch (RecognitionException re) {
1913 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1920 // $ANTLR end "function"
1922 public static class function_i_return extends ParserRuleReturnScope {
1924 public Object getTree() { return tree; }
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);
1933 Object root_0 = null;
1936 Token PlainOneLine54=null;
1937 Token LParen55=null;
1939 Token RParen59=null;
1940 SilkParser.functionArg_return functionArg56 = null;
1942 SilkParser.functionArg_return functionArg58 = null;
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");
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
1960 At53=(Token)match(input,At,FOLLOW_At_in_function_i1303);
1961 stream_At.add(At53);
1963 PlainOneLine54=(Token)match(input,PlainOneLine,FOLLOW_PlainOneLine_in_function_i1305);
1964 stream_PlainOneLine.add(PlainOneLine54);
1966 LParen55=(Token)match(input,LParen,FOLLOW_LParen_in_function_i1307);
1967 stream_LParen.add(LParen55);
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 )* )?
1971 int LA19_0 = input.LA(1);
1973 if ( (LA19_0==At||LA19_0==String||(LA19_0>=PlainOneLine && LA19_0<=JSON)) ) {
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 )*
1980 pushFollow(FOLLOW_functionArg_in_function_i1310);
1981 functionArg56=functionArg();
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 )*
1990 int LA18_0 = input.LA(1);
1992 if ( (LA18_0==Comma) ) {
1999 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:334:50: Comma functionArg
2001 Comma57=(Token)match(input,Comma,FOLLOW_Comma_in_function_i1313);
2002 stream_Comma.add(Comma57);
2004 pushFollow(FOLLOW_functionArg_in_function_i1315);
2005 functionArg58=functionArg();
2009 stream_functionArg.add(functionArg58.getTree());
2025 RParen59=(Token)match(input,RParen,FOLLOW_RParen_in_function_i1321);
2026 stream_RParen.add(RParen59);
2031 // elements: functionArg
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);
2039 root_0 = (Object)adaptor.nil();
2040 // 335:2: -> Name[$PlainOneLine.text.trim()] ( functionArg )*
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());
2048 stream_functionArg.reset();
2052 retval.tree = root_0;
2055 retval.stop = input.LT(-1);
2057 retval.tree = (Object)adaptor.rulePostProcessing(root_0);
2058 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
2061 catch (RecognitionException re) {
2064 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
2071 // $ANTLR end "function_i"
2073 public static class functionArg_return extends ParserRuleReturnScope {
2075 public Object getTree() { return tree; }
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);
2084 Object root_0 = null;
2087 SilkParser.nodeValue_return nodeValue60 = null;
2089 SilkParser.nodeName_return nodeName61 = null;
2091 SilkParser.nodeValue_return nodeValue63 = null;
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");
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()] ) )
2101 switch ( input.LA(1) ) {
2110 int LA20_2 = input.LA(2);
2112 if ( (LA20_2==Colon) ) {
2115 else if ( ((LA20_2>=RParen && LA20_2<=Comma)) ) {
2119 NoViableAltException nvae =
2120 new NoViableAltException("", 20, 2, input);
2128 int LA20_3 = input.LA(2);
2130 if ( (LA20_3==Colon) ) {
2133 else if ( ((LA20_3>=RParen && LA20_3<=Comma)) ) {
2137 NoViableAltException nvae =
2138 new NoViableAltException("", 20, 3, input);
2145 NoViableAltException nvae =
2146 new NoViableAltException("", 20, 0, input);
2153 // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:340:4: nodeValue
2155 pushFollow(FOLLOW_nodeValue_in_functionArg1343);
2156 nodeValue60=nodeValue();
2160 stream_nodeValue.add(nodeValue60.getTree());
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);
2172 root_0 = (Object)adaptor.nil();
2173 // 340:14: -> Argument[$functionArg.text]
2175 adaptor.addChild(root_0, (Object)adaptor.create(Argument, input.toString(retval.start,input.LT(-1))));
2179 retval.tree = root_0;
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
2185 pushFollow(FOLLOW_nodeName_in_functionArg1353);
2186 nodeName61=nodeName();
2190 stream_nodeName.add(nodeName61.getTree());
2191 Colon62=(Token)match(input,Colon,FOLLOW_Colon_in_functionArg1355);
2192 stream_Colon.add(Colon62);
2194 pushFollow(FOLLOW_nodeValue_in_functionArg1357);
2195 nodeValue63=nodeValue();
2199 stream_nodeValue.add(nodeValue63.getTree());
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);
2211 root_0 = (Object)adaptor.nil();
2212 // 341:29: -> ^( KeyValuePair Key[$nodeName.text.trim()] Value[$nodeValue.text.trim()] )
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()] )
2216 Object root_1 = (Object)adaptor.nil();
2217 root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(KeyValuePair, "KeyValuePair"), root_1);
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()));
2222 adaptor.addChild(root_0, root_1);
2227 retval.tree = root_0;
2232 retval.stop = input.LT(-1);
2234 retval.tree = (Object)adaptor.rulePostProcessing(root_0);
2235 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
2238 catch (RecognitionException re) {
2241 retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
2248 // $ANTLR end "functionArg"
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});