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

cfml.parsing.cfml.antlr.MainLexer Maven / Gradle / Ivy

There is a newer version: 2.11.0
Show newest version
package cfml.parsing.cfml.antlr;

import org.antlr.runtime.ANTLRFileStream;
import org.antlr.runtime.CharStream;
import org.antlr.runtime.Token;

public class MainLexer {
	public static void main(String[] args) {
		try {
			CharStream input = new ANTLRFileStream("./src/cfml/parsing/cfml/antlr/input3");
			XMLLexer lexer = new XMLLexer(input);
			Token token = lexer.nextToken();
			while (token.getType() != Token.EOF) {
				System.out.println("Token: " + token.getText());
				token = lexer.nextToken();
			}
			
		} catch (Throwable t) {
			System.out.println("Exception: " + t);
			t.printStackTrace();
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy