// $ANTLR 3.5.2 /Users/kreis/git/gitea.humenius.me/dhbw-compilerbau/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/X.g 2020-05-27 16:02:17 package de.dhbw.compiler.antlrxparser; import org.antlr.runtime.*; import java.util.Stack; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import org.antlr.runtime.tree.*; @SuppressWarnings("all") public class XParser extends Parser { public static final String[] tokenNames = new String[] { "", "", "", "", "ID", "INTCONST", "WS", "'TODO'" }; public static final int EOF=-1; public static final int T__7=7; public static final int ID=4; public static final int INTCONST=5; public static final int WS=6; // delegates public Parser[] getDelegates() { return new Parser[] {}; } // delegators public XParser(TokenStream input) { this(input, new RecognizerSharedState()); } public XParser(TokenStream input, RecognizerSharedState state) { super(input, state); } protected TreeAdaptor adaptor = new CommonTreeAdaptor(); public void setTreeAdaptor(TreeAdaptor adaptor) { this.adaptor = adaptor; } public TreeAdaptor getTreeAdaptor() { return adaptor; } @Override public String[] getTokenNames() { return XParser.tokenNames; } @Override public String getGrammarFileName() { return "/Users/kreis/git/gitea.humenius.me/dhbw-compilerbau/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/X.g"; } public static class program_return extends ParserRuleReturnScope { CommonTree tree; @Override public CommonTree getTree() { return tree; } }; // $ANTLR start "program" // /Users/kreis/git/gitea.humenius.me/dhbw-compilerbau/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/X.g:42:1: program : 'TODO' ; public final XParser.program_return program() throws RecognitionException { XParser.program_return retval = new XParser.program_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token string_literal1=null; CommonTree string_literal1_tree=null; try { // /Users/kreis/git/gitea.humenius.me/dhbw-compilerbau/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/X.g:42:8: ( 'TODO' ) // /Users/kreis/git/gitea.humenius.me/dhbw-compilerbau/CC-Praxis-Antlr Parser fuer X-Leer/src/de/dhbw/compiler/antlrxparser/X.g:42:13: 'TODO' { root_0 = (CommonTree)adaptor.nil(); string_literal1=(Token)match(input,7,FOLLOW_7_in_program256); if (state.failed) return retval; if ( state.backtracking==0 ) { string_literal1_tree = (CommonTree)adaptor.create(string_literal1); adaptor.addChild(root_0, string_literal1_tree); } } retval.stop = input.LT(-1); if ( state.backtracking==0 ) { retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { // do for sure before leaving } return retval; } // $ANTLR end "program" // Delegated rules public static final BitSet FOLLOW_7_in_program256 = new BitSet(new long[]{0x0000000000000002L}); }