kotlin.src.test.java.org.gradle.GrammarTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-api Show documentation
Show all versions of gradle-api Show documentation
Gradle 6.9.1 API redistribution.
package org.gradle;
import java.io.StringReader;
import org.junit.Test;
import static org.junit.Assert.*;
import org.antlr.runtime.CommonTokenStream;
import org.antlr.runtime.ANTLRStringStream;
public class GrammarTest {
@Test
public void canUseGeneratedGrammar() throws Exception {
ANTLRStringStream in = new ANTLRStringStream("1+2");
CalculatorLexer lexer = new CalculatorLexer(in);
CommonTokenStream tokens = new CommonTokenStream(lexer);
CalculatorParser parser = new CalculatorParser(tokens);
parser.add();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy