summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2007-08-19 01:42:52 +0000
committerRich Hickey <richhickey@gmail.com>2007-08-19 01:42:52 +0000
commit92075ac2c07da8a76bb3b07db4e59c8f7a10d915 (patch)
treef29ca3c6ff494bc2b805208a95ac8e372bd51f54 /src
parent508d68d6c108114195188cf18260759d2f35ac5e (diff)
got rid of ANTLR reader
Diffstat (limited to 'src')
-rw-r--r--src/jvm/clojure/lang/ReaderLexer.java2498
-rw-r--r--src/jvm/clojure/lang/ReaderParser.java2675
2 files changed, 0 insertions, 5173 deletions
diff --git a/src/jvm/clojure/lang/ReaderLexer.java b/src/jvm/clojure/lang/ReaderLexer.java
deleted file mode 100644
index 4a916507..00000000
--- a/src/jvm/clojure/lang/ReaderLexer.java
+++ /dev/null
@@ -1,2498 +0,0 @@
-// $ANTLR 3.0 /Users/rich/dev/clojure/src/jvm/Reader.g 2007-08-02 16:47:44
-
-/**
- * Copyright (c) Rich Hickey. All rights reserved.
- * The use and distribution terms for this software are covered by the
- * Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
- * which can be found in the file CPL.TXT at the root of this distribution.
- * By using this software in any fashion, you are agreeing to be bound by
- * the terms of this license.
- * You must not remove this notice, or any other, from this software.
- **/
-package clojure.lang;
-
-
-import org.antlr.runtime.*;
-
-import java.util.Stack;
-import java.util.List;
-import java.util.ArrayList;
-
-public class ReaderLexer extends Lexer{
-public static final int TrueToken = 11;
-public static final int T29 = 29;
-public static final int Exponent = 19;
-public static final int OctalLiteral = 15;
-public static final int T33 = 33;
-public static final int Identifier = 4;
-public static final int HexDigit = 18;
-public static final int T36 = 36;
-public static final int WS = 26;
-public static final int CharacterLiteral = 9;
-public static final int MethodIdentifier = 16;
-public static final int NSIdentifier = 5;
-public static final int T35 = 35;
-public static final int COMMENT = 27;
-public static final int KeywordIdentifier = 7;
-public static final int StringLiteral = 10;
-public static final int LINE_COMMENT = 28;
-public static final int DotDot = 6;
-public static final int T34 = 34;
-public static final int JavaIDDigit = 25;
-public static final int Letter = 24;
-public static final int UnicodeEscape = 22;
-public static final int Comma = 17;
-public static final int HexLiteral = 14;
-public static final int T37 = 37;
-public static final int EscapeSequence = 21;
-public static final int NullToken = 12;
-public static final int EOF = -1;
-public static final int DecimalLiteral = 13;
-public static final int T32 = 32;
-public static final int Tokens = 40;
-public static final int T31 = 31;
-public static final int OctalEscape = 23;
-public static final int T38 = 38;
-public static final int FloatingPointLiteral = 8;
-public static final int T30 = 30;
-public static final int FloatTypeSuffix = 20;
-public static final int T39 = 39;
-
-RecognitionException rex = null;
-
-public void recover(RecognitionException re){
- super.recover(re);
- if(rex == null)
- rex = re;
-}
-
-public void reportError(RecognitionException e){
- if(rex == null)
- rex = e;
-}
-
-public ReaderLexer(){
- ;
-}
-
-public ReaderLexer(CharStream input){
- super(input);
-}
-
-public String getGrammarFileName(){
- return "/Users/rich/dev/clojure/src/jvm/Reader.g";
-}
-
-// $ANTLR start T29
-public final void mT29() throws RecognitionException{
- try
- {
- int _type = T29;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:33:7: ( '(' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:33:7: '('
- {
- match('(');
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end T29
-
-// $ANTLR start T30
-
-public final void mT30() throws RecognitionException{
- try
- {
- int _type = T30;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:34:7: ( ')' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:34:7: ')'
- {
- match(')');
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end T30
-
-// $ANTLR start T31
-
-public final void mT31() throws RecognitionException{
- try
- {
- int _type = T31;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:35:7: ( '[' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:35:7: '['
- {
- match('[');
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end T31
-
-// $ANTLR start T32
-
-public final void mT32() throws RecognitionException{
- try
- {
- int _type = T32;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:36:7: ( ']' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:36:7: ']'
- {
- match(']');
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end T32
-
-// $ANTLR start T33
-
-public final void mT33() throws RecognitionException{
- try
- {
- int _type = T33;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:37:7: ( '{' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:37:7: '{'
- {
- match('{');
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end T33
-
-// $ANTLR start T34
-
-public final void mT34() throws RecognitionException{
- try
- {
- int _type = T34;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:38:7: ( '}' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:38:7: '}'
- {
- match('}');
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end T34
-
-// $ANTLR start T35
-
-public final void mT35() throws RecognitionException{
- try
- {
- int _type = T35;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:39:7: ( '/' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:39:7: '/'
- {
- match('/');
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end T35
-
-// $ANTLR start T36
-
-public final void mT36() throws RecognitionException{
- try
- {
- int _type = T36;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:40:7: ( '#^' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:40:7: '#^'
- {
- match("#^");
-
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end T36
-
-// $ANTLR start T37
-
-public final void mT37() throws RecognitionException{
- try
- {
- int _type = T37;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:41:7: ( '.' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:41:7: '.'
- {
- match('.');
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end T37
-
-// $ANTLR start T38
-
-public final void mT38() throws RecognitionException{
- try
- {
- int _type = T38;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:42:7: ( '\\'' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:42:7: '\\''
- {
- match('\'');
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end T38
-
-// $ANTLR start T39
-
-public final void mT39() throws RecognitionException{
- try
- {
- int _type = T39;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:43:7: ( '^' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:43:7: '^'
- {
- match('^');
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end T39
-
-// $ANTLR start Comma
-
-public final void mComma() throws RecognitionException{
- try
- {
- int _type = Comma;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:242:10: ( ',' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:242:10: ','
- {
- match(',');
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end Comma
-
-// $ANTLR start TrueToken
-
-public final void mTrueToken() throws RecognitionException{
- try
- {
- int _type = TrueToken;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:244:16: ( 'true' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:244:16: 'true'
- {
- match("true");
-
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end TrueToken
-
-// $ANTLR start NullToken
-
-public final void mNullToken() throws RecognitionException{
- try
- {
- int _type = NullToken;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:246:16: ( 'null' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:246:16: 'null'
- {
- match("null");
-
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end NullToken
-
-// $ANTLR start DotDot
-
-public final void mDotDot() throws RecognitionException{
- try
- {
- int _type = DotDot;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:248:10: ( '..' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:248:10: '..'
- {
- match("..");
-
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end DotDot
-
-// $ANTLR start HexLiteral
-
-public final void mHexLiteral() throws RecognitionException{
- try
- {
- int _type = HexLiteral;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:250:14: ( '0' ( 'x' | 'X' ) ( HexDigit )+ )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:250:14: '0' ( 'x' | 'X' ) ( HexDigit )+
- {
- match('0');
- if(input.LA(1) == 'X' || input.LA(1) == 'x')
- {
- input.consume();
-
- }
- else
- {
- MismatchedSetException mse =
- new MismatchedSetException(null, input);
- recover(mse);
- throw mse;
- }
-
- // /Users/rich/dev/clojure/src/jvm/Reader.g:250:28: ( HexDigit )+
- int cnt1 = 0;
- loop1:
- do
- {
- int alt1 = 2;
- int LA1_0 = input.LA(1);
-
- if(((LA1_0 >= '0' && LA1_0 <= '9') || (LA1_0 >= 'A' && LA1_0 <= 'F') || (LA1_0 >= 'a' && LA1_0 <= 'f')))
- {
- alt1 = 1;
- }
-
-
- switch(alt1)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:250:28: HexDigit
- {
- mHexDigit();
-
- }
- break;
-
- default:
- if(cnt1 >= 1) break loop1;
- EarlyExitException eee =
- new EarlyExitException(1, input);
- throw eee;
- }
- cnt1++;
- } while(true);
-
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end HexLiteral
-
-// $ANTLR start DecimalLiteral
-
-public final void mDecimalLiteral() throws RecognitionException{
- try
- {
- int _type = DecimalLiteral;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:252:18: ( ( '0' | '1' .. '9' ( '0' .. '9' )* ) )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:252:18: ( '0' | '1' .. '9' ( '0' .. '9' )* )
- {
- // /Users/rich/dev/clojure/src/jvm/Reader.g:252:18: ( '0' | '1' .. '9' ( '0' .. '9' )* )
- int alt3 = 2;
- int LA3_0 = input.LA(1);
-
- if((LA3_0 == '0'))
- {
- alt3 = 1;
- }
- else if(((LA3_0 >= '1' && LA3_0 <= '9')))
- {
- alt3 = 2;
- }
- else
- {
- NoViableAltException nvae =
- new NoViableAltException("252:18: ( '0' | '1' .. '9' ( '0' .. '9' )* )", 3, 0, input);
-
- throw nvae;
- }
- switch(alt3)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:252:19: '0'
- {
- match('0');
-
- }
- break;
- case 2:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:252:25: '1' .. '9' ( '0' .. '9' )*
- {
- matchRange('1', '9');
- // /Users/rich/dev/clojure/src/jvm/Reader.g:252:34: ( '0' .. '9' )*
- loop2:
- do
- {
- int alt2 = 2;
- int LA2_0 = input.LA(1);
-
- if(((LA2_0 >= '0' && LA2_0 <= '9')))
- {
- alt2 = 1;
- }
-
-
- switch(alt2)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:252:34: '0' .. '9'
- {
- matchRange('0', '9');
-
- }
- break;
-
- default:
- break loop2;
- }
- } while(true);
-
-
- }
- break;
-
- }
-
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end DecimalLiteral
-
-// $ANTLR start OctalLiteral
-
-public final void mOctalLiteral() throws RecognitionException{
- try
- {
- int _type = OctalLiteral;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:254:16: ( '0' ( '0' .. '7' )+ )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:254:16: '0' ( '0' .. '7' )+
- {
- match('0');
- // /Users/rich/dev/clojure/src/jvm/Reader.g:254:20: ( '0' .. '7' )+
- int cnt4 = 0;
- loop4:
- do
- {
- int alt4 = 2;
- int LA4_0 = input.LA(1);
-
- if(((LA4_0 >= '0' && LA4_0 <= '7')))
- {
- alt4 = 1;
- }
-
-
- switch(alt4)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:254:21: '0' .. '7'
- {
- matchRange('0', '7');
-
- }
- break;
-
- default:
- if(cnt4 >= 1) break loop4;
- EarlyExitException eee =
- new EarlyExitException(4, input);
- throw eee;
- }
- cnt4++;
- } while(true);
-
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end OctalLiteral
-
-// $ANTLR start HexDigit
-
-public final void mHexDigit() throws RecognitionException{
- try
- {
- // /Users/rich/dev/clojure/src/jvm/Reader.g:257:12: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:257:12: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )
- {
- 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();
-
- }
- else
- {
- MismatchedSetException mse =
- new MismatchedSetException(null, input);
- recover(mse);
- throw mse;
- }
-
-
- }
-
- }
- finally
- {
- }
-}
-// $ANTLR end HexDigit
-
-// $ANTLR start FloatingPointLiteral
-
-public final void mFloatingPointLiteral() throws RecognitionException{
- try
- {
- int _type = FloatingPointLiteral;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:260:9: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( Exponent )? ( FloatTypeSuffix )? | '.' ( '0' .. '9' )+ ( Exponent )? ( FloatTypeSuffix )? | ( '0' .. '9' )+ Exponent ( FloatTypeSuffix )? | ( '0' .. '9' )+ ( Exponent )? FloatTypeSuffix )
- int alt16 = 4;
- alt16 = dfa16.predict(input);
- switch(alt16)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:260:9: ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( Exponent )? ( FloatTypeSuffix )?
- {
- // /Users/rich/dev/clojure/src/jvm/Reader.g:260:9: ( '0' .. '9' )+
- int cnt5 = 0;
- loop5:
- do
- {
- int alt5 = 2;
- int LA5_0 = input.LA(1);
-
- if(((LA5_0 >= '0' && LA5_0 <= '9')))
- {
- alt5 = 1;
- }
-
-
- switch(alt5)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:260:10: '0' .. '9'
- {
- matchRange('0', '9');
-
- }
- break;
-
- default:
- if(cnt5 >= 1) break loop5;
- EarlyExitException eee =
- new EarlyExitException(5, input);
- throw eee;
- }
- cnt5++;
- } while(true);
-
- match('.');
- // /Users/rich/dev/clojure/src/jvm/Reader.g:260:25: ( '0' .. '9' )*
- loop6:
- do
- {
- int alt6 = 2;
- int LA6_0 = input.LA(1);
-
- if(((LA6_0 >= '0' && LA6_0 <= '9')))
- {
- alt6 = 1;
- }
-
-
- switch(alt6)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:260:26: '0' .. '9'
- {
- matchRange('0', '9');
-
- }
- break;
-
- default:
- break loop6;
- }
- } while(true);
-
- // /Users/rich/dev/clojure/src/jvm/Reader.g:260:37: ( Exponent )?
- int alt7 = 2;
- int LA7_0 = input.LA(1);
-
- if((LA7_0 == 'E' || LA7_0 == 'e'))
- {
- alt7 = 1;
- }
- switch(alt7)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:260:37: Exponent
- {
- mExponent();
-
- }
- break;
-
- }
-
- // /Users/rich/dev/clojure/src/jvm/Reader.g:260:47: ( FloatTypeSuffix )?
- int alt8 = 2;
- int LA8_0 = input.LA(1);
-
- if((LA8_0 == 'D' || LA8_0 == 'F' || LA8_0 == 'd' || LA8_0 == 'f'))
- {
- alt8 = 1;
- }
- switch(alt8)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:260:47: FloatTypeSuffix
- {
- mFloatTypeSuffix();
-
- }
- break;
-
- }
-
-
- }
- break;
- case 2:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:261:9: '.' ( '0' .. '9' )+ ( Exponent )? ( FloatTypeSuffix )?
- {
- match('.');
- // /Users/rich/dev/clojure/src/jvm/Reader.g:261:13: ( '0' .. '9' )+
- int cnt9 = 0;
- loop9:
- do
- {
- int alt9 = 2;
- int LA9_0 = input.LA(1);
-
- if(((LA9_0 >= '0' && LA9_0 <= '9')))
- {
- alt9 = 1;
- }
-
-
- switch(alt9)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:261:14: '0' .. '9'
- {
- matchRange('0', '9');
-
- }
- break;
-
- default:
- if(cnt9 >= 1) break loop9;
- EarlyExitException eee =
- new EarlyExitException(9, input);
- throw eee;
- }
- cnt9++;
- } while(true);
-
- // /Users/rich/dev/clojure/src/jvm/Reader.g:261:25: ( Exponent )?
- int alt10 = 2;
- int LA10_0 = input.LA(1);
-
- if((LA10_0 == 'E' || LA10_0 == 'e'))
- {
- alt10 = 1;
- }
- switch(alt10)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:261:25: Exponent
- {
- mExponent();
-
- }
- break;
-
- }
-
- // /Users/rich/dev/clojure/src/jvm/Reader.g:261:35: ( FloatTypeSuffix )?
- int alt11 = 2;
- int LA11_0 = input.LA(1);
-
- if((LA11_0 == 'D' || LA11_0 == 'F' || LA11_0 == 'd' || LA11_0 == 'f'))
- {
- alt11 = 1;
- }
- switch(alt11)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:261:35: FloatTypeSuffix
- {
- mFloatTypeSuffix();
-
- }
- break;
-
- }
-
-
- }
- break;
- case 3:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:262:9: ( '0' .. '9' )+ Exponent ( FloatTypeSuffix )?
- {
- // /Users/rich/dev/clojure/src/jvm/Reader.g:262:9: ( '0' .. '9' )+
- int cnt12 = 0;
- loop12:
- do
- {
- int alt12 = 2;
- int LA12_0 = input.LA(1);
-
- if(((LA12_0 >= '0' && LA12_0 <= '9')))
- {
- alt12 = 1;
- }
-
-
- switch(alt12)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:262:10: '0' .. '9'
- {
- matchRange('0', '9');
-
- }
- break;
-
- default:
- if(cnt12 >= 1) break loop12;
- EarlyExitException eee =
- new EarlyExitException(12, input);
- throw eee;
- }
- cnt12++;
- } while(true);
-
- mExponent();
- // /Users/rich/dev/clojure/src/jvm/Reader.g:262:30: ( FloatTypeSuffix )?
- int alt13 = 2;
- int LA13_0 = input.LA(1);
-
- if((LA13_0 == 'D' || LA13_0 == 'F' || LA13_0 == 'd' || LA13_0 == 'f'))
- {
- alt13 = 1;
- }
- switch(alt13)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:262:30: FloatTypeSuffix
- {
- mFloatTypeSuffix();
-
- }
- break;
-
- }
-
-
- }
- break;
- case 4:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:263:9: ( '0' .. '9' )+ ( Exponent )? FloatTypeSuffix
- {
- // /Users/rich/dev/clojure/src/jvm/Reader.g:263:9: ( '0' .. '9' )+
- int cnt14 = 0;
- loop14:
- do
- {
- int alt14 = 2;
- int LA14_0 = input.LA(1);
-
- if(((LA14_0 >= '0' && LA14_0 <= '9')))
- {
- alt14 = 1;
- }
-
-
- switch(alt14)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:263:10: '0' .. '9'
- {
- matchRange('0', '9');
-
- }
- break;
-
- default:
- if(cnt14 >= 1) break loop14;
- EarlyExitException eee =
- new EarlyExitException(14, input);
- throw eee;
- }
- cnt14++;
- } while(true);
-
- // /Users/rich/dev/clojure/src/jvm/Reader.g:263:21: ( Exponent )?
- int alt15 = 2;
- int LA15_0 = input.LA(1);
-
- if((LA15_0 == 'E' || LA15_0 == 'e'))
- {
- alt15 = 1;
- }
- switch(alt15)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:263:21: Exponent
- {
- mExponent();
-
- }
- break;
-
- }
-
- mFloatTypeSuffix();
-
- }
- break;
-
- }
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end FloatingPointLiteral
-
-// $ANTLR start Exponent
-
-public final void mExponent() throws RecognitionException{
- try
- {
- // /Users/rich/dev/clojure/src/jvm/Reader.g:267:12: ( ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:267:12: ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+
- {
- if(input.LA(1) == 'E' || input.LA(1) == 'e')
- {
- input.consume();
-
- }
- else
- {
- MismatchedSetException mse =
- new MismatchedSetException(null, input);
- recover(mse);
- throw mse;
- }
-
- // /Users/rich/dev/clojure/src/jvm/Reader.g:267:22: ( '+' | '-' )?
- int alt17 = 2;
- int LA17_0 = input.LA(1);
-
- if((LA17_0 == '+' || LA17_0 == '-'))
- {
- alt17 = 1;
- }
- switch(alt17)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:
- {
- if(input.LA(1) == '+' || input.LA(1) == '-')
- {
- input.consume();
-
- }
- else
- {
- MismatchedSetException mse =
- new MismatchedSetException(null, input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
-
- }
-
- // /Users/rich/dev/clojure/src/jvm/Reader.g:267:33: ( '0' .. '9' )+
- int cnt18 = 0;
- loop18:
- do
- {
- int alt18 = 2;
- int LA18_0 = input.LA(1);
-
- if(((LA18_0 >= '0' && LA18_0 <= '9')))
- {
- alt18 = 1;
- }
-
-
- switch(alt18)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:267:34: '0' .. '9'
- {
- matchRange('0', '9');
-
- }
- break;
-
- default:
- if(cnt18 >= 1) break loop18;
- EarlyExitException eee =
- new EarlyExitException(18, input);
- throw eee;
- }
- cnt18++;
- } while(true);
-
-
- }
-
- }
- finally
- {
- }
-}
-// $ANTLR end Exponent
-
-// $ANTLR start FloatTypeSuffix
-
-public final void mFloatTypeSuffix() throws RecognitionException{
- try
- {
- // /Users/rich/dev/clojure/src/jvm/Reader.g:270:19: ( ( 'f' | 'F' | 'd' | 'D' ) )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:270:19: ( 'f' | 'F' | 'd' | 'D' )
- {
- if(input.LA(1) == 'D' || input.LA(1) == 'F' || input.LA(1) == 'd' || input.LA(1) == 'f')
- {
- input.consume();
-
- }
- else
- {
- MismatchedSetException mse =
- new MismatchedSetException(null, input);
- recover(mse);
- throw mse;
- }
-
-
- }
-
- }
- finally
- {
- }
-}
-// $ANTLR end FloatTypeSuffix
-
-// $ANTLR start CharacterLiteral
-
-public final void mCharacterLiteral() throws RecognitionException{
- try
- {
- int _type = CharacterLiteral;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:273:9: ( '\\\\' ( EscapeSequence | ~ ( '\\\\' ) ) )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:273:9: '\\\\' ( EscapeSequence | ~ ( '\\\\' ) )
- {
- match('\\');
- // /Users/rich/dev/clojure/src/jvm/Reader.g:273:14: ( EscapeSequence | ~ ( '\\\\' ) )
- int alt19 = 2;
- int LA19_0 = input.LA(1);
-
- if((LA19_0 == '\\'))
- {
- alt19 = 1;
- }
- else if(((LA19_0 >= '\u0000' && LA19_0 <= '[') || (LA19_0 >= ']' && LA19_0 <= '\uFFFE')))
- {
- alt19 = 2;
- }
- else
- {
- NoViableAltException nvae =
- new NoViableAltException("273:14: ( EscapeSequence | ~ ( '\\\\' ) )", 19, 0, input);
-
- throw nvae;
- }
- switch(alt19)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:273:16: EscapeSequence
- {
- mEscapeSequence();
-
- }
- break;
- case 2:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:273:33: ~ ( '\\\\' )
- {
- if((input.LA(1) >= '\u0000' && input.LA(1) <= '[') || (input.LA(1) >= ']' && input.LA(1) <= '\uFFFE'))
- {
- input.consume();
-
- }
- else
- {
- MismatchedSetException mse =
- new MismatchedSetException(null, input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
-
- }
-
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end CharacterLiteral
-
-// $ANTLR start StringLiteral
-
-public final void mStringLiteral() throws RecognitionException{
- try
- {
- int _type = StringLiteral;
- // /Users/rich/dev/clojure/src/jvm/Reader.g:277:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
- // /Users/rich/dev/clojure/src/jvm/Reader.g:277:8: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
- {
- match('\"');
- // /Users/rich/dev/clojure/src/jvm/Reader.g:277:12: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
- loop20:
- do
- {
- int alt20 = 3;
- int LA20_0 = input.LA(1);
-
- if((LA20_0 == '\\'))
- {
- alt20 = 1;
- }
- else if(((LA20_0 >= '\u0000' && LA20_0 <= '!') || (LA20_0 >= '#' && LA20_0 <= '[') ||
- (LA20_0 >= ']' && LA20_0 <= '\uFFFE')))
- {
- alt20 = 2;
- }
-
-
- switch(alt20)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:277:14: EscapeSequence
- {
- mEscapeSequence();
-
- }
- break;
- case 2:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:277:31: ~ ( '\\\\' | '\"' )
- {
- if((input.LA(1) >= '\u0000' && input.LA(1) <= '!') || (input.LA(1) >= '#' && input.LA(1) <= '[') ||
- (input.LA(1) >= ']' && input.LA(1) <= '\uFFFE'))
- {
- input.consume();
-
- }
- else
- {
- MismatchedSetException mse =
- new MismatchedSetException(null, input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
-
- default:
- break loop20;
- }
- } while(true);
-
- match('\"');
-
- }
-
- this.type = _type;
- }
- finally
- {
- }
-}
-// $ANTLR end StringLiteral
-
-// $ANTLR start EscapeSequence
-
-public final void mEscapeSequence() throws RecognitionException{
- try
- {
- // /Users/rich/dev/clojure/src/jvm/Reader.g:282:9: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape )
- int alt21 = 3;
- int LA21_0 = input.LA(1);
-
- if((LA21_0 == '\\'))
- {
- switch(input.LA(2))
- {
- case'\"':
- case'\'':
- case'\\':
- case'b':
- case'f':
- case'n':
- case'r':
- case't':
- {
- alt21 = 1;
- }
- break;
- case'u':
- {
- alt21 = 2;
- }
- break;
- case'0':
- case'1':
- case'2':
- case'3':
- case'4':
- case'5':
- case'6':
- case'7':
- {
- alt21 = 3;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException(
- "280:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );",
- 21, 1, input);
-
- throw nvae;
- }
-
- }
- else
- {
- NoViableAltException nvae =
- new NoViableAltException(
- "280:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );",
- 21, 0, input);
-
- throw nvae;
- }
- switch(alt21)
- {
- case 1:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:282:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
- {
- match('\\');
- if(input.LA(1) == '\"' || input.LA(1) == '\'' || input.LA(1) == '\\' || input.LA(1) == 'b' ||
- input.LA(1) == 'f' || input.LA(1) == 'n' || input.LA(1) == 'r' || input.LA(1) == 't')
- {
- input.consume();
-
- }
- else
- {
- MismatchedSetException mse =
- new MismatchedSetException(null, input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
- case 2:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:283:9: UnicodeEscape
- {
- mUnicodeEscape();
-
- }
- break;
- case 3:
- // /Users/rich/dev/clojure/src/jvm/Reader.g:284:9: OctalEscape
- {
- mOctalEscape();
-
- }
- break;
-
- }
- }
- finally
- {
- }
-}
-// $ANTLR end EscapeSequence
-
-// $ANTLR start OctalEscape
-
-public final void mOctalEscape() throws RecognitionException{
- try
- {
- // /Users/rich/dev/clojure/src/jvm/Reader.g:289:9: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
- int alt22 = 3;
- int LA22_0 = input.LA(1);
-
- if((LA22_0 == '\\'))
- {
- int LA22_1 = input.LA(2);
-
- if(((LA22_1 >= '0' && LA22_1 <= '3')))
- {
- int LA22_2 = input.LA(3);
-
- if(((LA22_2 >= '0' && LA22_2 <= '7')))
- {
- int LA22_4 = input.LA(4);
-
- if(((LA22_4 >= '0' && LA22_4 <= '7')))
- {
- alt22 = 1;
- }
- else
- {
- alt22 = 2;
- }
- }
- else
- {
- alt22 = 3;
- }
- }
- else if(((LA22_1 >= '4' && LA22_1 <= '7')))