Grammar SystemRDLLexer ANTLR-generated HTML file from SystemRDL.g Terence Parr, MageLang Institute ANTLR Version 2.7.6 (20060925); 1989-2005

    Definition of lexer SystemRDLLexer, 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.
     */
    mWS
    |	mSL_COMMENT
    |	mML_COMMENT
    |	mID
    |	mNUM
    |	mSTR
    |	mLBRACE
    |	mRBRAC
    |	mLSQ
    |	mRSQ
    |	mLPAREN
    |	mRPAREN
    |	mAT
    |	mOR
    |	mSEMI
    |	mCOLON
    |	mCOMMA
    |	mDOT
    |	mDREF
    |	mEQ
    |	mINC
    |	mMOD
    protected mLETTER
    	:	(				'a'..'z'
    		|				'A'..'Z'
    		)
    	;

    mWS
    	:	(	' '
    		|	'\t'
    		|	(	'\n'
    			|	'\r'
    			|	"\r\n"
    			)
    		)
    	;

    mSL_COMMENT
    	:	"//" ( (	'\n'
    			|	'\r'
    			) )*
    		(	'\n'
    		|	'\r'
    		|	"\r\n"
    		)
    	;

    mML_COMMENT
    	:	"/*"
    		(	'*'
    		|	'\n'
    		|	'\r'
    		|	"\r\n"
    		|	(	'*'
    			|	'\n'
    			|	'\r'
    			)
    		)*
    		"*/"
    	;

    mID
    	:	(	'\\'
    		|
    		)
    		(	mLETTER
    		|	'_'
    		)
    		(	mLETTER
    		|	'_'
    		|				'0'..'9'
    		)*
    	;

    protected mVNUM
    	:	'\''
    		(	'b'
    			(	'0'
    			|	'1'
    			|	'_'
    			)+
    		|	'd'
    			(					'0'..'9'
    			|	'_'
    			)+
    		|	'o'
    			(					'0'..'7'
    			|	'_'
    			)+
    		|	'h'
    			(					'0'..'9'
    			|					'a'..'f'
    			|					'A'..'F'
    			|	'_'
    			)+
    		)
    	;

    mNUM
    	:	( 			'0'..'9' )*
    		(	mVNUM
    		|	( 				'0'..'9' )
    		)
    	|	"0x"
    		(				'0'..'9'
    		|				'a'..'f'
    		|				'A'..'F'
    		)+
    	;

    protected mESC_DQUOTE
    	:	"\\\""
    	;

    mSTR
    	:	'"'
    		(	(	'"'
    			|	'\n'
    			|	'\\'
    			)
    		|	mESC_DQUOTE
    		|	'\n'
    		)*
    		'"'
    	;

    mLBRACE
    	:	'{'
    	;

    mRBRAC
    	:	'}'
    	;

    mLSQ
    	:	'['
    	;

    mRSQ
    	:	']'
    	;

    mLPAREN
    	:	'('
    	;

    mRPAREN
    	:	')'
    	;

    mAT
    	:	'@'
    	;

    mOR
    	:	'|'
    	;

    mSEMI
    	:	';'
    	;

    mCOLON
    	:	':'
    	;

    mCOMMA
    	:	','
    	;

    mDOT
    	:	'.'
    	;

    mDREF
    	:	"->"
    	;

    mEQ
    	:	'='
    	;

    mINC
    	:	"+="
    	;

    mMOD
    	:	"%="
    	;