From 352024230ecb5be69555704a34e6a2b7cee94e02 Mon Sep 17 00:00:00 2001 From: leo Date: Sun, 1 Feb 2009 15:14:38 +0000 Subject: [PATCH] implemnted toString() methods git-svn-id: http://www.xerial.org/svn/project/XerialJ/trunk/xerial-core@2923 ae02f08e-27ec-0310-ae8c-8ba02fe2eafd --- src/main/java/org/xerial/silk/SilkPullParser.java | 3 + .../java/org/xerial/silk/impl/InLineJSONLexer.java | 182 ++++++------- .../org/xerial/silk/impl/InLineJSONParser.java | 70 ++--- .../java/org/xerial/silk/impl/SilkFunction.java | 19 ++ .../java/org/xerial/silk/impl/SilkFunctionArg.java | 51 ++-- .../java/org/xerial/silk/impl/SilkJSONValue.java | 57 ++++ src/main/java/org/xerial/silk/impl/SilkLexer.java | 296 ++++++++++----------- src/main/java/org/xerial/silk/impl/SilkNode.java | 53 +++- .../org/xerial/silk/impl/SilkNodeOccurrence.java | 54 ++++ src/main/java/org/xerial/silk/impl/SilkParser.java | 160 +++++------ .../java/org/xerial/silk/impl/SilkTextValue.java | 59 ++++ .../{SiklNodeOccurrence.java => SilkValue.java} | 80 +++--- src/test/java/org/xerial/silk/small.silk | 3 + 13 files changed, 666 insertions(+), 421 deletions(-) create mode 100644 src/main/java/org/xerial/silk/impl/SilkJSONValue.java create mode 100644 src/main/java/org/xerial/silk/impl/SilkNodeOccurrence.java create mode 100644 src/main/java/org/xerial/silk/impl/SilkTextValue.java rename src/main/java/org/xerial/silk/impl/{SiklNodeOccurrence.java => SilkValue.java} (75%) diff --git a/src/main/java/org/xerial/silk/SilkPullParser.java b/src/main/java/org/xerial/silk/SilkPullParser.java index da2b385..0d1b29b 100644 --- a/src/main/java/org/xerial/silk/SilkPullParser.java +++ b/src/main/java/org/xerial/silk/SilkPullParser.java @@ -89,11 +89,13 @@ public class SilkPullParser case SilkParser.Function: { SilkFunction func = BeanUtilImpl.createBeanFromParseTree(SilkFunction.class, t, SilkParser.tokenNames); + _logger.info(func); return SilkEvent.FUNCTION; } case SilkParser.SilkNode: { SilkNode node = BeanUtilImpl.createBeanFromParseTree(SilkNode.class, t, SilkParser.tokenNames); + _logger.info(node); return SilkEvent.NODE; } case SilkParser.BlankLine: @@ -103,6 +105,7 @@ public class SilkPullParser case SilkParser.DataLine: { String dataLine = t.getText(); + _logger.info("data line: " + dataLine); return SilkEvent.DATA_LINE; } } diff --git a/src/main/java/org/xerial/silk/impl/InLineJSONLexer.java b/src/main/java/org/xerial/silk/impl/InLineJSONLexer.java index 426ae4d..9137470 100644 --- a/src/main/java/org/xerial/silk/impl/InLineJSONLexer.java +++ b/src/main/java/org/xerial/silk/impl/InLineJSONLexer.java @@ -1,4 +1,4 @@ -// $ANTLR 3.1.1 F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g 2009-01-30 14:19:46 +// $ANTLR 3.1.1 c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g 2009-01-30 21:13:12 //-------------------------------------- // XerialJ Project @@ -54,15 +54,15 @@ public class InLineJSONLexer extends Lexer { super(input,state); } - public String getGrammarFileName() { return "F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g"; } + public String getGrammarFileName() { return "c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g"; } // $ANTLR start "T__23" public final void mT__23() throws RecognitionException { try { int _type = T__23; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:21:7: ( 'true' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:21:9: 'true' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:21:7: ( 'true' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:21:9: 'true' { match("true"); @@ -82,8 +82,8 @@ public class InLineJSONLexer extends Lexer { try { int _type = T__24; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:22:7: ( 'false' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:22:9: 'false' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:22:7: ( 'false' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:22:9: 'false' { match("false"); @@ -103,8 +103,8 @@ public class InLineJSONLexer extends Lexer { try { int _type = T__25; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:23:7: ( 'null' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:23:9: 'null' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:23:7: ( 'null' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:23:9: 'null' { match("null"); @@ -124,8 +124,8 @@ public class InLineJSONLexer extends Lexer { try { int _type = WhiteSpace; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:61:11: ( ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:61:13: ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:61:11: ( ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:61:13: ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) { if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||(input.LA(1)>='\f' && input.LA(1)<='\r')||input.LA(1)==' ' ) { input.consume(); @@ -151,8 +151,8 @@ public class InLineJSONLexer extends Lexer { // $ANTLR start "Digit" public final void mDigit() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:63:15: ( '0' .. '9' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:63:17: '0' .. '9' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:63:15: ( '0' .. '9' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:63:17: '0' .. '9' { matchRange('0','9'); @@ -167,8 +167,8 @@ public class InLineJSONLexer extends Lexer { // $ANTLR start "Letter" public final void mLetter() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:64:16: ( 'A' .. 'F' | 'a' .. 'f' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g: + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:64:16: ( 'A' .. 'F' | 'a' .. 'f' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g: { if ( (input.LA(1)>='A' && input.LA(1)<='F')||(input.LA(1)>='a' && input.LA(1)<='f') ) { input.consume(); @@ -191,8 +191,8 @@ public class InLineJSONLexer extends Lexer { // $ANTLR start "HexDigit" public final void mHexDigit() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:65:18: ( Digit | Letter ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g: + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:65:18: ( Digit | Letter ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g: { 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') ) { input.consume(); @@ -215,8 +215,8 @@ public class InLineJSONLexer extends Lexer { // $ANTLR start "UnicodeChar" public final void mUnicodeChar() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:66:21: (~ ( '\"' | '\\\\' ) ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:66:23: ~ ( '\"' | '\\\\' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:66:21: (~ ( '\"' | '\\\\' ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:66:23: ~ ( '\"' | '\\\\' ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { input.consume(); @@ -239,11 +239,11 @@ public class InLineJSONLexer extends Lexer { // $ANTLR start "EscapeSequence" public final void mEscapeSequence() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:2: ( '\\\\' ( '\\\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HexDigit HexDigit HexDigit HexDigit ) ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:4: '\\\\' ( '\\\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HexDigit HexDigit HexDigit HexDigit ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:2: ( '\\\\' ( '\\\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HexDigit HexDigit HexDigit HexDigit ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:4: '\\\\' ( '\\\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HexDigit HexDigit HexDigit HexDigit ) { match('\\'); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:9: ( '\\\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HexDigit HexDigit HexDigit HexDigit ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:9: ( '\\\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HexDigit HexDigit HexDigit HexDigit ) int alt1=9; switch ( input.LA(1) ) { case '\"': @@ -300,63 +300,63 @@ public class InLineJSONLexer extends Lexer { switch (alt1) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:10: '\\\"' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:10: '\\\"' { match('\"'); } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:17: '\\\\' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:17: '\\\\' { match('\\'); } break; case 3 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:24: '/' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:24: '/' { match('/'); } break; case 4 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:30: 'b' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:30: 'b' { match('b'); } break; case 5 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:36: 'f' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:36: 'f' { match('f'); } break; case 6 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:42: 'n' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:42: 'n' { match('n'); } break; case 7 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:48: 'r' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:48: 'r' { match('r'); } break; case 8 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:54: 't' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:54: 't' { match('t'); } break; case 9 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:60: 'u' HexDigit HexDigit HexDigit HexDigit + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:68:60: 'u' HexDigit HexDigit HexDigit HexDigit { match('u'); mHexDigit(); @@ -381,7 +381,7 @@ public class InLineJSONLexer extends Lexer { // $ANTLR start "StringChar" public final void mStringChar() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:71:21: ( UnicodeChar | EscapeSequence ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:71:21: ( UnicodeChar | EscapeSequence ) int alt2=2; int LA2_0 = input.LA(1); @@ -399,14 +399,14 @@ public class InLineJSONLexer extends Lexer { } switch (alt2) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:71:24: UnicodeChar + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:71:24: UnicodeChar { mUnicodeChar(); } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:71:38: EscapeSequence + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:71:38: EscapeSequence { mEscapeSequence(); @@ -423,10 +423,10 @@ public class InLineJSONLexer extends Lexer { // $ANTLR start "StringChar_s" public final void mStringChar_s() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:73:22: ( ( StringChar )* ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:73:24: ( StringChar )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:73:22: ( ( StringChar )* ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:73:24: ( StringChar )* { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:73:24: ( StringChar )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:73:24: ( StringChar )* loop3: do { int alt3=2; @@ -439,7 +439,7 @@ public class InLineJSONLexer extends Lexer { switch (alt3) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:73:24: StringChar + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:73:24: StringChar { mStringChar(); @@ -467,8 +467,8 @@ public class InLineJSONLexer extends Lexer { int _channel = DEFAULT_TOKEN_CHANNEL; Token s=null; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:74:7: ( '\"' s= StringChar_s '\"' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:74:9: '\"' s= StringChar_s '\"' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:74:7: ( '\"' s= StringChar_s '\"' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:74:9: '\"' s= StringChar_s '\"' { match('\"'); int sStart239 = getCharIndex(); @@ -492,8 +492,8 @@ public class InLineJSONLexer extends Lexer { try { int _type = Colon; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:77:6: ( ':' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:77:8: ':' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:77:6: ( ':' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:77:8: ':' { match(':'); @@ -512,8 +512,8 @@ public class InLineJSONLexer extends Lexer { try { int _type = Comma; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:78:6: ( ',' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:78:8: ',' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:78:6: ( ',' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:78:8: ',' { match(','); @@ -532,10 +532,10 @@ public class InLineJSONLexer extends Lexer { try { int _type = Integer; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:8: ( ( '-' )? ( '0' | '1' .. '9' ( Digit )* ) ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:10: ( '-' )? ( '0' | '1' .. '9' ( Digit )* ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:8: ( ( '-' )? ( '0' | '1' .. '9' ( Digit )* ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:10: ( '-' )? ( '0' | '1' .. '9' ( Digit )* ) { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:10: ( '-' )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:10: ( '-' )? int alt4=2; int LA4_0 = input.LA(1); @@ -544,7 +544,7 @@ public class InLineJSONLexer extends Lexer { } switch (alt4) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:10: '-' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:10: '-' { match('-'); @@ -553,7 +553,7 @@ public class InLineJSONLexer extends Lexer { } - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:15: ( '0' | '1' .. '9' ( Digit )* ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:15: ( '0' | '1' .. '9' ( Digit )* ) int alt6=2; int LA6_0 = input.LA(1); @@ -571,17 +571,17 @@ public class InLineJSONLexer extends Lexer { } switch (alt6) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:16: '0' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:16: '0' { match('0'); } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:22: '1' .. '9' ( Digit )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:22: '1' .. '9' ( Digit )* { matchRange('1','9'); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:31: ( Digit )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:31: ( Digit )* loop5: do { int alt5=2; @@ -594,7 +594,7 @@ public class InLineJSONLexer extends Lexer { switch (alt5) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:31: Digit + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:79:31: Digit { mDigit(); @@ -626,11 +626,11 @@ public class InLineJSONLexer extends Lexer { // $ANTLR start "Frac" public final void mFrac() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:80:14: ( '.' ( Digit )+ ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:80:16: '.' ( Digit )+ + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:80:14: ( '.' ( Digit )+ ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:80:16: '.' ( Digit )+ { match('.'); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:80:20: ( Digit )+ + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:80:20: ( Digit )+ int cnt7=0; loop7: do { @@ -644,7 +644,7 @@ public class InLineJSONLexer extends Lexer { switch (alt7) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:80:20: Digit + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:80:20: Digit { mDigit(); @@ -672,8 +672,8 @@ public class InLineJSONLexer extends Lexer { // $ANTLR start "Exp" public final void mExp() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:81:13: ( ( 'e' | 'E' ) ( '+' | '-' )? ( Digit )+ ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:81:15: ( 'e' | 'E' ) ( '+' | '-' )? ( Digit )+ + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:81:13: ( ( 'e' | 'E' ) ( '+' | '-' )? ( Digit )+ ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:81:15: ( 'e' | 'E' ) ( '+' | '-' )? ( Digit )+ { if ( input.LA(1)=='E'||input.LA(1)=='e' ) { input.consume(); @@ -684,7 +684,7 @@ public class InLineJSONLexer extends Lexer { recover(mse); throw mse;} - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:81:27: ( '+' | '-' )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:81:27: ( '+' | '-' )? int alt8=2; int LA8_0 = input.LA(1); @@ -693,7 +693,7 @@ public class InLineJSONLexer extends Lexer { } switch (alt8) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g: + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g: { if ( input.LA(1)=='+'||input.LA(1)=='-' ) { input.consume(); @@ -710,7 +710,7 @@ public class InLineJSONLexer extends Lexer { } - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:81:40: ( Digit )+ + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:81:40: ( Digit )+ int cnt9=0; loop9: do { @@ -724,7 +724,7 @@ public class InLineJSONLexer extends Lexer { switch (alt9) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:81:40: Digit + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:81:40: Digit { mDigit(); @@ -754,11 +754,11 @@ public class InLineJSONLexer extends Lexer { try { int _type = Double; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:82:7: ( Integer ( Frac ( Exp )? | Exp ) ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:82:9: Integer ( Frac ( Exp )? | Exp ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:82:7: ( Integer ( Frac ( Exp )? | Exp ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:82:9: Integer ( Frac ( Exp )? | Exp ) { mInteger(); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:82:17: ( Frac ( Exp )? | Exp ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:82:17: ( Frac ( Exp )? | Exp ) int alt11=2; int LA11_0 = input.LA(1); @@ -776,10 +776,10 @@ public class InLineJSONLexer extends Lexer { } switch (alt11) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:82:18: Frac ( Exp )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:82:18: Frac ( Exp )? { mFrac(); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:82:23: ( Exp )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:82:23: ( Exp )? int alt10=2; int LA10_0 = input.LA(1); @@ -788,7 +788,7 @@ public class InLineJSONLexer extends Lexer { } switch (alt10) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:82:23: Exp + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:82:23: Exp { mExp(); @@ -801,7 +801,7 @@ public class InLineJSONLexer extends Lexer { } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:82:30: Exp + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:82:30: Exp { mExp(); @@ -826,8 +826,8 @@ public class InLineJSONLexer extends Lexer { try { int _type = LBrace; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:84:7: ( '{' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:84:9: '{' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:84:7: ( '{' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:84:9: '{' { match('{'); nesting++; @@ -847,8 +847,8 @@ public class InLineJSONLexer extends Lexer { try { int _type = RBrace; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:85:7: ( '}' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:85:9: '}' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:85:7: ( '}' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:85:9: '}' { match('}'); nesting--; if (nesting<=0) { emit(Token.EOF_TOKEN); } @@ -868,8 +868,8 @@ public class InLineJSONLexer extends Lexer { try { int _type = LBracket; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:86:9: ( '[' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:86:11: '[' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:86:9: ( '[' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:86:11: '[' { match('['); nesting++; @@ -889,8 +889,8 @@ public class InLineJSONLexer extends Lexer { try { int _type = RBracket; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:87:9: ( ']' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:87:11: ']' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:87:9: ( ']' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:87:11: ']' { match(']'); nesting--; if (nesting<=0) { emit(Token.EOF_TOKEN); } @@ -906,96 +906,96 @@ public class InLineJSONLexer extends Lexer { // $ANTLR end "RBracket" public void mTokens() throws RecognitionException { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:8: ( T__23 | T__24 | T__25 | WhiteSpace | String | Colon | Comma | Integer | Double | LBrace | RBrace | LBracket | RBracket ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:8: ( T__23 | T__24 | T__25 | WhiteSpace | String | Colon | Comma | Integer | Double | LBrace | RBrace | LBracket | RBracket ) int alt12=13; alt12 = dfa12.predict(input); switch (alt12) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:10: T__23 + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:10: T__23 { mT__23(); } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:16: T__24 + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:16: T__24 { mT__24(); } break; case 3 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:22: T__25 + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:22: T__25 { mT__25(); } break; case 4 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:28: WhiteSpace + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:28: WhiteSpace { mWhiteSpace(); } break; case 5 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:39: String + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:39: String { mString(); } break; case 6 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:46: Colon + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:46: Colon { mColon(); } break; case 7 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:52: Comma + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:52: Comma { mComma(); } break; case 8 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:58: Integer + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:58: Integer { mInteger(); } break; case 9 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:66: Double + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:66: Double { mDouble(); } break; case 10 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:73: LBrace + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:73: LBrace { mLBrace(); } break; case 11 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:80: RBrace + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:80: RBrace { mRBrace(); } break; case 12 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:87: LBracket + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:87: LBracket { mLBracket(); } break; case 13 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:96: RBracket + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:1:96: RBracket { mRBracket(); diff --git a/src/main/java/org/xerial/silk/impl/InLineJSONParser.java b/src/main/java/org/xerial/silk/impl/InLineJSONParser.java index b2b5e77..ae90413 100644 --- a/src/main/java/org/xerial/silk/impl/InLineJSONParser.java +++ b/src/main/java/org/xerial/silk/impl/InLineJSONParser.java @@ -1,4 +1,4 @@ -// $ANTLR 3.1.1 F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g 2009-01-30 14:19:46 +// $ANTLR 3.1.1 c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g 2009-01-30 21:13:12 //-------------------------------------- // XerialJ Project @@ -57,23 +57,23 @@ public class InLineJSONParser extends Parser { public String[] getTokenNames() { return InLineJSONParser.tokenNames; } - public String getGrammarFileName() { return "F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g"; } + public String getGrammarFileName() { return "c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g"; } // $ANTLR start "jsonObjectFragment" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:96:1: jsonObjectFragment : jsonElement ( Comma jsonElement )* ; + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:96:1: jsonObjectFragment : jsonElement ( Comma jsonElement )* ; public final void jsonObjectFragment() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:96:19: ( jsonElement ( Comma jsonElement )* ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:96:21: jsonElement ( Comma jsonElement )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:96:19: ( jsonElement ( Comma jsonElement )* ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:96:21: jsonElement ( Comma jsonElement )* { pushFollow(FOLLOW_jsonElement_in_jsonObjectFragment369); jsonElement(); state._fsp--; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:96:33: ( Comma jsonElement )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:96:33: ( Comma jsonElement )* loop1: do { int alt1=2; @@ -86,7 +86,7 @@ public class InLineJSONParser extends Parser { switch (alt1) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:96:34: Comma jsonElement + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:96:34: Comma jsonElement { match(input,Comma,FOLLOW_Comma_in_jsonObjectFragment372); pushFollow(FOLLOW_jsonElement_in_jsonObjectFragment374); @@ -119,18 +119,18 @@ public class InLineJSONParser extends Parser { // $ANTLR start "jsonArrayFragment" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:97:1: jsonArrayFragment : jsonValue ( Comma jsonValue )* ; + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:97:1: jsonArrayFragment : jsonValue ( Comma jsonValue )* ; public final void jsonArrayFragment() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:97:18: ( jsonValue ( Comma jsonValue )* ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:97:20: jsonValue ( Comma jsonValue )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:97:18: ( jsonValue ( Comma jsonValue )* ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:97:20: jsonValue ( Comma jsonValue )* { pushFollow(FOLLOW_jsonValue_in_jsonArrayFragment382); jsonValue(); state._fsp--; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:97:30: ( Comma jsonValue )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:97:30: ( Comma jsonValue )* loop2: do { int alt2=2; @@ -143,7 +143,7 @@ public class InLineJSONParser extends Parser { switch (alt2) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:97:31: Comma jsonValue + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:97:31: Comma jsonValue { match(input,Comma,FOLLOW_Comma_in_jsonArrayFragment385); pushFollow(FOLLOW_jsonValue_in_jsonArrayFragment387); @@ -176,11 +176,11 @@ public class InLineJSONParser extends Parser { // $ANTLR start "jsonObject" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:99:1: jsonObject : LBrace jsonElement ( ',' jsonElement )* RBrace ; + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:99:1: jsonObject : LBrace jsonElement ( ',' jsonElement )* RBrace ; public final void jsonObject() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:99:11: ( LBrace jsonElement ( ',' jsonElement )* RBrace ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:99:13: LBrace jsonElement ( ',' jsonElement )* RBrace + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:99:11: ( LBrace jsonElement ( ',' jsonElement )* RBrace ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:99:13: LBrace jsonElement ( ',' jsonElement )* RBrace { match(input,LBrace,FOLLOW_LBrace_in_jsonObject396); pushFollow(FOLLOW_jsonElement_in_jsonObject398); @@ -188,7 +188,7 @@ public class InLineJSONParser extends Parser { state._fsp--; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:99:32: ( ',' jsonElement )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:99:32: ( ',' jsonElement )* loop3: do { int alt3=2; @@ -201,7 +201,7 @@ public class InLineJSONParser extends Parser { switch (alt3) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:99:33: ',' jsonElement + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:99:33: ',' jsonElement { match(input,Comma,FOLLOW_Comma_in_jsonObject401); pushFollow(FOLLOW_jsonElement_in_jsonObject403); @@ -235,11 +235,11 @@ public class InLineJSONParser extends Parser { // $ANTLR start "jsonElement" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:100:1: jsonElement : String Colon jsonValue ; + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:100:1: jsonElement : String Colon jsonValue ; public final void jsonElement() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:100:12: ( String Colon jsonValue ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:100:14: String Colon jsonValue + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:100:12: ( String Colon jsonValue ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:100:14: String Colon jsonValue { match(input,String,FOLLOW_String_in_jsonElement413); match(input,Colon,FOLLOW_Colon_in_jsonElement415); @@ -264,11 +264,11 @@ public class InLineJSONParser extends Parser { // $ANTLR start "jsonArray" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:101:1: jsonArray : LBracket jsonValue ( ',' jsonValue )* RBracket ; + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:101:1: jsonArray : LBracket jsonValue ( ',' jsonValue )* RBracket ; public final void jsonArray() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:101:10: ( LBracket jsonValue ( ',' jsonValue )* RBracket ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:101:12: LBracket jsonValue ( ',' jsonValue )* RBracket + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:101:10: ( LBracket jsonValue ( ',' jsonValue )* RBracket ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:101:12: LBracket jsonValue ( ',' jsonValue )* RBracket { match(input,LBracket,FOLLOW_LBracket_in_jsonArray424); pushFollow(FOLLOW_jsonValue_in_jsonArray426); @@ -276,7 +276,7 @@ public class InLineJSONParser extends Parser { state._fsp--; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:101:31: ( ',' jsonValue )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:101:31: ( ',' jsonValue )* loop4: do { int alt4=2; @@ -289,7 +289,7 @@ public class InLineJSONParser extends Parser { switch (alt4) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:101:32: ',' jsonValue + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:101:32: ',' jsonValue { match(input,Comma,FOLLOW_Comma_in_jsonArray429); pushFollow(FOLLOW_jsonValue_in_jsonArray431); @@ -323,10 +323,10 @@ public class InLineJSONParser extends Parser { // $ANTLR start "jsonValue" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:103:1: jsonValue : ( jsonObject | jsonArray | String | Integer | Double | 'true' | 'false' | 'null' ); + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:103:1: jsonValue : ( jsonObject | jsonArray | String | Integer | Double | 'true' | 'false' | 'null' ); public final void jsonValue() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:104:2: ( jsonObject | jsonArray | String | Integer | Double | 'true' | 'false' | 'null' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:104:2: ( jsonObject | jsonArray | String | Integer | Double | 'true' | 'false' | 'null' ) int alt5=8; switch ( input.LA(1) ) { case LBrace: @@ -378,7 +378,7 @@ public class InLineJSONParser extends Parser { switch (alt5) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:104:4: jsonObject + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:104:4: jsonObject { pushFollow(FOLLOW_jsonObject_in_jsonValue444); jsonObject(); @@ -389,7 +389,7 @@ public class InLineJSONParser extends Parser { } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:105:4: jsonArray + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:105:4: jsonArray { pushFollow(FOLLOW_jsonArray_in_jsonValue449); jsonArray(); @@ -400,42 +400,42 @@ public class InLineJSONParser extends Parser { } break; case 3 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:106:4: String + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:106:4: String { match(input,String,FOLLOW_String_in_jsonValue454); } break; case 4 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:107:4: Integer + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:107:4: Integer { match(input,Integer,FOLLOW_Integer_in_jsonValue459); } break; case 5 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:108:4: Double + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:108:4: Double { match(input,Double,FOLLOW_Double_in_jsonValue464); } break; case 6 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:109:4: 'true' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:109:4: 'true' { match(input,23,FOLLOW_23_in_jsonValue469); } break; case 7 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:110:4: 'false' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:110:4: 'false' { match(input,24,FOLLOW_24_in_jsonValue474); } break; case 8 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:111:4: 'null' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\InLineJSON.g:111:4: 'null' { match(input,25,FOLLOW_25_in_jsonValue479); diff --git a/src/main/java/org/xerial/silk/impl/SilkFunction.java b/src/main/java/org/xerial/silk/impl/SilkFunction.java index 5d461ed..422e7f9 100644 --- a/src/main/java/org/xerial/silk/impl/SilkFunction.java +++ b/src/main/java/org/xerial/silk/impl/SilkFunction.java @@ -27,6 +27,8 @@ package org.xerial.silk.impl; import java.util.ArrayList; import java.util.List; +import org.xerial.util.StringUtil; + /** * function data * @@ -35,9 +37,20 @@ import java.util.List; */ public class SilkFunction { + private String name; private String indent; private ArrayList argumentList = new ArrayList(); + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void addArgument(String argument) { argumentList.add(SilkFunctionArg.newArgValue(argument)); @@ -63,4 +76,10 @@ public class SilkFunction this.indent = indent; } + @Override + public String toString() + { + return String.format("function %s(%s)", name, StringUtil.join(argumentList, ", ")); + } + } diff --git a/src/main/java/org/xerial/silk/impl/SilkFunctionArg.java b/src/main/java/org/xerial/silk/impl/SilkFunctionArg.java index 826c40f..8436499 100644 --- a/src/main/java/org/xerial/silk/impl/SilkFunctionArg.java +++ b/src/main/java/org/xerial/silk/impl/SilkFunctionArg.java @@ -33,19 +33,20 @@ package org.xerial.silk.impl; public class SilkFunctionArg { private String argName = null; - private String value = null; - private String jsonValue = null; + private SilkValue value = null; public static SilkFunctionArg newArgValue(String value) { - return new SilkFunctionArg(null, value, null); + return new SilkFunctionArg(null, value); } - private SilkFunctionArg(String argName, String value, String jsonValue) + public SilkFunctionArg() + {} + + private SilkFunctionArg(String argName, String value) { this.argName = argName; - this.value = value; - this.jsonValue = jsonValue; + setValue(value); } public String getName() @@ -58,38 +59,42 @@ public class SilkFunctionArg this.argName = argName; } - public String getValue() + public SilkValue getValue() { return value; } public void setValue(String value) { - this.value = value; + this.value = new SilkTextValue(value); } public void setJSON(String jsonValue) { - this.jsonValue = jsonValue; - } - - public String getJSON() - { - return jsonValue; + this.value = new SilkJSONValue(jsonValue); } - public boolean hasJSONValue() - { - return jsonValue != null; - } - - public boolean hasValue() + public boolean hasName() { - return value != null; + return argName != null; } - public boolean hasName() + @Override + public String toString() { - return argName != null; + if (hasName()) + { + if (value == null) + return argName; + else + return String.format("%s:%s", argName, value); + } + else + { + if (value == null) + return ""; + else + return value.toString(); + } } } diff --git a/src/main/java/org/xerial/silk/impl/SilkJSONValue.java b/src/main/java/org/xerial/silk/impl/SilkJSONValue.java new file mode 100644 index 0000000..e6457a0 --- /dev/null +++ b/src/main/java/org/xerial/silk/impl/SilkJSONValue.java @@ -0,0 +1,57 @@ +/*-------------------------------------------------------------------------- + * Copyright 2009 Taro L. Saito + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *--------------------------------------------------------------------------*/ +//-------------------------------------- +// XerialJ +// +// SilkJSONValue.java +// Since: 2009/02/01 23:49:10 +// +// $URL$ +// $Author$ +//-------------------------------------- +package org.xerial.silk.impl; + +/** + * text value of JSON format + * + * @author leo + * + */ +public class SilkJSONValue implements SilkValue +{ + String json; + + public SilkJSONValue(String json) + { + this.json = json; + } + + public String getValue() + { + return json; + } + + public boolean isJSON() + { + return true; + } + + @Override + public String toString() + { + return json; + } +} diff --git a/src/main/java/org/xerial/silk/impl/SilkLexer.java b/src/main/java/org/xerial/silk/impl/SilkLexer.java index 33b3c08..a8cb6e4 100644 --- a/src/main/java/org/xerial/silk/impl/SilkLexer.java +++ b/src/main/java/org/xerial/silk/impl/SilkLexer.java @@ -1,4 +1,4 @@ -// $ANTLR 3.1.1 F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g 2009-01-30 20:53:33 +// $ANTLR 3.1.1 c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g 2009-01-30 21:13:13 /*-------------------------------------------------------------------------- * Copyright 2009 Taro L. Saito @@ -118,18 +118,18 @@ public class SilkLexer extends Lexer { super(input,state); } - public String getGrammarFileName() { return "F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g"; } + public String getGrammarFileName() { return "c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g"; } // $ANTLR start "LineComment" public final void mLineComment() throws RecognitionException { try { int _type = LineComment; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:136:12: ( '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:136:14: '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:136:12: ( '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:136:14: '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' { match('#'); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:136:18: (~ ( '\\n' | '\\r' ) )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:136:18: (~ ( '\\n' | '\\r' ) )* loop1: do { int alt1=2; @@ -142,7 +142,7 @@ public class SilkLexer extends Lexer { switch (alt1) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:136:18: ~ ( '\\n' | '\\r' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:136:18: ~ ( '\\n' | '\\r' ) { 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') ) { input.consume(); @@ -162,7 +162,7 @@ public class SilkLexer extends Lexer { } } while (true); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:136:32: ( '\\r' )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:136:32: ( '\\r' )? int alt2=2; int LA2_0 = input.LA(1); @@ -171,7 +171,7 @@ public class SilkLexer extends Lexer { } switch (alt2) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:136:32: '\\r' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:136:32: '\\r' { match('\r'); @@ -198,11 +198,11 @@ public class SilkLexer extends Lexer { try { int _type = Preamble; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:137:9: ( '%' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:137:11: '%' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:137:9: ( '%' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:137:11: '%' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' { match('%'); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:137:15: (~ ( '\\n' | '\\r' ) )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:137:15: (~ ( '\\n' | '\\r' ) )* loop3: do { int alt3=2; @@ -215,7 +215,7 @@ public class SilkLexer extends Lexer { switch (alt3) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:137:15: ~ ( '\\n' | '\\r' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:137:15: ~ ( '\\n' | '\\r' ) { 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') ) { input.consume(); @@ -235,7 +235,7 @@ public class SilkLexer extends Lexer { } } while (true); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:137:29: ( '\\r' )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:137:29: ( '\\r' )? int alt4=2; int LA4_0 = input.LA(1); @@ -244,7 +244,7 @@ public class SilkLexer extends Lexer { } switch (alt4) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:137:29: '\\r' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:137:29: '\\r' { match('\r'); @@ -268,8 +268,8 @@ public class SilkLexer extends Lexer { // $ANTLR start "LineBreakChar" public final void mLineBreakChar() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:140:23: ( '\\n' | '\\r' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:140:23: ( '\\n' | '\\r' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: { if ( input.LA(1)=='\n'||input.LA(1)=='\r' ) { input.consume(); @@ -294,10 +294,10 @@ public class SilkLexer extends Lexer { try { int _type = LineBreak; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:143:2: ( ( '\\r' '\\n' | '\\r' | '\\n' ) ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:143:4: ( '\\r' '\\n' | '\\r' | '\\n' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:143:2: ( ( '\\r' '\\n' | '\\r' | '\\n' ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:143:4: ( '\\r' '\\n' | '\\r' | '\\n' ) { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:143:4: ( '\\r' '\\n' | '\\r' | '\\n' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:143:4: ( '\\r' '\\n' | '\\r' | '\\n' ) int alt5=3; int LA5_0 = input.LA(1); @@ -321,7 +321,7 @@ public class SilkLexer extends Lexer { } switch (alt5) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:143:5: '\\r' '\\n' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:143:5: '\\r' '\\n' { match('\r'); match('\n'); @@ -329,14 +329,14 @@ public class SilkLexer extends Lexer { } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:143:17: '\\r' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:143:17: '\\r' { match('\r'); } break; case 3 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:143:24: '\\n' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:143:24: '\\n' { match('\n'); @@ -362,13 +362,13 @@ public class SilkLexer extends Lexer { try { int _type = NodeIndent; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:148:11: ({...}? ( ' ' )* '-' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:148:13: {...}? ( ' ' )* '-' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:148:11: ({...}? ( ' ' )* '-' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:148:13: {...}? ( ' ' )* '-' { if ( !(( isHead() )) ) { throw new FailedPredicateException(input, "NodeIndent", " isHead() "); } - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:148:27: ( ' ' )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:148:27: ( ' ' )* loop6: do { int alt6=2; @@ -381,7 +381,7 @@ public class SilkLexer extends Lexer { switch (alt6) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:148:28: ' ' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:148:28: ' ' { match(' '); @@ -411,13 +411,13 @@ public class SilkLexer extends Lexer { try { int _type = BlankLine; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:149:10: ({...}? ( WhiteSpace )* LineBreak ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:149:12: {...}? ( WhiteSpace )* LineBreak + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:149:10: ({...}? ( WhiteSpace )* LineBreak ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:149:12: {...}? ( WhiteSpace )* LineBreak { if ( !(( isHead() )) ) { throw new FailedPredicateException(input, "BlankLine", " isHead() "); } - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:149:26: ( WhiteSpace )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:149:26: ( WhiteSpace )* loop7: do { int alt7=2; @@ -430,7 +430,7 @@ public class SilkLexer extends Lexer { switch (alt7) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:149:26: WhiteSpace + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:149:26: WhiteSpace { mWhiteSpace(); @@ -459,13 +459,13 @@ public class SilkLexer extends Lexer { try { int _type = DataLine; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:151:9: ({...}? => ( WhiteSpace )* ~ ( '-' | '%' | '#' | WhiteSpace | LineBreakChar ) (~ ( '\\n' | '\\r' ) )* LineBreak ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:151:11: {...}? => ( WhiteSpace )* ~ ( '-' | '%' | '#' | WhiteSpace | LineBreakChar ) (~ ( '\\n' | '\\r' ) )* LineBreak + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:151:9: ({...}? => ( WhiteSpace )* ~ ( '-' | '%' | '#' | WhiteSpace | LineBreakChar ) (~ ( '\\n' | '\\r' ) )* LineBreak ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:151:11: {...}? => ( WhiteSpace )* ~ ( '-' | '%' | '#' | WhiteSpace | LineBreakChar ) (~ ( '\\n' | '\\r' ) )* LineBreak { if ( !(( isHead() )) ) { throw new FailedPredicateException(input, "DataLine", " isHead() "); } - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:151:28: ( WhiteSpace )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:151:28: ( WhiteSpace )* loop8: do { int alt8=2; @@ -478,7 +478,7 @@ public class SilkLexer extends Lexer { switch (alt8) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:151:28: WhiteSpace + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:151:28: WhiteSpace { mWhiteSpace(); @@ -499,7 +499,7 @@ public class SilkLexer extends Lexer { recover(mse); throw mse;} - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:151:88: (~ ( '\\n' | '\\r' ) )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:151:88: (~ ( '\\n' | '\\r' ) )* loop9: do { int alt9=2; @@ -512,7 +512,7 @@ public class SilkLexer extends Lexer { switch (alt9) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:151:88: ~ ( '\\n' | '\\r' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:151:88: ~ ( '\\n' | '\\r' ) { 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') ) { input.consume(); @@ -549,8 +549,8 @@ public class SilkLexer extends Lexer { try { int _type = LParen; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:153:7: ( '(' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:153:9: '(' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:153:7: ( '(' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:153:9: '(' { match('('); transit(Symbol.EnterParen); @@ -570,8 +570,8 @@ public class SilkLexer extends Lexer { try { int _type = RParen; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:154:7: ( ')' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:154:9: ')' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:154:7: ( ')' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:154:9: ')' { match(')'); @@ -590,8 +590,8 @@ public class SilkLexer extends Lexer { try { int _type = Comma; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:155:6: ( ',' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:155:9: ',' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:155:6: ( ',' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:155:9: ',' { match(','); @@ -610,8 +610,8 @@ public class SilkLexer extends Lexer { try { int _type = Colon; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:156:6: ( ':' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:156:8: ':' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:156:6: ( ':' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:156:8: ':' { match(':'); transit(Symbol.Colon); @@ -631,8 +631,8 @@ public class SilkLexer extends Lexer { try { int _type = Seq; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:157:4: ( '>' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:157:7: '>' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:157:4: ( '>' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:157:7: '>' { match('>'); @@ -651,8 +651,8 @@ public class SilkLexer extends Lexer { try { int _type = Star; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:158:5: ( '*' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:158:8: '*' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:158:5: ( '*' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:158:8: '*' { match('*'); @@ -671,8 +671,8 @@ public class SilkLexer extends Lexer { try { int _type = At; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:159:3: ( '@' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:159:6: '@' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:159:3: ( '@' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:159:6: '@' { match('@'); @@ -691,8 +691,8 @@ public class SilkLexer extends Lexer { try { int _type = Plus; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:160:5: ( '+' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:160:7: '+' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:160:5: ( '+' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:160:7: '+' { match('+'); @@ -711,8 +711,8 @@ public class SilkLexer extends Lexer { try { int _type = LBracket; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:161:9: ( '[' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:161:11: '[' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:161:9: ( '[' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:161:11: '[' { match('['); transit(Symbol.EnterParen); @@ -732,8 +732,8 @@ public class SilkLexer extends Lexer { try { int _type = RBracket; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:162:9: ( ']' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:162:11: ']' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:162:9: ( ']' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:162:11: ']' { match(']'); @@ -752,8 +752,8 @@ public class SilkLexer extends Lexer { try { int _type = Question; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:163:9: ( '?' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:163:11: '?' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:163:9: ( '?' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:163:11: '?' { match('?'); @@ -770,8 +770,8 @@ public class SilkLexer extends Lexer { // $ANTLR start "Digit" public final void mDigit() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:165:15: ( '0' .. '9' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:165:17: '0' .. '9' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:165:15: ( '0' .. '9' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:165:17: '0' .. '9' { matchRange('0','9'); @@ -786,8 +786,8 @@ public class SilkLexer extends Lexer { // $ANTLR start "Letter" public final void mLetter() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:166:16: ( 'A' .. 'F' | 'a' .. 'f' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:166:16: ( 'A' .. 'F' | 'a' .. 'f' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: { if ( (input.LA(1)>='A' && input.LA(1)<='F')||(input.LA(1)>='a' && input.LA(1)<='f') ) { input.consume(); @@ -810,8 +810,8 @@ public class SilkLexer extends Lexer { // $ANTLR start "HexDigit" public final void mHexDigit() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:167:18: ( Digit | Letter ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:167:18: ( Digit | Letter ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: { 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') ) { input.consume(); @@ -834,8 +834,8 @@ public class SilkLexer extends Lexer { // $ANTLR start "UnicodeChar" public final void mUnicodeChar() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:168:21: (~ ( '\"' | '\\\\' | LineBreakChar ) ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:168:23: ~ ( '\"' | '\\\\' | LineBreakChar ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:168:21: (~ ( '\"' | '\\\\' | LineBreakChar ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:168:23: ~ ( '\"' | '\\\\' | LineBreakChar ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { input.consume(); @@ -858,11 +858,11 @@ public class SilkLexer extends Lexer { // $ANTLR start "EscapeSequence" public final void mEscapeSequence() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:2: ( '\\\\' ( '\\\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HexDigit HexDigit HexDigit HexDigit ) ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:4: '\\\\' ( '\\\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HexDigit HexDigit HexDigit HexDigit ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:2: ( '\\\\' ( '\\\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HexDigit HexDigit HexDigit HexDigit ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:4: '\\\\' ( '\\\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HexDigit HexDigit HexDigit HexDigit ) { match('\\'); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:9: ( '\\\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HexDigit HexDigit HexDigit HexDigit ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:9: ( '\\\"' | '\\\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HexDigit HexDigit HexDigit HexDigit ) int alt10=9; switch ( input.LA(1) ) { case '\"': @@ -919,63 +919,63 @@ public class SilkLexer extends Lexer { switch (alt10) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:10: '\\\"' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:10: '\\\"' { match('\"'); } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:17: '\\\\' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:17: '\\\\' { match('\\'); } break; case 3 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:24: '/' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:24: '/' { match('/'); } break; case 4 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:30: 'b' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:30: 'b' { match('b'); } break; case 5 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:36: 'f' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:36: 'f' { match('f'); } break; case 6 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:42: 'n' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:42: 'n' { match('n'); } break; case 7 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:48: 'r' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:48: 'r' { match('r'); } break; case 8 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:54: 't' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:54: 't' { match('t'); } break; case 9 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:60: 'u' HexDigit HexDigit HexDigit HexDigit + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:170:60: 'u' HexDigit HexDigit HexDigit HexDigit { match('u'); mHexDigit(); @@ -1000,7 +1000,7 @@ public class SilkLexer extends Lexer { // $ANTLR start "StringChar" public final void mStringChar() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:174:21: ( UnicodeChar | EscapeSequence ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:174:21: ( UnicodeChar | EscapeSequence ) int alt11=2; int LA11_0 = input.LA(1); @@ -1018,14 +1018,14 @@ public class SilkLexer extends Lexer { } switch (alt11) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:174:24: UnicodeChar + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:174:24: UnicodeChar { mUnicodeChar(); } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:174:38: EscapeSequence + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:174:38: EscapeSequence { mEscapeSequence(); @@ -1042,8 +1042,8 @@ public class SilkLexer extends Lexer { // $ANTLR start "NonSpaceChar" public final void mNonSpaceChar() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:175:22: (~ ( '\"' | '\\\\' | LineBreakChar | WhiteSpace ) ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:175:24: ~ ( '\"' | '\\\\' | LineBreakChar | WhiteSpace ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:175:22: (~ ( '\"' | '\\\\' | LineBreakChar | WhiteSpace ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:175:24: ~ ( '\"' | '\\\\' | LineBreakChar | WhiteSpace ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='\b')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\u001F')||input.LA(1)=='!'||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { input.consume(); @@ -1066,10 +1066,10 @@ public class SilkLexer extends Lexer { // $ANTLR start "StringChar_s" public final void mStringChar_s() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:177:22: ( ( StringChar )* ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:177:24: ( StringChar )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:177:22: ( ( StringChar )* ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:177:24: ( StringChar )* { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:177:24: ( StringChar )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:177:24: ( StringChar )* loop12: do { int alt12=2; @@ -1082,7 +1082,7 @@ public class SilkLexer extends Lexer { switch (alt12) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:177:24: StringChar + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:177:24: StringChar { mStringChar(); @@ -1110,8 +1110,8 @@ public class SilkLexer extends Lexer { int _channel = DEFAULT_TOKEN_CHANNEL; Token s=null; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:178:7: ( '\"' s= StringChar_s '\"' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:178:9: '\"' s= StringChar_s '\"' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:178:7: ( '\"' s= StringChar_s '\"' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:178:9: '\"' s= StringChar_s '\"' { match('\"'); int sStart473 = getCharIndex(); @@ -1133,7 +1133,7 @@ public class SilkLexer extends Lexer { // $ANTLR start "PlainFirst" public final void mPlainFirst() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:182:2: (~ ( '\"' | '\\\\' | LineBreakChar | WhiteSpace | Indicator ) | {...}? => ( ':' | '?' ) NonSpaceChar ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:182:2: (~ ( '\"' | '\\\\' | LineBreakChar | WhiteSpace | Indicator ) | {...}? => ( ':' | '?' ) NonSpaceChar ) int alt13=2; int LA13_0 = input.LA(1); @@ -1160,7 +1160,7 @@ public class SilkLexer extends Lexer { } switch (alt13) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:182:4: ~ ( '\"' | '\\\\' | LineBreakChar | WhiteSpace | Indicator ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:182:4: ~ ( '\"' | '\\\\' | LineBreakChar | WhiteSpace | Indicator ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='\b')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\u001F')||input.LA(1)=='!'||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)>='A' && input.LA(1)<='Z')||(input.LA(1)>='^' && input.LA(1)<='z')||input.LA(1)=='|'||(input.LA(1)>='~' && input.LA(1)<='\uFFFF') ) { input.consume(); @@ -1175,7 +1175,7 @@ public class SilkLexer extends Lexer { } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:183:4: {...}? => ( ':' | '?' ) NonSpaceChar + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:183:4: {...}? => ( ':' | '?' ) NonSpaceChar { if ( !(( isValue() )) ) { throw new FailedPredicateException(input, "PlainFirst", " isValue() "); @@ -1204,8 +1204,8 @@ public class SilkLexer extends Lexer { // $ANTLR start "ScopeIndicator" public final void mScopeIndicator() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:186:24: ( '(' | ')' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:186:24: ( '(' | ')' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: { if ( (input.LA(1)>='(' && input.LA(1)<=')') ) { input.consume(); @@ -1228,8 +1228,8 @@ public class SilkLexer extends Lexer { // $ANTLR start "FlowIndicator" public final void mFlowIndicator() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:187:23: ( '[' | ']' | '{' | '}' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:187:23: ( '[' | ']' | '{' | '}' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: { if ( input.LA(1)=='['||input.LA(1)==']'||input.LA(1)=='{'||input.LA(1)=='}' ) { input.consume(); @@ -1252,8 +1252,8 @@ public class SilkLexer extends Lexer { // $ANTLR start "Indicator" public final void mIndicator() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:188:19: ( FlowIndicator | ScopeIndicator | ',' | '-' | ':' | '#' | '>' | '\\'' | '\"' | '@' | '%' | '\\\\' ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:188:19: ( FlowIndicator | ScopeIndicator | ',' | '-' | ':' | '#' | '>' | '\\'' | '\"' | '@' | '%' | '\\\\' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: { 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)=='}' ) { input.consume(); @@ -1276,8 +1276,8 @@ public class SilkLexer extends Lexer { // $ANTLR start "PlainUnsafeChar" public final void mPlainUnsafeChar() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:191:25: ( '\"' | '\\\\' | LineBreakChar | WhiteSpace | '#' | ScopeIndicator ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:191:25: ( '\"' | '\\\\' | LineBreakChar | WhiteSpace | '#' | ScopeIndicator ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: { if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' '||(input.LA(1)>='\"' && input.LA(1)<='#')||(input.LA(1)>='(' && input.LA(1)<=')')||input.LA(1)=='\\' ) { input.consume(); @@ -1300,8 +1300,8 @@ public class SilkLexer extends Lexer { // $ANTLR start "PlainSafeKey" public final void mPlainSafeKey() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:193:22: (~ ( PlainUnsafeChar | FlowIndicator | ',' | ':' | '>' ) ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:193:24: ~ ( PlainUnsafeChar | FlowIndicator | ',' | ':' | '>' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:193:22: (~ ( PlainUnsafeChar | FlowIndicator | ',' | ':' | '>' ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:193:24: ~ ( PlainUnsafeChar | FlowIndicator | ',' | ':' | '>' ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='\b')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\u001F')||input.LA(1)=='!'||(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)>='~' && input.LA(1)<='\uFFFF') ) { input.consume(); @@ -1324,8 +1324,8 @@ public class SilkLexer extends Lexer { // $ANTLR start "PlainSafeIn" public final void mPlainSafeIn() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:194:21: (~ ( PlainUnsafeChar | ',' ) ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:194:23: ~ ( PlainUnsafeChar | ',' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:194:21: (~ ( PlainUnsafeChar | ',' ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:194:23: ~ ( PlainUnsafeChar | ',' ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='\b')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\u001F')||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') ) { input.consume(); @@ -1348,8 +1348,8 @@ public class SilkLexer extends Lexer { // $ANTLR start "PlainSafeOut" public final void mPlainSafeOut() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:195:22: (~ ( PlainUnsafeChar ) ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:195:24: ~ ( PlainUnsafeChar ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:195:22: (~ ( PlainUnsafeChar ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:195:24: ~ ( PlainUnsafeChar ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='\b')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\u001F')||input.LA(1)=='!'||(input.LA(1)>='$' && input.LA(1)<='\'')||(input.LA(1)>='*' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { input.consume(); @@ -1372,7 +1372,7 @@ public class SilkLexer extends Lexer { // $ANTLR start "PlainSafe" public final void mPlainSafe() throws RecognitionException { try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:199:2: ({...}? => PlainSafeKey | {...}? => PlainSafeIn | {...}? => PlainSafeOut ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:199:2: ({...}? => PlainSafeKey | {...}? => PlainSafeIn | {...}? => PlainSafeOut ) int alt14=3; int LA14_0 = input.LA(1); @@ -1422,7 +1422,7 @@ public class SilkLexer extends Lexer { } switch (alt14) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:199:4: {...}? => PlainSafeKey + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:199:4: {...}? => PlainSafeKey { if ( !(( isKey() )) ) { throw new FailedPredicateException(input, "PlainSafe", " isKey() "); @@ -1432,7 +1432,7 @@ public class SilkLexer extends Lexer { } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:200:4: {...}? => PlainSafeIn + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:200:4: {...}? => PlainSafeIn { if ( !(( isInValue() )) ) { throw new FailedPredicateException(input, "PlainSafe", " isInValue() "); @@ -1442,7 +1442,7 @@ public class SilkLexer extends Lexer { } break; case 3 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:201:4: {...}? => PlainSafeOut + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:201:4: {...}? => PlainSafeOut { if ( !(( isOutValue() )) ) { throw new FailedPredicateException(input, "PlainSafe", " isOutValue() "); @@ -1464,11 +1464,11 @@ public class SilkLexer extends Lexer { try { int _type = PlainOneLine; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:205:13: ( PlainFirst ( ( WhiteSpace )* PlainSafe )* ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:205:15: PlainFirst ( ( WhiteSpace )* PlainSafe )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:205:13: ( PlainFirst ( ( WhiteSpace )* PlainSafe )* ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:205:15: PlainFirst ( ( WhiteSpace )* PlainSafe )* { mPlainFirst(); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:205:26: ( ( WhiteSpace )* PlainSafe )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:205:26: ( ( WhiteSpace )* PlainSafe )* loop16: do { int alt16=2; @@ -1490,9 +1490,9 @@ public class SilkLexer extends Lexer { switch (alt16) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:205:27: ( WhiteSpace )* PlainSafe + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:205:27: ( WhiteSpace )* PlainSafe { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:205:27: ( WhiteSpace )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:205:27: ( WhiteSpace )* loop15: do { int alt15=2; @@ -1505,7 +1505,7 @@ public class SilkLexer extends Lexer { switch (alt15) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:205:27: WhiteSpace + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:205:27: WhiteSpace { mWhiteSpace(); @@ -1544,7 +1544,7 @@ public class SilkLexer extends Lexer { try { int _type = JSON; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:209:2: ({...}? => '{' | {...}? => '[' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:209:2: ({...}? => '{' | {...}? => '[' ) int alt17=2; int LA17_0 = input.LA(1); @@ -1562,7 +1562,7 @@ public class SilkLexer extends Lexer { } switch (alt17) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:209:4: {...}? => '{' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:209:4: {...}? => '{' { if ( !(( isValue() )) ) { throw new FailedPredicateException(input, "JSON", " isValue() "); @@ -1582,7 +1582,7 @@ public class SilkLexer extends Lexer { } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:220:4: {...}? => '[' + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:220:4: {...}? => '[' { if ( !(( isValue() )) ) { throw new FailedPredicateException(input, "JSON", " isValue() "); @@ -1616,13 +1616,13 @@ public class SilkLexer extends Lexer { try { int _type = Separation; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:233:11: ({...}? ( WhiteSpace )+ ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:233:13: {...}? ( WhiteSpace )+ + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:233:11: ({...}? ( WhiteSpace )+ ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:233:13: {...}? ( WhiteSpace )+ { if ( !(( currentState() != State.INIT )) ) { throw new FailedPredicateException(input, "Separation", " currentState() != State.INIT "); } - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:233:47: ( WhiteSpace )+ + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:233:47: ( WhiteSpace )+ int cnt18=0; loop18: do { @@ -1636,7 +1636,7 @@ public class SilkLexer extends Lexer { switch (alt18) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:233:47: WhiteSpace + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:233:47: WhiteSpace { mWhiteSpace(); @@ -1669,8 +1669,8 @@ public class SilkLexer extends Lexer { try { int _type = WhiteSpace; int _channel = DEFAULT_TOKEN_CHANNEL; - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:236:2: ( ( ' ' | '\\t' ) ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:236:4: ( ' ' | '\\t' ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:236:2: ( ( ' ' | '\\t' ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:236:4: ( ' ' | '\\t' ) { if ( input.LA(1)=='\t'||input.LA(1)==' ' ) { input.consume(); @@ -1693,159 +1693,159 @@ public class SilkLexer extends Lexer { // $ANTLR end "WhiteSpace" public void mTokens() throws RecognitionException { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:8: ( LineComment | Preamble | LineBreak | NodeIndent | BlankLine | DataLine | LParen | RParen | Comma | Colon | Seq | Star | At | Plus | LBracket | RBracket | Question | String | PlainOneLine | JSON | Separation | WhiteSpace ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:8: ( LineComment | Preamble | LineBreak | NodeIndent | BlankLine | DataLine | LParen | RParen | Comma | Colon | Seq | Star | At | Plus | LBracket | RBracket | Question | String | PlainOneLine | JSON | Separation | WhiteSpace ) int alt19=22; alt19 = dfa19.predict(input); switch (alt19) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:10: LineComment + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:10: LineComment { mLineComment(); } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:22: Preamble + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:22: Preamble { mPreamble(); } break; case 3 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:31: LineBreak + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:31: LineBreak { mLineBreak(); } break; case 4 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:41: NodeIndent + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:41: NodeIndent { mNodeIndent(); } break; case 5 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:52: BlankLine + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:52: BlankLine { mBlankLine(); } break; case 6 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:62: DataLine + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:62: DataLine { mDataLine(); } break; case 7 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:71: LParen + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:71: LParen { mLParen(); } break; case 8 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:78: RParen + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:78: RParen { mRParen(); } break; case 9 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:85: Comma + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:85: Comma { mComma(); } break; case 10 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:91: Colon + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:91: Colon { mColon(); } break; case 11 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:97: Seq + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:97: Seq { mSeq(); } break; case 12 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:101: Star + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:101: Star { mStar(); } break; case 13 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:106: At + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:106: At { mAt(); } break; case 14 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:109: Plus + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:109: Plus { mPlus(); } break; case 15 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:114: LBracket + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:114: LBracket { mLBracket(); } break; case 16 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:123: RBracket + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:123: RBracket { mRBracket(); } break; case 17 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:132: Question + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:132: Question { mQuestion(); } break; case 18 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:141: String + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:141: String { mString(); } break; case 19 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:148: PlainOneLine + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:148: PlainOneLine { mPlainOneLine(); } break; case 20 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:161: JSON + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:161: JSON { mJSON(); } break; case 21 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:166: Separation + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:166: Separation { mSeparation(); } break; case 22 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:177: WhiteSpace + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:1:177: WhiteSpace { mWhiteSpace(); diff --git a/src/main/java/org/xerial/silk/impl/SilkNode.java b/src/main/java/org/xerial/silk/impl/SilkNode.java index 073d396..5f65feb 100644 --- a/src/main/java/org/xerial/silk/impl/SilkNode.java +++ b/src/main/java/org/xerial/silk/impl/SilkNode.java @@ -26,6 +26,8 @@ package org.xerial.silk.impl; import java.util.ArrayList; +import org.xerial.util.StringUtil; + /** * SilkNode begins with '-' character, follwed by object notation of the form: * @@ -40,7 +42,10 @@ public class SilkNode { private String indent; private String name; - private SiklNodeOccurrence occurrence; + private SilkValue value = null; + + private String dataType = null; + private SilkNodeOccurrence occurrence = SilkNodeOccurrence.ONE; private ArrayList childNodeList = new ArrayList(); public String getNodeIndent() @@ -63,12 +68,27 @@ public class SilkNode this.name = name; } - public SiklNodeOccurrence getOccurrence() + public boolean hasDataType() + { + return dataType != null; + } + + public String getDataType() + { + return dataType; + } + + public void setDataType(String dataType) + { + this.dataType = dataType; + } + + public SilkNodeOccurrence getOccurrence() { return occurrence; } - public void setOccurrence(SiklNodeOccurrence occurrence) + public void setOccurrence(SilkNodeOccurrence occurrence) { this.occurrence = occurrence; } @@ -83,4 +103,31 @@ public class SilkNode this.childNodeList.add(childNode); } + public void setValue(String text) + { + this.value = new SilkTextValue(text); + } + + public void setJSON(String jsonText) + { + this.value = new SilkJSONValue(jsonText); + } + + public SilkValue getValue() + { + return value; + } + + @Override + public String toString() + { + String childNodeString = childNodeList.isEmpty() ? "" : String.format("(%s)", StringUtil.join(childNodeList, + ", ")); + String nodeValue = value != null ? ":" + value.toString() : ""; + if (hasDataType()) + return String.format("%s[%s]<%s>%s%s", name, dataType, childNodeString, occurrence, nodeValue); + else + return String.format("%s%s<%s>%s", name, childNodeString, occurrence, nodeValue); + } + } diff --git a/src/main/java/org/xerial/silk/impl/SilkNodeOccurrence.java b/src/main/java/org/xerial/silk/impl/SilkNodeOccurrence.java new file mode 100644 index 0000000..44cbb87 --- /dev/null +++ b/src/main/java/org/xerial/silk/impl/SilkNodeOccurrence.java @@ -0,0 +1,54 @@ +/*-------------------------------------------------------------------------- + * Copyright 2009 Taro L. Saito + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *--------------------------------------------------------------------------*/ +//-------------------------------------- +// XerialJ +// +// SilkNodeOccurrence.java +// Since: Jan 30, 2009 7:15:46 PM +// +// $URL$ +// $Author$ +//-------------------------------------- +package org.xerial.silk.impl; + +/** + * node occurrence + * + * @author leo + * + */ +public enum SilkNodeOccurrence { + + ONE("."), ZERO_OR_MORE("*"), ONE_OR_MORE("+"), ZERO_OR_ONE("?"), SEQUENCE(">"), TABBED_SEQUENCE("|"); + + private String symbol; + + private SilkNodeOccurrence(String symbol) + { + this.symbol = symbol; + } + + public boolean isFollowedByStreamData() + { + return this == SEQUENCE || this == TABBED_SEQUENCE; + } + + @Override + public String toString() + { + return symbol; + } +} diff --git a/src/main/java/org/xerial/silk/impl/SilkParser.java b/src/main/java/org/xerial/silk/impl/SilkParser.java index c2ba1ed..82f6c96 100644 --- a/src/main/java/org/xerial/silk/impl/SilkParser.java +++ b/src/main/java/org/xerial/silk/impl/SilkParser.java @@ -1,4 +1,4 @@ -// $ANTLR 3.1.1 F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g 2009-01-30 20:53:33 +// $ANTLR 3.1.1 c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g 2009-01-30 21:13:12 /*-------------------------------------------------------------------------- * Copyright 2009 Taro L. Saito @@ -112,7 +112,7 @@ public class SilkParser extends Parser { } public String[] getTokenNames() { return SilkParser.tokenNames; } - public String getGrammarFileName() { return "F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g"; } + public String getGrammarFileName() { return "c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g"; } public static class silkFile_return extends ParserRuleReturnScope { @@ -121,7 +121,7 @@ public class SilkParser extends Parser { }; // $ANTLR start "silkFile" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:243:1: silkFile : ( silkLine )* -> ^( Silk ( silkLine )* ) ; + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:243:1: silkFile : ( silkLine )* -> ^( Silk ( silkLine )* ) ; public final SilkParser.silkFile_return silkFile() throws RecognitionException { SilkParser.silkFile_return retval = new SilkParser.silkFile_return(); retval.start = input.LT(1); @@ -133,10 +133,10 @@ public class SilkParser extends Parser { RewriteRuleSubtreeStream stream_silkLine=new RewriteRuleSubtreeStream(adaptor,"rule silkLine"); try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:243:9: ( ( silkLine )* -> ^( Silk ( silkLine )* ) ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:243:11: ( silkLine )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:243:9: ( ( silkLine )* -> ^( Silk ( silkLine )* ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:243:11: ( silkLine )* { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:243:11: ( silkLine )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:243:11: ( silkLine )* loop1: do { int alt1=2; @@ -149,7 +149,7 @@ public class SilkParser extends Parser { switch (alt1) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:243:11: silkLine + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:243:11: silkLine { pushFollow(FOLLOW_silkLine_in_silkFile891); silkLine1=silkLine(); @@ -180,12 +180,12 @@ public class SilkParser extends Parser { root_0 = (Object)adaptor.nil(); // 243:21: -> ^( Silk ( silkLine )* ) { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:243:24: ^( Silk ( silkLine )* ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:243:24: ^( Silk ( silkLine )* ) { Object root_1 = (Object)adaptor.nil(); root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(Silk, "Silk"), root_1); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:243:31: ( silkLine )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:243:31: ( silkLine )* while ( stream_silkLine.hasNext() ) { adaptor.addChild(root_1, stream_silkLine.nextTree()); @@ -224,7 +224,7 @@ public class SilkParser extends Parser { }; // $ANTLR start "silkLine" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:246:1: silkLine : ( NodeIndent nodeItem -> ^( SilkNode NodeIndent nodeItem ) | NodeIndent function -> ^( Function NodeIndent function ) | Preamble | DataLine | BlankLine | WhiteSpace -> BlankLine ); + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:246:1: silkLine : ( NodeIndent nodeItem -> ^( SilkNode NodeIndent nodeItem ) | NodeIndent function -> ^( Function NodeIndent function ) | Preamble | DataLine | BlankLine | WhiteSpace -> BlankLine ); public final SilkParser.silkLine_return silkLine() throws RecognitionException { SilkParser.silkLine_return retval = new SilkParser.silkLine_return(); retval.start = input.LT(1); @@ -253,7 +253,7 @@ public class SilkParser extends Parser { RewriteRuleSubtreeStream stream_nodeItem=new RewriteRuleSubtreeStream(adaptor,"rule nodeItem"); RewriteRuleSubtreeStream stream_function=new RewriteRuleSubtreeStream(adaptor,"rule function"); try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:247:2: ( NodeIndent nodeItem -> ^( SilkNode NodeIndent nodeItem ) | NodeIndent function -> ^( Function NodeIndent function ) | Preamble | DataLine | BlankLine | WhiteSpace -> BlankLine ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:247:2: ( NodeIndent nodeItem -> ^( SilkNode NodeIndent nodeItem ) | NodeIndent function -> ^( Function NodeIndent function ) | Preamble | DataLine | BlankLine | WhiteSpace -> BlankLine ) int alt2=6; switch ( input.LA(1) ) { case NodeIndent: @@ -303,7 +303,7 @@ public class SilkParser extends Parser { switch (alt2) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:247:4: NodeIndent nodeItem + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:247:4: NodeIndent nodeItem { NodeIndent2=(Token)match(input,NodeIndent,FOLLOW_NodeIndent_in_silkLine912); stream_NodeIndent.add(NodeIndent2); @@ -317,7 +317,7 @@ public class SilkParser extends Parser { // AST REWRITE - // elements: nodeItem, NodeIndent + // elements: NodeIndent, nodeItem // token labels: // rule labels: retval // token list labels: @@ -328,7 +328,7 @@ public class SilkParser extends Parser { root_0 = (Object)adaptor.nil(); // 247:24: -> ^( SilkNode NodeIndent nodeItem ) { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:247:27: ^( SilkNode NodeIndent nodeItem ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:247:27: ^( SilkNode NodeIndent nodeItem ) { Object root_1 = (Object)adaptor.nil(); root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(SilkNode, "SilkNode"), root_1); @@ -345,7 +345,7 @@ public class SilkParser extends Parser { } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:248:4: NodeIndent function + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:248:4: NodeIndent function { NodeIndent4=(Token)match(input,NodeIndent,FOLLOW_NodeIndent_in_silkLine930); stream_NodeIndent.add(NodeIndent4); @@ -370,7 +370,7 @@ public class SilkParser extends Parser { root_0 = (Object)adaptor.nil(); // 248:24: -> ^( Function NodeIndent function ) { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:248:27: ^( Function NodeIndent function ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:248:27: ^( Function NodeIndent function ) { Object root_1 = (Object)adaptor.nil(); root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(Function, "Function"), root_1); @@ -387,7 +387,7 @@ public class SilkParser extends Parser { } break; case 3 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:249:4: Preamble + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:249:4: Preamble { root_0 = (Object)adaptor.nil(); @@ -399,7 +399,7 @@ public class SilkParser extends Parser { } break; case 4 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:250:4: DataLine + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:250:4: DataLine { root_0 = (Object)adaptor.nil(); @@ -411,7 +411,7 @@ public class SilkParser extends Parser { } break; case 5 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:251:4: BlankLine + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:251:4: BlankLine { root_0 = (Object)adaptor.nil(); @@ -423,7 +423,7 @@ public class SilkParser extends Parser { } break; case 6 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:252:4: WhiteSpace + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:252:4: WhiteSpace { WhiteSpace9=(Token)match(input,WhiteSpace,FOLLOW_WhiteSpace_in_silkLine964); stream_WhiteSpace.add(WhiteSpace9); @@ -475,7 +475,7 @@ public class SilkParser extends Parser { }; // $ANTLR start "nodeName" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:256:1: nodeName : ( PlainOneLine | String ); + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:256:1: nodeName : ( PlainOneLine | String ); public final SilkParser.nodeName_return nodeName() throws RecognitionException { SilkParser.nodeName_return retval = new SilkParser.nodeName_return(); retval.start = input.LT(1); @@ -487,8 +487,8 @@ public class SilkParser extends Parser { Object set10_tree=null; try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:256:9: ( PlainOneLine | String ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:256:9: ( PlainOneLine | String ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g: { root_0 = (Object)adaptor.nil(); @@ -530,7 +530,7 @@ public class SilkParser extends Parser { }; // $ANTLR start "nodeValue" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:257:1: nodeValue : ( ( PlainOneLine | String ) -> Value[$nodeValue.text] | JSON ); + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:257:1: nodeValue : ( ( PlainOneLine | String ) -> Value[$nodeValue.text] | JSON ); public final SilkParser.nodeValue_return nodeValue() throws RecognitionException { SilkParser.nodeValue_return retval = new SilkParser.nodeValue_return(); retval.start = input.LT(1); @@ -548,7 +548,7 @@ public class SilkParser extends Parser { RewriteRuleTokenStream stream_PlainOneLine=new RewriteRuleTokenStream(adaptor,"token PlainOneLine"); try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:258:2: ( ( PlainOneLine | String ) -> Value[$nodeValue.text] | JSON ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:258:2: ( ( PlainOneLine | String ) -> Value[$nodeValue.text] | JSON ) int alt4=2; int LA4_0 = input.LA(1); @@ -566,9 +566,9 @@ public class SilkParser extends Parser { } switch (alt4) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:258:4: ( PlainOneLine | String ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:258:4: ( PlainOneLine | String ) { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:258:4: ( PlainOneLine | String ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:258:4: ( PlainOneLine | String ) int alt3=2; int LA3_0 = input.LA(1); @@ -586,7 +586,7 @@ public class SilkParser extends Parser { } switch (alt3) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:258:5: PlainOneLine + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:258:5: PlainOneLine { PlainOneLine11=(Token)match(input,PlainOneLine,FOLLOW_PlainOneLine_in_nodeValue991); stream_PlainOneLine.add(PlainOneLine11); @@ -595,7 +595,7 @@ public class SilkParser extends Parser { } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:258:20: String + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:258:20: String { String12=(Token)match(input,String,FOLLOW_String_in_nodeValue995); stream_String.add(String12); @@ -628,7 +628,7 @@ public class SilkParser extends Parser { } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:259:4: JSON + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:259:4: JSON { root_0 = (Object)adaptor.nil(); @@ -665,7 +665,7 @@ public class SilkParser extends Parser { }; // $ANTLR start "nodeItem" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:1: nodeItem : nodeName ( Colon nodeValue )? ( LParen attributeList RParen )? ( dataType )? ( plural )? -> Name[$nodeName.text] ( nodeValue )? ( dataType )? ( plural )? ( attributeList )? ; + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:1: nodeItem : nodeName ( Colon nodeValue )? ( LParen attributeList RParen )? ( dataType )? ( plural )? -> Name[$nodeName.text] ( nodeValue )? ( dataType )? ( plural )? ( attributeList )? ; public final SilkParser.nodeItem_return nodeItem() throws RecognitionException { SilkParser.nodeItem_return retval = new SilkParser.nodeItem_return(); retval.start = input.LT(1); @@ -698,8 +698,8 @@ public class SilkParser extends Parser { RewriteRuleSubtreeStream stream_plural=new RewriteRuleSubtreeStream(adaptor,"rule plural"); RewriteRuleSubtreeStream stream_nodeValue=new RewriteRuleSubtreeStream(adaptor,"rule nodeValue"); try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:9: ( nodeName ( Colon nodeValue )? ( LParen attributeList RParen )? ( dataType )? ( plural )? -> Name[$nodeName.text] ( nodeValue )? ( dataType )? ( plural )? ( attributeList )? ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:11: nodeName ( Colon nodeValue )? ( LParen attributeList RParen )? ( dataType )? ( plural )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:9: ( nodeName ( Colon nodeValue )? ( LParen attributeList RParen )? ( dataType )? ( plural )? -> Name[$nodeName.text] ( nodeValue )? ( dataType )? ( plural )? ( attributeList )? ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:11: nodeName ( Colon nodeValue )? ( LParen attributeList RParen )? ( dataType )? ( plural )? { pushFollow(FOLLOW_nodeName_in_nodeItem1020); nodeName14=nodeName(); @@ -707,7 +707,7 @@ public class SilkParser extends Parser { state._fsp--; stream_nodeName.add(nodeName14.getTree()); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:20: ( Colon nodeValue )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:20: ( Colon nodeValue )? int alt5=2; int LA5_0 = input.LA(1); @@ -716,7 +716,7 @@ public class SilkParser extends Parser { } switch (alt5) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:21: Colon nodeValue + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:21: Colon nodeValue { Colon15=(Token)match(input,Colon,FOLLOW_Colon_in_nodeItem1023); stream_Colon.add(Colon15); @@ -733,7 +733,7 @@ public class SilkParser extends Parser { } - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:39: ( LParen attributeList RParen )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:39: ( LParen attributeList RParen )? int alt6=2; int LA6_0 = input.LA(1); @@ -742,7 +742,7 @@ public class SilkParser extends Parser { } switch (alt6) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:40: LParen attributeList RParen + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:40: LParen attributeList RParen { LParen17=(Token)match(input,LParen,FOLLOW_LParen_in_nodeItem1030); stream_LParen.add(LParen17); @@ -762,7 +762,7 @@ public class SilkParser extends Parser { } - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:70: ( dataType )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:70: ( dataType )? int alt7=2; int LA7_0 = input.LA(1); @@ -771,7 +771,7 @@ public class SilkParser extends Parser { } switch (alt7) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:70: dataType + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:70: dataType { pushFollow(FOLLOW_dataType_in_nodeItem1038); dataType20=dataType(); @@ -785,7 +785,7 @@ public class SilkParser extends Parser { } - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:80: ( plural )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:80: ( plural )? int alt8=2; int LA8_0 = input.LA(1); @@ -794,7 +794,7 @@ public class SilkParser extends Parser { } switch (alt8) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:80: plural + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:271:80: plural { pushFollow(FOLLOW_plural_in_nodeItem1041); plural21=plural(); @@ -811,7 +811,7 @@ public class SilkParser extends Parser { // AST REWRITE - // elements: attributeList, dataType, plural, nodeValue + // elements: nodeValue, dataType, attributeList, plural // token labels: // rule labels: retval // token list labels: @@ -823,25 +823,25 @@ public class SilkParser extends Parser { // 272:2: -> Name[$nodeName.text] ( nodeValue )? ( dataType )? ( plural )? ( attributeList )? { adaptor.addChild(root_0, (Object)adaptor.create(Name, (nodeName14!=null?input.toString(nodeName14.start,nodeName14.stop):null))); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:272:26: ( nodeValue )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:272:26: ( nodeValue )? if ( stream_nodeValue.hasNext() ) { adaptor.addChild(root_0, stream_nodeValue.nextTree()); } stream_nodeValue.reset(); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:272:37: ( dataType )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:272:37: ( dataType )? if ( stream_dataType.hasNext() ) { adaptor.addChild(root_0, stream_dataType.nextTree()); } stream_dataType.reset(); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:272:47: ( plural )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:272:47: ( plural )? if ( stream_plural.hasNext() ) { adaptor.addChild(root_0, stream_plural.nextTree()); } stream_plural.reset(); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:272:55: ( attributeList )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:272:55: ( attributeList )? if ( stream_attributeList.hasNext() ) { adaptor.addChild(root_0, stream_attributeList.nextTree()); @@ -877,7 +877,7 @@ public class SilkParser extends Parser { }; // $ANTLR start "dataType" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:275:1: dataType : LBracket dataTypeName RBracket ; + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:275:1: dataType : LBracket dataTypeName RBracket ; public final SilkParser.dataType_return dataType() throws RecognitionException { SilkParser.dataType_return retval = new SilkParser.dataType_return(); retval.start = input.LT(1); @@ -893,8 +893,8 @@ public class SilkParser extends Parser { Object RBracket24_tree=null; try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:275:9: ( LBracket dataTypeName RBracket ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:275:11: LBracket dataTypeName RBracket + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:275:9: ( LBracket dataTypeName RBracket ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:275:11: LBracket dataTypeName RBracket { root_0 = (Object)adaptor.nil(); @@ -933,7 +933,7 @@ public class SilkParser extends Parser { }; // $ANTLR start "dataTypeName" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:278:1: dataTypeName : PlainOneLine -> DataType[$dataTypeName.text] ; + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:278:1: dataTypeName : PlainOneLine -> DataType[$dataTypeName.text] ; public final SilkParser.dataTypeName_return dataTypeName() throws RecognitionException { SilkParser.dataTypeName_return retval = new SilkParser.dataTypeName_return(); retval.start = input.LT(1); @@ -946,8 +946,8 @@ public class SilkParser extends Parser { RewriteRuleTokenStream stream_PlainOneLine=new RewriteRuleTokenStream(adaptor,"token PlainOneLine"); try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:278:13: ( PlainOneLine -> DataType[$dataTypeName.text] ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:278:15: PlainOneLine + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:278:13: ( PlainOneLine -> DataType[$dataTypeName.text] ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:278:15: PlainOneLine { PlainOneLine25=(Token)match(input,PlainOneLine,FOLLOW_PlainOneLine_in_dataTypeName1086); stream_PlainOneLine.add(PlainOneLine25); @@ -997,7 +997,7 @@ public class SilkParser extends Parser { }; // $ANTLR start "attributeList" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:282:1: attributeList : attributeItem ( Comma attributeItem )* ; + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:282:1: attributeList : attributeItem ( Comma attributeItem )* ; public final SilkParser.attributeList_return attributeList() throws RecognitionException { SilkParser.attributeList_return retval = new SilkParser.attributeList_return(); retval.start = input.LT(1); @@ -1013,8 +1013,8 @@ public class SilkParser extends Parser { Object Comma27_tree=null; try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:282:14: ( attributeItem ( Comma attributeItem )* ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:282:16: attributeItem ( Comma attributeItem )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:282:14: ( attributeItem ( Comma attributeItem )* ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:282:16: attributeItem ( Comma attributeItem )* { root_0 = (Object)adaptor.nil(); @@ -1024,7 +1024,7 @@ public class SilkParser extends Parser { state._fsp--; adaptor.addChild(root_0, attributeItem26.getTree()); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:282:30: ( Comma attributeItem )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:282:30: ( Comma attributeItem )* loop9: do { int alt9=2; @@ -1037,7 +1037,7 @@ public class SilkParser extends Parser { switch (alt9) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:282:31: Comma attributeItem + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:282:31: Comma attributeItem { Comma27=(Token)match(input,Comma,FOLLOW_Comma_in_attributeList1107); pushFollow(FOLLOW_attributeItem_in_attributeList1110); @@ -1082,7 +1082,7 @@ public class SilkParser extends Parser { }; // $ANTLR start "attributeItem" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:283:1: attributeItem : nodeItem -> ^( SilkNode nodeItem ) ; + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:283:1: attributeItem : nodeItem -> ^( SilkNode nodeItem ) ; public final SilkParser.attributeItem_return attributeItem() throws RecognitionException { SilkParser.attributeItem_return retval = new SilkParser.attributeItem_return(); retval.start = input.LT(1); @@ -1094,8 +1094,8 @@ public class SilkParser extends Parser { RewriteRuleSubtreeStream stream_nodeItem=new RewriteRuleSubtreeStream(adaptor,"rule nodeItem"); try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:283:14: ( nodeItem -> ^( SilkNode nodeItem ) ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:283:16: nodeItem + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:283:14: ( nodeItem -> ^( SilkNode nodeItem ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:283:16: nodeItem { pushFollow(FOLLOW_nodeItem_in_attributeItem1120); nodeItem29=nodeItem(); @@ -1117,7 +1117,7 @@ public class SilkParser extends Parser { root_0 = (Object)adaptor.nil(); // 283:25: -> ^( SilkNode nodeItem ) { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:283:28: ^( SilkNode nodeItem ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:283:28: ^( SilkNode nodeItem ) { Object root_1 = (Object)adaptor.nil(); root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(SilkNode, "SilkNode"), root_1); @@ -1156,7 +1156,7 @@ public class SilkParser extends Parser { }; // $ANTLR start "plural" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:286:1: plural : ( Star -> Occurrence[\"ZERO_OR_MORE\"] | Plus -> Occurrence[\"ONE_OR_MORE\"] | Question -> Occurrence[\"ZERO_OR_ONE\"] | Seq -> Occurrence[\"SEQUENCE\"] ); + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:286:1: plural : ( Star -> Occurrence[\"ZERO_OR_MORE\"] | Plus -> Occurrence[\"ONE_OR_MORE\"] | Question -> Occurrence[\"ZERO_OR_ONE\"] | Seq -> Occurrence[\"SEQUENCE\"] ); public final SilkParser.plural_return plural() throws RecognitionException { SilkParser.plural_return retval = new SilkParser.plural_return(); retval.start = input.LT(1); @@ -1178,7 +1178,7 @@ public class SilkParser extends Parser { RewriteRuleTokenStream stream_Seq=new RewriteRuleTokenStream(adaptor,"token Seq"); try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:287:2: ( Star -> Occurrence[\"ZERO_OR_MORE\"] | Plus -> Occurrence[\"ONE_OR_MORE\"] | Question -> Occurrence[\"ZERO_OR_ONE\"] | Seq -> Occurrence[\"SEQUENCE\"] ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:287:2: ( Star -> Occurrence[\"ZERO_OR_MORE\"] | Plus -> Occurrence[\"ONE_OR_MORE\"] | Question -> Occurrence[\"ZERO_OR_ONE\"] | Seq -> Occurrence[\"SEQUENCE\"] ) int alt10=4; switch ( input.LA(1) ) { case Star: @@ -1210,7 +1210,7 @@ public class SilkParser extends Parser { switch (alt10) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:287:4: Star + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:287:4: Star { Star30=(Token)match(input,Star,FOLLOW_Star_in_plural1138); stream_Star.add(Star30); @@ -1237,7 +1237,7 @@ public class SilkParser extends Parser { } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:288:4: Plus + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:288:4: Plus { Plus31=(Token)match(input,Plus,FOLLOW_Plus_in_plural1148); stream_Plus.add(Plus31); @@ -1264,7 +1264,7 @@ public class SilkParser extends Parser { } break; case 3 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:289:4: Question + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:289:4: Question { Question32=(Token)match(input,Question,FOLLOW_Question_in_plural1158); stream_Question.add(Question32); @@ -1291,7 +1291,7 @@ public class SilkParser extends Parser { } break; case 4 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:290:4: Seq + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:290:4: Seq { Seq33=(Token)match(input,Seq,FOLLOW_Seq_in_plural1168); stream_Seq.add(Seq33); @@ -1343,7 +1343,7 @@ public class SilkParser extends Parser { }; // $ANTLR start "function" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:293:1: function : At PlainOneLine LParen ( functionArg ( Comma functionArg )* )? RParen -> Name[$PlainOneLine.text] ( functionArg )* ; + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:293:1: function : At PlainOneLine LParen ( functionArg ( Comma functionArg )* )? RParen -> Name[$PlainOneLine.text] ( functionArg )* ; public final SilkParser.function_return function() throws RecognitionException { SilkParser.function_return retval = new SilkParser.function_return(); retval.start = input.LT(1); @@ -1372,8 +1372,8 @@ public class SilkParser extends Parser { RewriteRuleTokenStream stream_LParen=new RewriteRuleTokenStream(adaptor,"token LParen"); RewriteRuleSubtreeStream stream_functionArg=new RewriteRuleSubtreeStream(adaptor,"rule functionArg"); try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:293:9: ( At PlainOneLine LParen ( functionArg ( Comma functionArg )* )? RParen -> Name[$PlainOneLine.text] ( functionArg )* ) - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:293:11: At PlainOneLine LParen ( functionArg ( Comma functionArg )* )? RParen + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:293:9: ( At PlainOneLine LParen ( functionArg ( Comma functionArg )* )? RParen -> Name[$PlainOneLine.text] ( functionArg )* ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:293:11: At PlainOneLine LParen ( functionArg ( Comma functionArg )* )? RParen { At34=(Token)match(input,At,FOLLOW_At_in_function1182); stream_At.add(At34); @@ -1384,7 +1384,7 @@ public class SilkParser extends Parser { LParen36=(Token)match(input,LParen,FOLLOW_LParen_in_function1186); stream_LParen.add(LParen36); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:293:34: ( functionArg ( Comma functionArg )* )? + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:293:34: ( functionArg ( Comma functionArg )* )? int alt12=2; int LA12_0 = input.LA(1); @@ -1393,7 +1393,7 @@ public class SilkParser extends Parser { } switch (alt12) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:293:35: functionArg ( Comma functionArg )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:293:35: functionArg ( Comma functionArg )* { pushFollow(FOLLOW_functionArg_in_function1189); functionArg37=functionArg(); @@ -1401,7 +1401,7 @@ public class SilkParser extends Parser { state._fsp--; stream_functionArg.add(functionArg37.getTree()); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:293:47: ( Comma functionArg )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:293:47: ( Comma functionArg )* loop11: do { int alt11=2; @@ -1414,7 +1414,7 @@ public class SilkParser extends Parser { switch (alt11) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:293:48: Comma functionArg + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:293:48: Comma functionArg { Comma38=(Token)match(input,Comma,FOLLOW_Comma_in_function1192); stream_Comma.add(Comma38); @@ -1458,7 +1458,7 @@ public class SilkParser extends Parser { // 294:2: -> Name[$PlainOneLine.text] ( functionArg )* { adaptor.addChild(root_0, (Object)adaptor.create(Name, (PlainOneLine35!=null?PlainOneLine35.getText():null))); - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:30: ( functionArg )* + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:294:30: ( functionArg )* while ( stream_functionArg.hasNext() ) { adaptor.addChild(root_0, stream_functionArg.nextTree()); @@ -1494,7 +1494,7 @@ public class SilkParser extends Parser { }; // $ANTLR start "functionArg" - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:297:1: functionArg : ( nodeValue -> Argument[$functionArg.text] | nodeName Colon nodeValue -> ^( KeyValuePair Name[$nodeName.text] nodeValue ) ); + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:297:1: functionArg : ( nodeValue -> Argument[$functionArg.text] | nodeName Colon nodeValue -> ^( KeyValuePair Name[$nodeName.text] nodeValue ) ); public final SilkParser.functionArg_return functionArg() throws RecognitionException { SilkParser.functionArg_return retval = new SilkParser.functionArg_return(); retval.start = input.LT(1); @@ -1514,7 +1514,7 @@ public class SilkParser extends Parser { RewriteRuleSubtreeStream stream_nodeName=new RewriteRuleSubtreeStream(adaptor,"rule nodeName"); RewriteRuleSubtreeStream stream_nodeValue=new RewriteRuleSubtreeStream(adaptor,"rule nodeValue"); try { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:298:2: ( nodeValue -> Argument[$functionArg.text] | nodeName Colon nodeValue -> ^( KeyValuePair Name[$nodeName.text] nodeValue ) ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:298:2: ( nodeValue -> Argument[$functionArg.text] | nodeName Colon nodeValue -> ^( KeyValuePair Name[$nodeName.text] nodeValue ) ) int alt13=2; switch ( input.LA(1) ) { case PlainOneLine: @@ -1567,7 +1567,7 @@ public class SilkParser extends Parser { switch (alt13) { case 1 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:298:4: nodeValue + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:298:4: nodeValue { pushFollow(FOLLOW_nodeValue_in_functionArg1220); nodeValue41=nodeValue(); @@ -1597,7 +1597,7 @@ public class SilkParser extends Parser { } break; case 2 : - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:299:4: nodeName Colon nodeValue + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:299:4: nodeName Colon nodeValue { pushFollow(FOLLOW_nodeName_in_functionArg1230); nodeName42=nodeName(); @@ -1628,7 +1628,7 @@ public class SilkParser extends Parser { root_0 = (Object)adaptor.nil(); // 299:29: -> ^( KeyValuePair Name[$nodeName.text] nodeValue ) { - // F:\\cygwin\\home\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:299:32: ^( KeyValuePair Name[$nodeName.text] nodeValue ) + // c:\\Users\\leo\\work\\eclipse\\workspace\\xerial\\xerial-core\\src\\main\\java\\org\\xerial\\silk\\impl\\Silk.g:299:32: ^( KeyValuePair Name[$nodeName.text] nodeValue ) { Object root_1 = (Object)adaptor.nil(); root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(KeyValuePair, "KeyValuePair"), root_1); diff --git a/src/main/java/org/xerial/silk/impl/SilkTextValue.java b/src/main/java/org/xerial/silk/impl/SilkTextValue.java new file mode 100644 index 0000000..ae00e1e --- /dev/null +++ b/src/main/java/org/xerial/silk/impl/SilkTextValue.java @@ -0,0 +1,59 @@ +/*-------------------------------------------------------------------------- + * Copyright 2009 Taro L. Saito + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *--------------------------------------------------------------------------*/ +//-------------------------------------- +// XerialJ +// +// SilkTextValue.java +// Since: 2009/02/01 23:50:12 +// +// $URL$ +// $Author$ +//-------------------------------------- +package org.xerial.silk.impl; + +/** + * + * Text value + * + * @author leo + * + */ +public class SilkTextValue implements SilkValue +{ + private String value; + + public SilkTextValue(String value) + { + this.value = value; + } + + public String getValue() + { + return value; + } + + public boolean isJSON() + { + return false; + } + + @Override + public String toString() + { + return value; + } + +} diff --git a/src/main/java/org/xerial/silk/impl/SiklNodeOccurrence.java b/src/main/java/org/xerial/silk/impl/SilkValue.java similarity index 75% rename from src/main/java/org/xerial/silk/impl/SiklNodeOccurrence.java rename to src/main/java/org/xerial/silk/impl/SilkValue.java index c1f3f43..a2b9190 100644 --- a/src/main/java/org/xerial/silk/impl/SiklNodeOccurrence.java +++ b/src/main/java/org/xerial/silk/impl/SilkValue.java @@ -1,41 +1,39 @@ -/*-------------------------------------------------------------------------- - * Copyright 2009 Taro L. Saito - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *--------------------------------------------------------------------------*/ -//-------------------------------------- -// XerialJ -// -// SiklNodeOccurrence.java -// Since: Jan 30, 2009 7:15:46 PM -// -// $URL$ -// $Author$ -//-------------------------------------- -package org.xerial.silk.impl; - -/** - * node occurrence - * - * @author leo - * - */ -public enum SiklNodeOccurrence { - - ONE, ZERO_OR_MORE, ONE_OR_MORE, ZERO_OR_ONE, SEQUENCE, TABBED_SEQUENCE; - - public boolean isFollowedByStreamData() - { - return this == SEQUENCE || this == TABBED_SEQUENCE; - } -} +/*-------------------------------------------------------------------------- + * Copyright 2009 Taro L. Saito + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *--------------------------------------------------------------------------*/ +//-------------------------------------- +// XerialJ +// +// SilkValue.java +// Since: 2009/02/01 23:42:52 +// +// $URL$ +// $Author$ +//-------------------------------------- +package org.xerial.silk.impl; + +/** + * text value of nodes or functions + * + * @author leo + * + */ +public interface SilkValue +{ + public boolean isJSON(); + + public String getValue(); + +} diff --git a/src/test/java/org/xerial/silk/small.silk b/src/test/java/org/xerial/silk/small.silk index 54267d1..42168fe 100644 --- a/src/test/java/org/xerial/silk/small.silk +++ b/src/test/java/org/xerial/silk/small.silk @@ -7,3 +7,6 @@ -link(page name: Welcome to Xerial, url:"http://www.xerial.org/") -"quoted key":"quoted value"("quoted attrib":"quoted attrib value") + +-@import(somefile.silk) + -- 2.11.0