1 // $ANTLR 3.1.3 Mar 17, 2009 19:23:44 SilkLine.g 2009-10-13 17:21:59
\r
3 /*--------------------------------------------------------------------------
\r
4 * Copyright 2009 Taro L. Saito
\r
6 * Licensed under the Apache License, Version 2.0 (the "License");
\r
7 * you may not use this file except in compliance with the License.
\r
8 * You may obtain a copy of the License at
\r
10 * http://www.apache.org/licenses/LICENSE-2.0
\r
12 * Unless required by applicable law or agreed to in writing, software
\r
13 * distributed under the License is distributed on an "AS IS" BASIS,
\r
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
15 * See the License for the specific language governing permissions and
\r
16 * limitations under the License.
\r
17 *--------------------------------------------------------------------------*/
\r
18 //--------------------------------------
\r
22 // Since: Jan 28, 2009 1:00:02 PM
\r
24 //--------------------------------------
\r
26 package org.xerial.silk.impl;
\r
27 import org.xerial.core.XerialError;
\r
28 import org.xerial.core.XerialErrorCode;
\r
29 import org.xerial.util.log.Logger;
\r
30 import org.xerial.silk.impl.SilkLexerState;
\r
31 import org.xerial.silk.impl.SilkLexerState.State;
\r
32 import org.xerial.silk.impl.SilkLexerState.Symbol;
\r
35 import org.antlr.runtime.*;
\r
36 import java.util.Stack;
\r
37 import java.util.List;
\r
38 import java.util.ArrayList;
\r
40 public class SilkLineLexer extends Lexer {
\r
41 public static final int Key=14;
\r
42 public static final int PlainUnsafeChar=45;
\r
43 public static final int PlainSafeKey=46;
\r
44 public static final int DataType=10;
\r
45 public static final int EqEq=25;
\r
46 public static final int SilkNode=5;
\r
47 public static final int SilkLine=6;
\r
48 public static final int LBracket=31;
\r
49 public static final int Digit=34;
\r
50 public static final int NodeIndent=18;
\r
51 public static final int HexDigit=36;
\r
52 public static final int PlainOneLine=51;
\r
53 public static final int Plus=30;
\r
54 public static final int Occurrence=9;
\r
55 public static final int Argument=12;
\r
56 public static final int Separation=53;
\r
57 public static final int FlowIndicator=43;
\r
58 public static final int Letter=35;
\r
59 public static final int PlainSafeIn=47;
\r
60 public static final int Comma=23;
\r
61 public static final int TabSeq=27;
\r
62 public static final int NonSpaceChar=49;
\r
63 public static final int EscapeSequence=38;
\r
64 public static final int PlainFirst=50;
\r
65 public static final int WhiteSpace=15;
\r
66 public static final int PlainSafeOut=48;
\r
67 public static final int JSON=52;
\r
68 public static final int Question=33;
\r
69 public static final int LineComment=17;
\r
70 public static final int Colon=24;
\r
71 public static final int At=29;
\r
72 public static final int KeyValuePair=13;
\r
73 public static final int Star=28;
\r
74 public static final int Seq=26;
\r
75 public static final int FunctionIndent=19;
\r
76 public static final int Indicator=44;
\r
77 public static final int RParen=22;
\r
78 public static final int UnicodeChar=37;
\r
79 public static final int StringChar=39;
\r
80 public static final int Silk=4;
\r
81 public static final int BlankLine=20;
\r
82 public static final int Name=7;
\r
83 public static final int Function=11;
\r
84 public static final int LParen=21;
\r
85 public static final int String=41;
\r
86 public static final int LineBreakChar=16;
\r
87 public static final int ScopeIndicator=42;
\r
88 public static final int EOF=-1;
\r
89 public static final int StringChar_s=40;
\r
90 public static final int Value=8;
\r
91 public static final int RBracket=32;
\r
94 private static Logger _logger = Logger.getLogger(SilkLineLexer.class);
\r
96 private SilkLexerState lexerContext = new SilkLexerState();
\r
98 private void transit(Symbol token) { lexerContext.transit(token); }
\r
99 private boolean isKey() { return lexerContext.isInKey(); }
\r
100 private boolean isValue() { return lexerContext.isValue(); }
\r
101 private boolean isInValue() { return lexerContext.isInValue(); }
\r
102 private boolean isOutValue() { return lexerContext.isOutValue(); }
\r
103 private boolean isHead() { return getCharPositionInLine() == 0; }
\r
105 public void resetContext() { lexerContext.reset(); }
\r
108 public void reportError(RecognitionException e) {
\r
109 String message = "line=" + getLine() + "(" + getCharPositionInLine() + "): " + e.toString();;
\r
110 throw new XerialError(XerialErrorCode.INVALID_TOKEN, message);
\r
113 public static String sanitizeDataLine(String line)
\r
115 line = line.trim();
\r
116 if (line.startsWith("\\"))
\r
117 return line.substring(1);
\r
128 public SilkLineLexer() {;}
\r
129 public SilkLineLexer(CharStream input) {
\r
130 this(input, new RecognizerSharedState());
\r
132 public SilkLineLexer(CharStream input, RecognizerSharedState state) {
\r
133 super(input,state);
\r
136 public String getGrammarFileName() { return "SilkLine.g"; }
\r
138 // $ANTLR start "WhiteSpace"
\r
139 public final void mWhiteSpace() throws RecognitionException {
\r
141 // SilkLine.g:155:2: ( ( ' ' | '\\t' ) )
\r
142 // SilkLine.g:155:4: ( ' ' | '\\t' )
\r
144 if ( input.LA(1)=='\t'||input.LA(1)==' ' ) {
\r
149 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
160 // $ANTLR end "WhiteSpace"
\r
162 // $ANTLR start "LineComment"
\r
163 public final void mLineComment() throws RecognitionException {
\r
165 int _type = LineComment;
\r
166 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
167 // SilkLine.g:159:12: ( '#' (~ ( LineBreakChar ) )* )
\r
168 // SilkLine.g:159:14: '#' (~ ( LineBreakChar ) )*
\r
171 // SilkLine.g:159:18: (~ ( LineBreakChar ) )*
\r
175 int LA1_0 = input.LA(1);
\r
177 if ( ((LA1_0>='\u0000' && LA1_0<='\t')||(LA1_0>='\u000B' && LA1_0<='\f')||(LA1_0>='\u000E' && LA1_0<='\uFFFF')) ) {
\r
184 // SilkLine.g:159:18: ~ ( LineBreakChar )
\r
186 if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
\r
191 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
207 state.type = _type;
\r
208 state.channel = _channel;
\r
213 // $ANTLR end "LineComment"
\r
215 // $ANTLR start "LineBreakChar"
\r
216 public final void mLineBreakChar() throws RecognitionException {
\r
218 // SilkLine.g:163:23: ( '\\n' | '\\r' )
\r
221 if ( input.LA(1)=='\n'||input.LA(1)=='\r' ) {
\r
226 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
237 // $ANTLR end "LineBreakChar"
\r
239 // $ANTLR start "NodeIndent"
\r
240 public final void mNodeIndent() throws RecognitionException {
\r
242 int _type = NodeIndent;
\r
243 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
244 // SilkLine.g:175:11: ({...}? => ( ' ' )* '-' )
\r
245 // SilkLine.g:175:13: {...}? => ( ' ' )* '-'
\r
247 if ( !(( isHead() )) ) {
\r
248 throw new FailedPredicateException(input, "NodeIndent", " isHead() ");
\r
250 // SilkLine.g:175:30: ( ' ' )*
\r
254 int LA2_0 = input.LA(1);
\r
256 if ( (LA2_0==' ') ) {
\r
263 // SilkLine.g:175:31: ' '
\r
276 transit(Symbol.NodeStart);
\r
280 state.type = _type;
\r
281 state.channel = _channel;
\r
286 // $ANTLR end "NodeIndent"
\r
288 // $ANTLR start "FunctionIndent"
\r
289 public final void mFunctionIndent() throws RecognitionException {
\r
291 int _type = FunctionIndent;
\r
292 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
293 // SilkLine.g:176:15: ({...}? => ( ' ' )* '@' )
\r
294 // SilkLine.g:176:17: {...}? => ( ' ' )* '@'
\r
296 if ( !(( isHead() )) ) {
\r
297 throw new FailedPredicateException(input, "FunctionIndent", " isHead() ");
\r
299 // SilkLine.g:176:34: ( ' ' )*
\r
303 int LA3_0 = input.LA(1);
\r
305 if ( (LA3_0==' ') ) {
\r
312 // SilkLine.g:176:35: ' '
\r
325 transit(Symbol.NodeStart);
\r
329 state.type = _type;
\r
330 state.channel = _channel;
\r
335 // $ANTLR end "FunctionIndent"
\r
337 // $ANTLR start "BlankLine"
\r
338 public final void mBlankLine() throws RecognitionException {
\r
340 int _type = BlankLine;
\r
341 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
342 // SilkLine.g:177:10: ({...}? => ( WhiteSpace )* )
\r
343 // SilkLine.g:177:12: {...}? => ( WhiteSpace )*
\r
345 if ( !(( isHead() )) ) {
\r
346 throw new FailedPredicateException(input, "BlankLine", " isHead() ");
\r
348 // SilkLine.g:177:29: ( WhiteSpace )*
\r
352 int LA4_0 = input.LA(1);
\r
354 if ( (LA4_0=='\t'||LA4_0==' ') ) {
\r
361 // SilkLine.g:177:29: WhiteSpace
\r
376 state.type = _type;
\r
377 state.channel = _channel;
\r
382 // $ANTLR end "BlankLine"
\r
384 // $ANTLR start "LParen"
\r
385 public final void mLParen() throws RecognitionException {
\r
387 int _type = LParen;
\r
388 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
389 // SilkLine.g:183:7: ( '(' )
\r
390 // SilkLine.g:183:9: '('
\r
393 transit(Symbol.EnterParen);
\r
397 state.type = _type;
\r
398 state.channel = _channel;
\r
403 // $ANTLR end "LParen"
\r
405 // $ANTLR start "RParen"
\r
406 public final void mRParen() throws RecognitionException {
\r
408 int _type = RParen;
\r
409 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
410 // SilkLine.g:184:7: ( ')' )
\r
411 // SilkLine.g:184:9: ')'
\r
414 transit(Symbol.LeaveParen);
\r
418 state.type = _type;
\r
419 state.channel = _channel;
\r
424 // $ANTLR end "RParen"
\r
426 // $ANTLR start "Comma"
\r
427 public final void mComma() throws RecognitionException {
\r
430 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
431 // SilkLine.g:185:6: ( ',' )
\r
432 // SilkLine.g:185:9: ','
\r
438 state.type = _type;
\r
439 state.channel = _channel;
\r
444 // $ANTLR end "Comma"
\r
446 // $ANTLR start "Colon"
\r
447 public final void mColon() throws RecognitionException {
\r
450 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
451 // SilkLine.g:186:6: ( ':' )
\r
452 // SilkLine.g:186:8: ':'
\r
455 transit(Symbol.Colon);
\r
459 state.type = _type;
\r
460 state.channel = _channel;
\r
465 // $ANTLR end "Colon"
\r
467 // $ANTLR start "EqEq"
\r
468 public final void mEqEq() throws RecognitionException {
\r
471 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
472 // SilkLine.g:188:5: ( '==' )
\r
473 // SilkLine.g:188:7: '=='
\r
480 state.type = _type;
\r
481 state.channel = _channel;
\r
486 // $ANTLR end "EqEq"
\r
488 // $ANTLR start "Seq"
\r
489 public final void mSeq() throws RecognitionException {
\r
492 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
493 // SilkLine.g:189:4: ( '>' )
\r
494 // SilkLine.g:189:7: '>'
\r
500 state.type = _type;
\r
501 state.channel = _channel;
\r
506 // $ANTLR end "Seq"
\r
508 // $ANTLR start "TabSeq"
\r
509 public final void mTabSeq() throws RecognitionException {
\r
511 int _type = TabSeq;
\r
512 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
513 // SilkLine.g:190:7: ( '|' )
\r
514 // SilkLine.g:190:9: '|'
\r
520 state.type = _type;
\r
521 state.channel = _channel;
\r
526 // $ANTLR end "TabSeq"
\r
528 // $ANTLR start "Star"
\r
529 public final void mStar() throws RecognitionException {
\r
532 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
533 // SilkLine.g:191:5: ( '*' )
\r
534 // SilkLine.g:191:8: '*'
\r
540 state.type = _type;
\r
541 state.channel = _channel;
\r
546 // $ANTLR end "Star"
\r
548 // $ANTLR start "At"
\r
549 public final void mAt() throws RecognitionException {
\r
552 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
553 // SilkLine.g:192:3: ( '@' )
\r
554 // SilkLine.g:192:6: '@'
\r
557 transit(Symbol.At);
\r
561 state.type = _type;
\r
562 state.channel = _channel;
\r
569 // $ANTLR start "Plus"
\r
570 public final void mPlus() throws RecognitionException {
\r
573 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
574 // SilkLine.g:193:5: ( '+' )
\r
575 // SilkLine.g:193:7: '+'
\r
581 state.type = _type;
\r
582 state.channel = _channel;
\r
587 // $ANTLR end "Plus"
\r
589 // $ANTLR start "LBracket"
\r
590 public final void mLBracket() throws RecognitionException {
\r
592 int _type = LBracket;
\r
593 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
594 // SilkLine.g:194:9: ( '[' )
\r
595 // SilkLine.g:194:11: '['
\r
598 transit(Symbol.EnterParen);
\r
602 state.type = _type;
\r
603 state.channel = _channel;
\r
608 // $ANTLR end "LBracket"
\r
610 // $ANTLR start "RBracket"
\r
611 public final void mRBracket() throws RecognitionException {
\r
613 int _type = RBracket;
\r
614 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
615 // SilkLine.g:195:9: ( ']' )
\r
616 // SilkLine.g:195:11: ']'
\r
622 state.type = _type;
\r
623 state.channel = _channel;
\r
628 // $ANTLR end "RBracket"
\r
630 // $ANTLR start "Question"
\r
631 public final void mQuestion() throws RecognitionException {
\r
633 int _type = Question;
\r
634 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
635 // SilkLine.g:196:9: ( '?' )
\r
636 // SilkLine.g:196:11: '?'
\r
642 state.type = _type;
\r
643 state.channel = _channel;
\r
648 // $ANTLR end "Question"
\r
650 // $ANTLR start "Digit"
\r
651 public final void mDigit() throws RecognitionException {
\r
653 // SilkLine.g:198:15: ( '0' .. '9' )
\r
654 // SilkLine.g:198:17: '0' .. '9'
\r
656 matchRange('0','9');
\r
664 // $ANTLR end "Digit"
\r
666 // $ANTLR start "Letter"
\r
667 public final void mLetter() throws RecognitionException {
\r
669 // SilkLine.g:199:16: ( 'A' .. 'F' | 'a' .. 'f' )
\r
672 if ( (input.LA(1)>='A' && input.LA(1)<='F')||(input.LA(1)>='a' && input.LA(1)<='f') ) {
\r
677 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
688 // $ANTLR end "Letter"
\r
690 // $ANTLR start "HexDigit"
\r
691 public final void mHexDigit() throws RecognitionException {
\r
693 // SilkLine.g:200:18: ( Digit | Letter )
\r
696 if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='F')||(input.LA(1)>='a' && input.LA(1)<='f') ) {
\r
701 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
712 // $ANTLR end "HexDigit"
\r
714 // $ANTLR start "UnicodeChar"
\r
715 public final void mUnicodeChar() throws RecognitionException {
\r
717 // SilkLine.g:201:21: (~ ( '\"' | '\\\\' ) )
\r
718 // SilkLine.g:201:23: ~ ( '\"' | '\\\\' )
\r
720 if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
\r
725 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
736 // $ANTLR end "UnicodeChar"
\r
738 // $ANTLR start "EscapeSequence"
\r
739 public final void mEscapeSequence() throws RecognitionException {
\r
741 // SilkLine.g:203:2: ( '\\\\' ( '\\\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HexDigit HexDigit HexDigit HexDigit ) )
\r
742 // SilkLine.g:203:4: '\\\\' ( '\\\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HexDigit HexDigit HexDigit HexDigit )
\r
745 // SilkLine.g:203:9: ( '\\\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HexDigit HexDigit HexDigit HexDigit )
\r
747 switch ( input.LA(1) ) {
\r
794 NoViableAltException nvae =
\r
795 new NoViableAltException("", 5, 0, input);
\r
802 // SilkLine.g:203:10: '\\\"'
\r
809 // SilkLine.g:203:17: '\\\\'
\r
816 // SilkLine.g:203:24: '/'
\r
823 // SilkLine.g:203:30: 'b'
\r
830 // SilkLine.g:203:36: 'f'
\r
837 // SilkLine.g:203:42: 'n'
\r
844 // SilkLine.g:203:48: 'r'
\r
851 // SilkLine.g:203:54: 't'
\r
858 // SilkLine.g:203:60: 'u' HexDigit HexDigit HexDigit HexDigit
\r
878 // $ANTLR end "EscapeSequence"
\r
880 // $ANTLR start "StringChar"
\r
881 public final void mStringChar() throws RecognitionException {
\r
883 // SilkLine.g:205:21: ( UnicodeChar | EscapeSequence )
\r
885 int LA6_0 = input.LA(1);
\r
887 if ( ((LA6_0>='\u0000' && LA6_0<='!')||(LA6_0>='#' && LA6_0<='[')||(LA6_0>=']' && LA6_0<='\uFFFF')) ) {
\r
890 else if ( (LA6_0=='\\') ) {
\r
894 NoViableAltException nvae =
\r
895 new NoViableAltException("", 6, 0, input);
\r
901 // SilkLine.g:205:24: UnicodeChar
\r
908 // SilkLine.g:205:38: EscapeSequence
\r
910 mEscapeSequence();
\r
920 // $ANTLR end "StringChar"
\r
922 // $ANTLR start "StringChar_s"
\r
923 public final void mStringChar_s() throws RecognitionException {
\r
925 // SilkLine.g:206:22: ( ( StringChar )* )
\r
926 // SilkLine.g:206:24: ( StringChar )*
\r
928 // SilkLine.g:206:24: ( StringChar )*
\r
932 int LA7_0 = input.LA(1);
\r
934 if ( ((LA7_0>='\u0000' && LA7_0<='!')||(LA7_0>='#' && LA7_0<='\uFFFF')) ) {
\r
941 // SilkLine.g:206:24: StringChar
\r
960 // $ANTLR end "StringChar_s"
\r
962 // $ANTLR start "String"
\r
963 public final void mString() throws RecognitionException {
\r
965 int _type = String;
\r
966 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
969 // SilkLine.g:207:7: ( '\"' s= StringChar_s '\"' )
\r
970 // SilkLine.g:207:9: '\"' s= StringChar_s '\"'
\r
973 int sStart413 = getCharIndex();
\r
975 s = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, sStart413, getCharIndex()-1);
\r
977 setText((s!=null?s.getText():null)); transit(Symbol.LeaveValue);
\r
981 state.type = _type;
\r
982 state.channel = _channel;
\r
987 // $ANTLR end "String"
\r
989 // $ANTLR start "ScopeIndicator"
\r
990 public final void mScopeIndicator() throws RecognitionException {
\r
992 // SilkLine.g:210:24: ( '(' | ')' )
\r
995 if ( (input.LA(1)>='(' && input.LA(1)<=')') ) {
\r
1000 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
1011 // $ANTLR end "ScopeIndicator"
\r
1013 // $ANTLR start "FlowIndicator"
\r
1014 public final void mFlowIndicator() throws RecognitionException {
\r
1016 // SilkLine.g:211:23: ( '[' | ']' | '{' | '}' )
\r
1019 if ( input.LA(1)=='['||input.LA(1)==']'||input.LA(1)=='{'||input.LA(1)=='}' ) {
\r
1024 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
1035 // $ANTLR end "FlowIndicator"
\r
1037 // $ANTLR start "Indicator"
\r
1038 public final void mIndicator() throws RecognitionException {
\r
1040 // SilkLine.g:212:19: ( FlowIndicator | ScopeIndicator | ',' | ':' | '#' | '>' | '|' | '*' | '\\'' | '\"' | '@' | '%' | '\\\\' | '=' )
\r
1043 if ( (input.LA(1)>='\"' && input.LA(1)<='#')||input.LA(1)=='%'||(input.LA(1)>='\'' && input.LA(1)<='*')||input.LA(1)==','||input.LA(1)==':'||(input.LA(1)>='=' && input.LA(1)<='>')||input.LA(1)=='@'||(input.LA(1)>='[' && input.LA(1)<=']')||(input.LA(1)>='{' && input.LA(1)<='}') ) {
\r
1048 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
1059 // $ANTLR end "Indicator"
\r
1061 // $ANTLR start "PlainUnsafeChar"
\r
1062 public final void mPlainUnsafeChar() throws RecognitionException {
\r
1064 // SilkLine.g:215:25: ( '\"' | '\\\\' | '#' )
\r
1067 if ( (input.LA(1)>='\"' && input.LA(1)<='#')||input.LA(1)=='\\' ) {
\r
1072 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
1083 // $ANTLR end "PlainUnsafeChar"
\r
1085 // $ANTLR start "PlainSafeKey"
\r
1086 public final void mPlainSafeKey() throws RecognitionException {
\r
1088 // SilkLine.g:217:22: (~ ( PlainUnsafeChar | ScopeIndicator | FlowIndicator | ',' | ':' | '>' | '*' | '|' | '=' ) )
\r
1089 // SilkLine.g:217:24: ~ ( PlainUnsafeChar | ScopeIndicator | FlowIndicator | ',' | ':' | '>' | '*' | '|' | '=' )
\r
1091 if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='$' && input.LA(1)<='\'')||input.LA(1)=='+'||(input.LA(1)>='-' && input.LA(1)<='9')||(input.LA(1)>=';' && input.LA(1)<='<')||(input.LA(1)>='?' && input.LA(1)<='Z')||(input.LA(1)>='^' && input.LA(1)<='z')||(input.LA(1)>='~' && input.LA(1)<='\uFFFF') ) {
\r
1096 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
1107 // $ANTLR end "PlainSafeKey"
\r
1109 // $ANTLR start "PlainSafeIn"
\r
1110 public final void mPlainSafeIn() throws RecognitionException {
\r
1112 // SilkLine.g:218:21: (~ ( PlainUnsafeChar | ScopeIndicator | ',' ) )
\r
1113 // SilkLine.g:218:23: ~ ( PlainUnsafeChar | ScopeIndicator | ',' )
\r
1115 if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='$' && input.LA(1)<='\'')||(input.LA(1)>='*' && input.LA(1)<='+')||(input.LA(1)>='-' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
\r
1120 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
1131 // $ANTLR end "PlainSafeIn"
\r
1133 // $ANTLR start "PlainSafeOut"
\r
1134 public final void mPlainSafeOut() throws RecognitionException {
\r
1136 // SilkLine.g:219:22: (~ ( PlainUnsafeChar ) )
\r
1137 // SilkLine.g:219:24: ~ ( PlainUnsafeChar )
\r
1139 if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='$' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
\r
1144 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
1155 // $ANTLR end "PlainSafeOut"
\r
1157 // $ANTLR start "NonSpaceChar"
\r
1158 public final void mNonSpaceChar() throws RecognitionException {
\r
1160 // SilkLine.g:221:22: (~ ( '\"' | '\\\\' | WhiteSpace ) )
\r
1161 // SilkLine.g:221:24: ~ ( '\"' | '\\\\' | WhiteSpace )
\r
1163 if ( (input.LA(1)>='\u0000' && input.LA(1)<='\b')||(input.LA(1)>='\n' && input.LA(1)<='\u001F')||input.LA(1)=='!'||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
\r
1168 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
1179 // $ANTLR end "NonSpaceChar"
\r
1181 // $ANTLR start "PlainFirst"
\r
1182 public final void mPlainFirst() throws RecognitionException {
\r
1184 // SilkLine.g:223:2: (~ ( '-' | '+' | '?' | PlainUnsafeChar | WhiteSpace | Indicator ) | {...}? => ( '-' | '+' | ( ':' | '?' ) NonSpaceChar ) )
\r
1186 int LA9_0 = input.LA(1);
\r
1188 if ( ((LA9_0>='\u0000' && LA9_0<='\b')||(LA9_0>='\n' && LA9_0<='\u001F')||LA9_0=='!'||LA9_0=='$'||LA9_0=='&'||(LA9_0>='.' && LA9_0<='9')||(LA9_0>=';' && LA9_0<='<')||(LA9_0>='A' && LA9_0<='Z')||(LA9_0>='^' && LA9_0<='z')||(LA9_0>='~' && LA9_0<='\uFFFF')) ) {
\r
1191 else if ( (LA9_0=='+'||LA9_0=='-'||LA9_0==':'||LA9_0=='?') && (( isValue() ))) {
\r
1195 NoViableAltException nvae =
\r
1196 new NoViableAltException("", 9, 0, input);
\r
1202 // SilkLine.g:223:5: ~ ( '-' | '+' | '?' | PlainUnsafeChar | WhiteSpace | Indicator )
\r
1204 if ( (input.LA(1)>='\u0000' && input.LA(1)<='\b')||(input.LA(1)>='\n' && input.LA(1)<='\u001F')||input.LA(1)=='!'||input.LA(1)=='$'||input.LA(1)=='&'||(input.LA(1)>='.' && input.LA(1)<='9')||(input.LA(1)>=';' && input.LA(1)<='<')||(input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='^' && input.LA(1)<='z')||(input.LA(1)>='~' && input.LA(1)<='\uFFFF') ) {
\r
1209 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
1217 // SilkLine.g:224:4: {...}? => ( '-' | '+' | ( ':' | '?' ) NonSpaceChar )
\r
1219 if ( !(( isValue() )) ) {
\r
1220 throw new FailedPredicateException(input, "PlainFirst", " isValue() ");
\r
1222 // SilkLine.g:224:22: ( '-' | '+' | ( ':' | '?' ) NonSpaceChar )
\r
1224 switch ( input.LA(1) ) {
\r
1242 NoViableAltException nvae =
\r
1243 new NoViableAltException("", 8, 0, input);
\r
1250 // SilkLine.g:224:23: '-'
\r
1257 // SilkLine.g:224:29: '+'
\r
1264 // SilkLine.g:224:35: ( ':' | '?' ) NonSpaceChar
\r
1266 if ( input.LA(1)==':'||input.LA(1)=='?' ) {
\r
1271 MismatchedSetException mse = new MismatchedSetException(null,input);
\r
1291 // $ANTLR end "PlainFirst"
\r
1293 // $ANTLR start "PlainOneLine"
\r
1294 public final void mPlainOneLine() throws RecognitionException {
\r
1296 int _type = PlainOneLine;
\r
1297 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
1298 // SilkLine.g:228:2: ({...}? => PlainFirst ( PlainSafeKey )* | {...}? => PlainFirst ( PlainSafeIn )* | {...}? => PlainFirst ( PlainSafeOut )* )
\r
1300 int LA13_0 = input.LA(1);
\r
1302 if ( ((LA13_0>='\u0000' && LA13_0<='\b')||(LA13_0>='\n' && LA13_0<='\u001F')||LA13_0=='!'||LA13_0=='$'||LA13_0=='&'||(LA13_0>='.' && LA13_0<='9')||(LA13_0>=';' && LA13_0<='<')||(LA13_0>='A' && LA13_0<='Z')||(LA13_0>='^' && LA13_0<='z')||(LA13_0>='~' && LA13_0<='\uFFFF')) && ((( isInValue() )||( isOutValue() )||( isKey() )))) {
\r
1303 int LA13_1 = input.LA(2);
\r
1305 if ( (( isKey() )) ) {
\r
1308 else if ( (( isInValue() )) ) {
\r
1311 else if ( (( isOutValue() )) ) {
\r
1315 NoViableAltException nvae =
\r
1316 new NoViableAltException("", 13, 1, input);
\r
1321 else if ( (LA13_0=='-') && (((( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))))) {
\r
1322 int LA13_2 = input.LA(2);
\r
1324 if ( ((( isKey() )&&( isValue() ))) ) {
\r
1327 else if ( ((( isInValue() )&&( isValue() ))) ) {
\r
1330 else if ( ((( isOutValue() )&&( isValue() ))) ) {
\r
1334 NoViableAltException nvae =
\r
1335 new NoViableAltException("", 13, 2, input);
\r
1340 else if ( (LA13_0=='+') && (((( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))))) {
\r
1341 int LA13_3 = input.LA(2);
\r
1343 if ( ((( isKey() )&&( isValue() ))) ) {
\r
1346 else if ( ((( isInValue() )&&( isValue() ))) ) {
\r
1349 else if ( ((( isOutValue() )&&( isValue() ))) ) {
\r
1353 NoViableAltException nvae =
\r
1354 new NoViableAltException("", 13, 3, input);
\r
1359 else if ( (LA13_0==':'||LA13_0=='?') && (((( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))))) {
\r
1360 int LA13_4 = input.LA(2);
\r
1362 if ( ((LA13_4>='\u0000' && LA13_4<='\b')||(LA13_4>='\n' && LA13_4<='\u001F')||LA13_4=='!'||(LA13_4>='#' && LA13_4<='[')||(LA13_4>=']' && LA13_4<='\uFFFF')) && (((( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))))) {
\r
1363 int LA13_8 = input.LA(3);
\r
1365 if ( ((( isKey() )&&( isValue() ))) ) {
\r
1368 else if ( ((( isInValue() )&&( isValue() ))) ) {
\r
1371 else if ( ((( isOutValue() )&&( isValue() ))) ) {
\r
1375 NoViableAltException nvae =
\r
1376 new NoViableAltException("", 13, 8, input);
\r
1382 NoViableAltException nvae =
\r
1383 new NoViableAltException("", 13, 4, input);
\r
1389 NoViableAltException nvae =
\r
1390 new NoViableAltException("", 13, 0, input);
\r
1396 // SilkLine.g:228:4: {...}? => PlainFirst ( PlainSafeKey )*
\r
1398 if ( !(( isKey() )) ) {
\r
1399 throw new FailedPredicateException(input, "PlainOneLine", " isKey() ");
\r
1402 // SilkLine.g:228:32: ( PlainSafeKey )*
\r
1406 int LA10_0 = input.LA(1);
\r
1408 if ( ((LA10_0>='\u0000' && LA10_0<='!')||(LA10_0>='$' && LA10_0<='\'')||LA10_0=='+'||(LA10_0>='-' && LA10_0<='9')||(LA10_0>=';' && LA10_0<='<')||(LA10_0>='?' && LA10_0<='Z')||(LA10_0>='^' && LA10_0<='z')||(LA10_0>='~' && LA10_0<='\uFFFF')) ) {
\r
1415 // SilkLine.g:228:32: PlainSafeKey
\r
1427 transit(Symbol.LeaveValue);
\r
1432 // SilkLine.g:229:5: {...}? => PlainFirst ( PlainSafeIn )*
\r
1434 if ( !(( isInValue() )) ) {
\r
1435 throw new FailedPredicateException(input, "PlainOneLine", " isInValue() ");
\r
1438 // SilkLine.g:229:37: ( PlainSafeIn )*
\r
1442 int LA11_0 = input.LA(1);
\r
1444 if ( ((LA11_0>='\u0000' && LA11_0<='!')||(LA11_0>='$' && LA11_0<='\'')||(LA11_0>='*' && LA11_0<='+')||(LA11_0>='-' && LA11_0<='[')||(LA11_0>=']' && LA11_0<='\uFFFF')) ) {
\r
1451 // SilkLine.g:229:37: PlainSafeIn
\r
1463 transit(Symbol.LeaveValue);
\r
1468 // SilkLine.g:230:5: {...}? => PlainFirst ( PlainSafeOut )*
\r
1470 if ( !(( isOutValue() )) ) {
\r
1471 throw new FailedPredicateException(input, "PlainOneLine", " isOutValue() ");
\r
1474 // SilkLine.g:230:38: ( PlainSafeOut )*
\r
1478 int LA12_0 = input.LA(1);
\r
1480 if ( ((LA12_0>='\u0000' && LA12_0<='!')||(LA12_0>='$' && LA12_0<='[')||(LA12_0>=']' && LA12_0<='\uFFFF')) ) {
\r
1487 // SilkLine.g:230:38: PlainSafeOut
\r
1499 transit(Symbol.LeaveValue);
\r
1505 state.type = _type;
\r
1506 state.channel = _channel;
\r
1511 // $ANTLR end "PlainOneLine"
\r
1513 // $ANTLR start "JSON"
\r
1514 public final void mJSON() throws RecognitionException {
\r
1517 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
1518 // SilkLine.g:235:2: ({...}? => '{' | {...}? => '[' )
\r
1520 int LA14_0 = input.LA(1);
\r
1522 if ( (LA14_0=='{') && (( isValue() ))) {
\r
1525 else if ( (LA14_0=='[') && (( isValue() ))) {
\r
1529 NoViableAltException nvae =
\r
1530 new NoViableAltException("", 14, 0, input);
\r
1536 // SilkLine.g:235:4: {...}? => '{'
\r
1538 if ( !(( isValue() )) ) {
\r
1539 throw new FailedPredicateException(input, "JSON", " isValue() ");
\r
1543 //_logger.info("enter JSON object");
\r
1544 InLineJSONLexer l = new InLineJSONLexer(input);
\r
1545 CommonTokenStream tokens = new CommonTokenStream(l);
\r
1546 InLineJSONParser p = new InLineJSONParser(tokens);
\r
1547 p.jsonObjectFragment();
\r
1549 //_channel = JSON_CHANNEL;
\r
1550 emit(new CommonToken(JSON, getText()));
\r
1556 // SilkLine.g:246:4: {...}? => '['
\r
1558 if ( !(( isValue() )) ) {
\r
1559 throw new FailedPredicateException(input, "JSON", " isValue() ");
\r
1563 //_logger.info("enter JSON array");
\r
1564 InLineJSONLexer l = new InLineJSONLexer(input);
\r
1565 CommonTokenStream tokens = new CommonTokenStream(l);
\r
1566 InLineJSONParser p = new InLineJSONParser(tokens);
\r
1567 p.jsonArrayFragment();
\r
1569 //_channel = JSON_CHANNEL;
\r
1570 emit(new CommonToken(JSON, getText()));
\r
1577 state.type = _type;
\r
1578 state.channel = _channel;
\r
1583 // $ANTLR end "JSON"
\r
1585 // $ANTLR start "Separation"
\r
1586 public final void mSeparation() throws RecognitionException {
\r
1588 int _type = Separation;
\r
1589 int _channel = DEFAULT_TOKEN_CHANNEL;
\r
1590 // SilkLine.g:259:11: ({...}? => ( WhiteSpace )+ )
\r
1591 // SilkLine.g:259:13: {...}? => ( WhiteSpace )+
\r
1593 if ( !(( !isHead() )) ) {
\r
1594 throw new FailedPredicateException(input, "Separation", " !isHead() ");
\r
1596 // SilkLine.g:259:31: ( WhiteSpace )+
\r
1601 int LA15_0 = input.LA(1);
\r
1603 if ( (LA15_0=='\t'||LA15_0==' ') ) {
\r
1610 // SilkLine.g:259:31: WhiteSpace
\r
1618 if ( cnt15 >= 1 ) break loop15;
\r
1619 EarlyExitException eee =
\r
1620 new EarlyExitException(15, input);
\r
1630 state.type = _type;
\r
1631 state.channel = _channel;
\r
1636 // $ANTLR end "Separation"
\r
1638 public void mTokens() throws RecognitionException {
\r
1639 // SilkLine.g:1:8: ( LineComment | NodeIndent | FunctionIndent | BlankLine | LParen | RParen | Comma | Colon | EqEq | Seq | TabSeq | Star | At | Plus | LBracket | RBracket | Question | String | PlainOneLine | JSON | Separation )
\r
1641 alt16 = dfa16.predict(input);
\r
1644 // SilkLine.g:1:10: LineComment
\r
1651 // SilkLine.g:1:22: NodeIndent
\r
1658 // SilkLine.g:1:33: FunctionIndent
\r
1660 mFunctionIndent();
\r
1665 // SilkLine.g:1:48: BlankLine
\r
1672 // SilkLine.g:1:58: LParen
\r
1679 // SilkLine.g:1:65: RParen
\r
1686 // SilkLine.g:1:72: Comma
\r
1693 // SilkLine.g:1:78: Colon
\r
1700 // SilkLine.g:1:84: EqEq
\r
1707 // SilkLine.g:1:89: Seq
\r
1714 // SilkLine.g:1:93: TabSeq
\r
1721 // SilkLine.g:1:100: Star
\r
1728 // SilkLine.g:1:105: At
\r
1735 // SilkLine.g:1:108: Plus
\r
1742 // SilkLine.g:1:113: LBracket
\r
1749 // SilkLine.g:1:122: RBracket
\r
1756 // SilkLine.g:1:131: Question
\r
1763 // SilkLine.g:1:140: String
\r
1770 // SilkLine.g:1:147: PlainOneLine
\r
1777 // SilkLine.g:1:160: JSON
\r
1784 // SilkLine.g:1:165: Separation
\r
1796 protected DFA16 dfa16 = new DFA16(this);
\r
1797 static final String DFA16_eotS =
\r
1798 "\1\6\1\uffff\1\26\1\31\1\35\1\26\4\uffff\1\37\4\uffff\1\40\1\41"+
\r
1799 "\1\uffff\1\42\24\uffff";
\r
1800 static final String DFA16_eofS =
\r
1802 static final String DFA16_minS =
\r
1803 "\1\0\1\uffff\1\11\2\0\1\11\4\uffff\1\0\4\uffff\2\0\1\uffff\1\0"+
\r
1804 "\3\uffff\1\0\2\uffff\1\0\3\uffff\1\0\2\uffff\2\0\5\uffff";
\r
1805 static final String DFA16_maxS =
\r
1806 "\1\uffff\1\uffff\1\100\1\uffff\1\0\1\40\4\uffff\1\uffff\4\uffff"+
\r
1807 "\1\uffff\1\0\1\uffff\1\uffff\3\uffff\1\0\2\uffff\1\0\3\uffff\1\0"+
\r
1808 "\2\uffff\2\0\5\uffff";
\r
1809 static final String DFA16_acceptS =
\r
1810 "\1\uffff\1\1\4\uffff\1\4\1\5\1\6\1\7\1\uffff\1\11\1\12\1\13\1\14"+
\r
1811 "\2\uffff\1\20\1\uffff\1\22\1\23\1\24\1\uffff\1\2\1\3\1\uffff\3\23"+
\r
1812 "\1\uffff\1\23\1\10\2\uffff\1\21\1\25\1\15\1\16\1\17";
\r
1813 static final String DFA16_specialS =
\r
1814 "\1\7\1\uffff\1\4\1\11\1\uffff\1\3\4\uffff\1\12\4\uffff\1\13\2\uffff"+
\r
1815 "\1\1\3\uffff\1\2\2\uffff\1\10\3\uffff\1\0\2\uffff\1\6\1\5\5\uffff}>";
\r
1816 static final String[] DFA16_transitionS = {
\r
1817 "\11\24\1\5\26\24\1\2\1\24\1\23\1\1\1\24\1\uffff\1\24\1\uffff"+
\r
1818 "\1\7\1\10\1\16\1\17\1\11\1\3\14\24\1\12\2\24\1\13\1\14\1\22"+
\r
1819 "\1\4\32\24\1\20\1\uffff\1\21\35\24\1\25\1\15\1\uffff\uff82\24",
\r
1821 "\1\5\26\uffff\1\2\14\uffff\1\27\22\uffff\1\30",
\r
1822 "\42\32\2\uffff\4\32\2\34\1\33\1\32\1\34\15\32\1\33\2\32\2"+
\r
1823 "\33\34\32\1\33\1\uffff\1\33\35\32\3\33\uff82\32",
\r
1825 "\1\5\26\uffff\1\5",
\r
1830 "\11\36\1\uffff\26\36\1\uffff\1\36\1\uffff\71\36\1\uffff\uffa3"+
\r
1836 "\42\32\2\uffff\4\32\2\34\1\33\1\32\1\34\15\32\1\33\2\32\2"+
\r
1837 "\33\34\32\1\33\1\uffff\1\33\35\32\3\33\uff82\32",
\r
1840 "\11\36\1\uffff\26\36\1\uffff\1\36\1\uffff\71\36\1\uffff\uffa3"+
\r
1864 static final short[] DFA16_eot = DFA.unpackEncodedString(DFA16_eotS);
\r
1865 static final short[] DFA16_eof = DFA.unpackEncodedString(DFA16_eofS);
\r
1866 static final char[] DFA16_min = DFA.unpackEncodedStringToUnsignedChars(DFA16_minS);
\r
1867 static final char[] DFA16_max = DFA.unpackEncodedStringToUnsignedChars(DFA16_maxS);
\r
1868 static final short[] DFA16_accept = DFA.unpackEncodedString(DFA16_acceptS);
\r
1869 static final short[] DFA16_special = DFA.unpackEncodedString(DFA16_specialS);
\r
1870 static final short[][] DFA16_transition;
\r
1873 int numStates = DFA16_transitionS.length;
\r
1874 DFA16_transition = new short[numStates][];
\r
1875 for (int i=0; i<numStates; i++) {
\r
1876 DFA16_transition[i] = DFA.unpackEncodedString(DFA16_transitionS[i]);
\r
1880 class DFA16 extends DFA {
\r
1882 public DFA16(BaseRecognizer recognizer) {
\r
1883 this.recognizer = recognizer;
\r
1884 this.decisionNumber = 16;
\r
1885 this.eot = DFA16_eot;
\r
1886 this.eof = DFA16_eof;
\r
1887 this.min = DFA16_min;
\r
1888 this.max = DFA16_max;
\r
1889 this.accept = DFA16_accept;
\r
1890 this.special = DFA16_special;
\r
1891 this.transition = DFA16_transition;
\r
1893 public String getDescription() {
\r
1894 return "1:1: Tokens : ( LineComment | NodeIndent | FunctionIndent | BlankLine | LParen | RParen | Comma | Colon | EqEq | Seq | TabSeq | Star | At | Plus | LBracket | RBracket | Question | String | PlainOneLine | JSON | Separation );";
\r
1896 public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
\r
1897 IntStream input = _input;
\r
1901 int LA16_29 = input.LA(1);
\r
1904 int index16_29 = input.index();
\r
1907 if ( (( isHead() )) ) {s = 24;}
\r
1909 else if ( (true) ) {s = 36;}
\r
1912 input.seek(index16_29);
\r
1913 if ( s>=0 ) return s;
\r
1916 int LA16_18 = input.LA(1);
\r
1919 int index16_18 = input.index();
\r
1922 if ( ((LA16_18>='\u0000' && LA16_18<='\b')||(LA16_18>='\n' && LA16_18<='\u001F')||LA16_18=='!'||(LA16_18>='#' && LA16_18<='[')||(LA16_18>=']' && LA16_18<='\uFFFF')) && (((( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))))) {s = 30;}
\r
1927 input.seek(index16_18);
\r
1928 if ( s>=0 ) return s;
\r
1931 int LA16_22 = input.LA(1);
\r
1934 int index16_22 = input.index();
\r
1937 if ( (( isHead() )) ) {s = 6;}
\r
1939 else if ( (( !isHead() )) ) {s = 35;}
\r
1942 input.seek(index16_22);
\r
1943 if ( s>=0 ) return s;
\r
1946 int LA16_5 = input.LA(1);
\r
1949 int index16_5 = input.index();
\r
1952 if ( (LA16_5=='\t'||LA16_5==' ') && ((( !isHead() )||( isHead() )))) {s = 5;}
\r
1957 input.seek(index16_5);
\r
1958 if ( s>=0 ) return s;
\r
1961 int LA16_2 = input.LA(1);
\r
1964 int index16_2 = input.index();
\r
1967 if ( (LA16_2==' ') && ((( !isHead() )||( isHead() )))) {s = 2;}
\r
1969 else if ( (LA16_2=='-') && (( isHead() ))) {s = 23;}
\r
1971 else if ( (LA16_2=='\t') && ((( !isHead() )||( isHead() )))) {s = 5;}
\r
1973 else if ( (LA16_2=='@') && (( isHead() ))) {s = 24;}
\r
1978 input.seek(index16_2);
\r
1979 if ( s>=0 ) return s;
\r
1982 int LA16_33 = input.LA(1);
\r
1985 int index16_33 = input.index();
\r
1988 if ( (!((( isValue() )))) ) {s = 38;}
\r
1990 else if ( (( isValue() )) ) {s = 21;}
\r
1993 input.seek(index16_33);
\r
1994 if ( s>=0 ) return s;
\r
1997 int LA16_32 = input.LA(1);
\r
2000 int index16_32 = input.index();
\r
2003 if ( (!((((( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() )))))) ) {s = 37;}
\r
2005 else if ( (((( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() )))) ) {s = 30;}
\r
2008 input.seek(index16_32);
\r
2009 if ( s>=0 ) return s;
\r
2012 int LA16_0 = input.LA(1);
\r
2015 int index16_0 = input.index();
\r
2018 if ( (LA16_0=='#') ) {s = 1;}
\r
2020 else if ( (LA16_0==' ') && ((( !isHead() )||( isHead() )))) {s = 2;}
\r
2022 else if ( (LA16_0=='-') && (((( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||( isHead() )||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))))) {s = 3;}
\r
2024 else if ( (LA16_0=='@') ) {s = 4;}
\r
2026 else if ( (LA16_0=='\t') && ((( !isHead() )||( isHead() )))) {s = 5;}
\r
2028 else if ( (LA16_0=='(') ) {s = 7;}
\r
2030 else if ( (LA16_0==')') ) {s = 8;}
\r
2032 else if ( (LA16_0==',') ) {s = 9;}
\r
2034 else if ( (LA16_0==':') ) {s = 10;}
\r
2036 else if ( (LA16_0=='=') ) {s = 11;}
\r
2038 else if ( (LA16_0=='>') ) {s = 12;}
\r
2040 else if ( (LA16_0=='|') ) {s = 13;}
\r
2042 else if ( (LA16_0=='*') ) {s = 14;}
\r
2044 else if ( (LA16_0=='+') ) {s = 15;}
\r
2046 else if ( (LA16_0=='[') ) {s = 16;}
\r
2048 else if ( (LA16_0==']') ) {s = 17;}
\r
2050 else if ( (LA16_0=='?') ) {s = 18;}
\r
2052 else if ( (LA16_0=='\"') ) {s = 19;}
\r
2054 else if ( ((LA16_0>='\u0000' && LA16_0<='\b')||(LA16_0>='\n' && LA16_0<='\u001F')||LA16_0=='!'||LA16_0=='$'||LA16_0=='&'||(LA16_0>='.' && LA16_0<='9')||(LA16_0>=';' && LA16_0<='<')||(LA16_0>='A' && LA16_0<='Z')||(LA16_0>='^' && LA16_0<='z')||(LA16_0>='~' && LA16_0<='\uFFFF')) && ((( isInValue() )||( isOutValue() )||( isKey() )))) {s = 20;}
\r
2056 else if ( (LA16_0=='{') && (( isValue() ))) {s = 21;}
\r
2061 input.seek(index16_0);
\r
2062 if ( s>=0 ) return s;
\r
2065 int LA16_25 = input.LA(1);
\r
2068 int index16_25 = input.index();
\r
2071 if ( (( isHead() )) ) {s = 23;}
\r
2073 else if ( (((( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() )))) ) {s = 30;}
\r
2076 input.seek(index16_25);
\r
2077 if ( s>=0 ) return s;
\r
2080 int LA16_3 = input.LA(1);
\r
2083 int index16_3 = input.index();
\r
2086 if ( ((LA16_3>='\u0000' && LA16_3<='!')||(LA16_3>='$' && LA16_3<='\'')||LA16_3=='+'||(LA16_3>='-' && LA16_3<='9')||(LA16_3>=';' && LA16_3<='<')||(LA16_3>='?' && LA16_3<='Z')||(LA16_3>='^' && LA16_3<='z')||(LA16_3>='~' && LA16_3<='\uFFFF')) && (((( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))))) {s = 26;}
\r
2088 else if ( (LA16_3=='*'||LA16_3==':'||(LA16_3>='=' && LA16_3<='>')||LA16_3=='['||LA16_3==']'||(LA16_3>='{' && LA16_3<='}')) && (((( isInValue() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))))) {s = 27;}
\r
2090 else if ( ((LA16_3>='(' && LA16_3<=')')||LA16_3==',') && ((( isOutValue() )&&( isValue() )))) {s = 28;}
\r
2095 input.seek(index16_3);
\r
2096 if ( s>=0 ) return s;
\r
2099 int LA16_10 = input.LA(1);
\r
2102 int index16_10 = input.index();
\r
2105 if ( ((LA16_10>='\u0000' && LA16_10<='\b')||(LA16_10>='\n' && LA16_10<='\u001F')||LA16_10=='!'||(LA16_10>='#' && LA16_10<='[')||(LA16_10>=']' && LA16_10<='\uFFFF')) && (((( isOutValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isInValue() )&&( isValue() ))))) {s = 30;}
\r
2110 input.seek(index16_10);
\r
2111 if ( s>=0 ) return s;
\r
2114 int LA16_15 = input.LA(1);
\r
2117 int index16_15 = input.index();
\r
2120 if ( ((LA16_15>='\u0000' && LA16_15<='!')||(LA16_15>='$' && LA16_15<='\'')||LA16_15=='+'||(LA16_15>='-' && LA16_15<='9')||(LA16_15>=';' && LA16_15<='<')||(LA16_15>='?' && LA16_15<='Z')||(LA16_15>='^' && LA16_15<='z')||(LA16_15>='~' && LA16_15<='\uFFFF')) && (((( isInValue() )&&( isValue() ))||(( isKey() )&&( isValue() ))||(( isOutValue() )&&( isValue() ))))) {s = 26;}
\r
2122 else if ( (LA16_15=='*'||LA16_15==':'||(LA16_15>='=' && LA16_15<='>')||LA16_15=='['||LA16_15==']'||(LA16_15>='{' && LA16_15<='}')) && (((( isOutValue() )&&( isValue() ))||(( isInValue() )&&( isValue() ))))) {s = 27;}
\r
2124 else if ( ((LA16_15>='(' && LA16_15<=')')||LA16_15==',') && ((( isOutValue() )&&( isValue() )))) {s = 28;}
\r
2129 input.seek(index16_15);
\r
2130 if ( s>=0 ) return s;
\r
2133 NoViableAltException nvae =
\r
2134 new NoViableAltException(getDescription(), 16, _s, input);
\r