Grammar RELexer
ANTLR-generated HTML file from ./expandedRE.g

Terence Parr, MageLang Institute
ANTLR Version 2.7.4; 1989-1999


Definition of lexer RELexer, which is a subclass of CharScanner.

/** Lexer nextToken rule:
 *  The lexer nextToken rule is synthesized from all of the user-defined
 *  lexer rules.  It logically consists of one big alternative block with
 *  each user-defined rule being an alternative.
 */
mCOLON 
|	mWHITESPACE 
|	mCOMMENT 
|	mLBRACE 
|	mRBRACE 
|	mLBRACKET 
|	mRBRACKET 
|	mLPAREN 
|	mRPAREN 
|	mCHOICE 
|	mCOMMA 
|	mCONCAT 
|	mDASH 
|	mDOT 
|	mEXPONENT 
|	mKLEENEPLUS 
|	mKLEENESTAR 
|	mOPTION 
|	mTILDE 
|	mPOSINT 
|	mQUOTED_STRING 
|	mIDENTIFIER 
mCOLON
	:	':' 
	;

protected mNUMBER
	:			'0'..'9' 
	;

mWHITESPACE
	:	(	' ' 
		|	'\t' 
		|	'\f' 
		|	mNEWLINE 
		)+ 
		
	;

protected mNEWLINE
	:	(	"\r\n" 
		|	'\r' 
		|	'\n' 
		) 
		
	;

mCOMMENT
	:	"--" ( (	'\r' 
			|	'\n' 
			) )* mNEWLINE 
	;

mLBRACE
	:	'{' 
	;

mRBRACE
	:	'}' 
	;

mLBRACKET
	:	'[' 
	;

mRBRACKET
	:	']' 
	;

mLPAREN
	:	'(' 
	;

mRPAREN
	:	')' 
	;

mCHOICE
	:	'|' 
	;

mCOMMA
	:	',' 
	;

mCONCAT
	:	';' 
	;

mDASH
	:	'-' 
	;

mDOT
	:	'.' 
	;

mEXPONENT
	:	'^' 
	;

mKLEENEPLUS
	:	'+' 
	;

mKLEENESTAR
	:	'*' 
	;

mOPTION
	:	'?' 
	;

mTILDE
	:	'~' 
	;

mPOSINT
	:	( mNUMBER )+ 
	;

mQUOTED_STRING
	:	'"' 
		(	mESC 
		|	(	'"' 
			|	'\\' 
			) 
		)* 
		'"' 
	;

protected mESC
	:	'\\' 
		(	'n' 
		|	'r' 
		|	't' 
		|	'b' 
		|	'f' 
		|	'"' 
		|	'\'' 
		|	'\\' 
		) 
	;

mIDENTIFIER
	:	mLETTER 
		(	mLETTER 
		|	mNUMBER 
		)* 
	;

protected mLETTER
	:	(				'a'..'z' 
		|				'A'..'Z' 
		) 
	;