Newbie question: Howto create a Lexer with no inputfile (empty constructor)?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, February 5, 2003 01:53 AM

Hello! i have the following problem: i read a text, filter out some lines and then create a lexer with PreformatterLexer lexer = new PreformatterLexer(new StringReader(invoice.toString())); but for filtering, it would be very helpful, if i could already use the lexers function "testLiteralsTable" to find out if i need that line of text, so that i have something like PreformatterLexer lexer = new PreformatterLexer(); read text and filter lines using lexer.testLiteralsTable after reading the text make something like lexer.setInput(new StringReader(invoice.toString())); can anybody help me how to achieve this? thanks a lot haral   More>>

Hello!
i have the following problem: i read a text, filter out some lines and then create a lexer with

			
PreformatterLexer lexer = new PreformatterLexer(new StringReader(invoice.toString()));

but for filtering, it would be very helpful, if i could already use the lexers function "testLiteralsTable" to find out if i need that line of text, so that i have something like
			
PreformatterLexer lexer = new PreformatterLexer();

read text and filter lines using lexer.testLiteralsTable
after reading the text make something like
			
lexer.setInput(new StringReader(invoice.toString()));

can anybody help me how to achieve this?

thanks a lot

harald    <<Less
About | Sitemap | Contact