All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rapture.generated.CSVLexer Maven / Gradle / Ivy

The newest version!
// $ANTLR 3.5.2 /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g 2016-05-03 11:53:58

package rapture.generated;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

@SuppressWarnings("all")
public class CSVLexer extends Lexer {
	public static final int EOF=-1;
	public static final int CHAR=4;
	public static final int COMMA=5;
	public static final int DQUOTE=6;
	public static final int NEWLINE=7;

	// delegates
	// delegators
	public Lexer[] getDelegates() {
		return new Lexer[] {};
	}

	public CSVLexer() {} 
	public CSVLexer(CharStream input) {
		this(input, new RecognizerSharedState());
	}
	public CSVLexer(CharStream input, RecognizerSharedState state) {
		super(input,state);
	}
	@Override public String getGrammarFileName() { return "/Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g"; }

	// $ANTLR start "CHAR"
	public final void mCHAR() throws RecognitionException {
		try {
			int _type = CHAR;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:13:5: ( '\\u0000' .. '\\u0009' | '\\u000b' .. '\\u000c' | '\\u000e' .. '\\u0021' | '\\u0023' .. '\\u002b' | '\\u002d' .. '\\uffff' )
			// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:
			{
			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();
			}
			else {
				MismatchedSetException mse = new MismatchedSetException(null,input);
				recover(mse);
				throw mse;
			}
			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "CHAR"

	// $ANTLR start "COMMA"
	public final void mCOMMA() throws RecognitionException {
		try {
			int _type = COMMA;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:21:5: ( '\\u002c' )
			// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:21:7: '\\u002c'
			{
			match(','); 
			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "COMMA"

	// $ANTLR start "DQUOTE"
	public final void mDQUOTE() throws RecognitionException {
		try {
			int _type = DQUOTE;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:25:5: ( '\\u0022' )
			// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:25:7: '\\u0022'
			{
			match('\"'); 
			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "DQUOTE"

	// $ANTLR start "NEWLINE"
	public final void mNEWLINE() throws RecognitionException {
		try {
			int _type = NEWLINE;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:29:5: ( ( '\\u000d' )? '\\u000a' | '\\u000d' )
			int alt2=2;
			int LA2_0 = input.LA(1);
			if ( (LA2_0=='\r') ) {
				int LA2_1 = input.LA(2);
				if ( (LA2_1=='\n') ) {
					alt2=1;
				}

				else {
					alt2=2;
				}

			}
			else if ( (LA2_0=='\n') ) {
				alt2=1;
			}

			else {
				NoViableAltException nvae =
					new NoViableAltException("", 2, 0, input);
				throw nvae;
			}

			switch (alt2) {
				case 1 :
					// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:29:7: ( '\\u000d' )? '\\u000a'
					{
					// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:29:7: ( '\\u000d' )?
					int alt1=2;
					int LA1_0 = input.LA(1);
					if ( (LA1_0=='\r') ) {
						alt1=1;
					}
					switch (alt1) {
						case 1 :
							// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:29:7: '\\u000d'
							{
							match('\r'); 
							}
							break;

					}

					match('\n'); 
					}
					break;
				case 2 :
					// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:30:7: '\\u000d'
					{
					match('\r'); 
					}
					break;

			}
			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "NEWLINE"

	@Override
	public void mTokens() throws RecognitionException {
		// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:1:8: ( CHAR | COMMA | DQUOTE | NEWLINE )
		int alt3=4;
		int LA3_0 = input.LA(1);
		if ( ((LA3_0 >= '\u0000' && LA3_0 <= '\t')||(LA3_0 >= '\u000B' && LA3_0 <= '\f')||(LA3_0 >= '\u000E' && LA3_0 <= '!')||(LA3_0 >= '#' && LA3_0 <= '+')||(LA3_0 >= '-' && LA3_0 <= '\uFFFF')) ) {
			alt3=1;
		}
		else if ( (LA3_0==',') ) {
			alt3=2;
		}
		else if ( (LA3_0=='\"') ) {
			alt3=3;
		}
		else if ( (LA3_0=='\n'||LA3_0=='\r') ) {
			alt3=4;
		}

		else {
			NoViableAltException nvae =
				new NoViableAltException("", 3, 0, input);
			throw nvae;
		}

		switch (alt3) {
			case 1 :
				// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:1:10: CHAR
				{
				mCHAR(); 

				}
				break;
			case 2 :
				// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:1:15: COMMA
				{
				mCOMMA(); 

				}
				break;
			case 3 :
				// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:1:21: DQUOTE
				{
				mDQUOTE(); 

				}
				break;
			case 4 :
				// /Users/amkimian/Development/cloud/Rapture/Libs/RaptureCommon/src/main/antlr3/rapture/parser/CSVLexer.g:1:28: NEWLINE
				{
				mNEWLINE(); 

				}
				break;

		}
	}



}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy