[antlr-interest] found optional path in nextToken()

praveenray pray at eagleinvsys.com
Tue Dec 11 09:33:12 PST 2001


Does anyone know when does this warning get generated?
I am trying to parse Colon delimited file :
10:my_value1:20:my_value2:30:my_value3
etc.

Here's my .g file :


header
{
}

options
{
	language = "Cpp";
}

class SetFillParser extends Parser;
options {
	exportVocab = SetFill;
	buildAST = false;
}


set	:	(row)+
	;

row	:	VALUE COLON (tag_value)+
	;

tag_value	:	DIGIT COLON VALUE
	;

class SetFillLexer extends Lexer;
options
{
	importVocab = SetFill;
	k=2;
	charVocabulary = '\0'..'\377';
}


COLON	:	':'
	;

protected 
DIGIT	:	'0'..'9'
	;

protected 
NON_DIGIT	:	~('0'..'9'|':')
	;

VALUE
{
	bool bNonDigit = false;
}
	:	(
		DIGIT
		| NON_DIGIT {bNonDigit = true; }
		)*
	;




 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list