mirror of
https://github.com/LucasVbr/interpreteur-lir.git
synced 2026-05-14 01:31:53 +00:00
chore(build): setup gradle and antlr for v2
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* App.java
|
||||
*/
|
||||
package iut_rodez.lir_lang;
|
||||
|
||||
import iut_rodez.lir_lang.core.LirLexer;
|
||||
import iut_rodez.lir_lang.core.LirParser;
|
||||
import org.antlr.v4.runtime.CharStreams;
|
||||
import org.antlr.v4.runtime.CommonTokenStream;
|
||||
import org.antlr.v4.runtime.tree.ParseTree;
|
||||
|
||||
/** Main application class for LIR language processing. */
|
||||
public class App {
|
||||
|
||||
/**
|
||||
* Main method to run the LIR parser.
|
||||
*
|
||||
* @param args Command line arguments (not used).
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
LirLexer lexer = new LirLexer(CharStreams.fromString("10"));
|
||||
LirParser parser = new LirParser(new CommonTokenStream(lexer));
|
||||
ParseTree tree = parser.prog();
|
||||
System.out.println(tree.toStringTree(parser));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user