mirror of
https://github.com/irmen/prog8.git
synced 2024-06-10 20:29:33 +00:00
3419 lines
97 KiB
Java
3419 lines
97 KiB
Java
// Generated from prog8.g4 by ANTLR 4.7.1
|
|
package prog8.parser;
|
|
import org.antlr.v4.runtime.atn.*;
|
|
import org.antlr.v4.runtime.dfa.DFA;
|
|
import org.antlr.v4.runtime.*;
|
|
import org.antlr.v4.runtime.misc.*;
|
|
import org.antlr.v4.runtime.tree.*;
|
|
import java.util.List;
|
|
import java.util.Iterator;
|
|
import java.util.ArrayList;
|
|
|
|
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
|
|
public class prog8Parser extends Parser {
|
|
static { RuntimeMetaData.checkVersion("4.7.1", RuntimeMetaData.VERSION); }
|
|
|
|
protected static final DFA[] _decisionToDFA;
|
|
protected static final PredictionContextCache _sharedContextCache =
|
|
new PredictionContextCache();
|
|
public static final int
|
|
T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9,
|
|
T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17,
|
|
T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24,
|
|
T__24=25, T__25=26, T__26=27, T__27=28, T__28=29, T__29=30, T__30=31,
|
|
T__31=32, T__32=33, T__33=34, T__34=35, T__35=36, T__36=37, T__37=38,
|
|
T__38=39, T__39=40, T__40=41, T__41=42, T__42=43, T__43=44, T__44=45,
|
|
T__45=46, T__46=47, T__47=48, T__48=49, T__49=50, T__50=51, T__51=52,
|
|
T__52=53, T__53=54, T__54=55, T__55=56, T__56=57, T__57=58, T__58=59,
|
|
T__59=60, T__60=61, T__61=62, T__62=63, T__63=64, T__64=65, T__65=66,
|
|
T__66=67, T__67=68, T__68=69, T__69=70, T__70=71, T__71=72, T__72=73,
|
|
T__73=74, T__74=75, T__75=76, T__76=77, T__77=78, T__78=79, T__79=80,
|
|
T__80=81, T__81=82, T__82=83, T__83=84, T__84=85, T__85=86, T__86=87,
|
|
LINECOMMENT=88, COMMENT=89, WS=90, EOL=91, NAME=92, DEC_INTEGER=93, HEX_INTEGER=94,
|
|
BIN_INTEGER=95, FLOAT_NUMBER=96, STRING=97, INLINEASMBLOCK=98;
|
|
public static final int
|
|
RULE_module = 0, RULE_modulestatement = 1, RULE_block = 2, RULE_statement = 3,
|
|
RULE_labeldef = 4, RULE_unconditionaljump = 5, RULE_directive = 6, RULE_directivearg = 7,
|
|
RULE_vardecl = 8, RULE_varinitializer = 9, RULE_constdecl = 10, RULE_memoryvardecl = 11,
|
|
RULE_datatype = 12, RULE_arrayspec = 13, RULE_assignment = 14, RULE_augassignment = 15,
|
|
RULE_assign_target = 16, RULE_postincrdecr = 17, RULE_expression = 18,
|
|
RULE_functioncall = 19, RULE_functioncall_stmt = 20, RULE_expression_list = 21,
|
|
RULE_returnstmt = 22, RULE_identifier = 23, RULE_scoped_identifier = 24,
|
|
RULE_register = 25, RULE_statusflag = 26, RULE_integerliteral = 27, RULE_wordsuffix = 28,
|
|
RULE_booleanliteral = 29, RULE_arrayliteral = 30, RULE_stringliteral = 31,
|
|
RULE_floatliteral = 32, RULE_literalvalue = 33, RULE_inlineasm = 34, RULE_subroutine = 35,
|
|
RULE_statement_block = 36, RULE_sub_address = 37, RULE_sub_params = 38,
|
|
RULE_sub_param = 39, RULE_sub_returns = 40, RULE_sub_return = 41, RULE_if_stmt = 42,
|
|
RULE_else_part = 43, RULE_branch_stmt = 44, RULE_branchcondition = 45;
|
|
public static final String[] ruleNames = {
|
|
"module", "modulestatement", "block", "statement", "labeldef", "unconditionaljump",
|
|
"directive", "directivearg", "vardecl", "varinitializer", "constdecl",
|
|
"memoryvardecl", "datatype", "arrayspec", "assignment", "augassignment",
|
|
"assign_target", "postincrdecr", "expression", "functioncall", "functioncall_stmt",
|
|
"expression_list", "returnstmt", "identifier", "scoped_identifier", "register",
|
|
"statusflag", "integerliteral", "wordsuffix", "booleanliteral", "arrayliteral",
|
|
"stringliteral", "floatliteral", "literalvalue", "inlineasm", "subroutine",
|
|
"statement_block", "sub_address", "sub_params", "sub_param", "sub_returns",
|
|
"sub_return", "if_stmt", "else_part", "branch_stmt", "branchcondition"
|
|
};
|
|
|
|
private static final String[] _LITERAL_NAMES = {
|
|
null, "'~'", "':'", "'goto'", "'%output'", "'%launcher'", "'%zeropage'",
|
|
"'%address'", "'%import'", "'%breakpoint'", "'%asminclude'", "'%asmbinary'",
|
|
"'%option'", "','", "'='", "'const'", "'memory'", "'byte'", "'word'",
|
|
"'float'", "'str'", "'str_p'", "'str_s'", "'str_ps'", "'['", "']'", "'+='",
|
|
"'-='", "'/='", "'*='", "'**='", "'&='", "'|='", "'^='", "'++'", "'--'",
|
|
"'('", "')'", "'+'", "'-'", "'**'", "'*'", "'/'", "'<'", "'>'", "'<='",
|
|
"'>='", "'=='", "'!='", "'&'", "'^'", "'|'", "'to'", "'and'", "'or'",
|
|
"'xor'", "'not'", "'return'", "'.'", "'A'", "'X'", "'Y'", "'AX'", "'AY'",
|
|
"'XY'", "'Pc'", "'Pz'", "'Pn'", "'Pv'", "'.w'", "'true'", "'false'", "'%asm'",
|
|
"'sub'", "'->'", "'{'", "'}'", "'?'", "'if'", "'else'", "'if_cs'", "'if_cc'",
|
|
"'if_eq'", "'if_ne'", "'if_pl'", "'if_mi'", "'if_vs'", "'if_vc'"
|
|
};
|
|
private static final String[] _SYMBOLIC_NAMES = {
|
|
null, null, null, null, null, null, null, null, null, null, null, null,
|
|
null, null, null, null, null, null, null, null, null, null, null, null,
|
|
null, null, null, null, null, null, null, null, null, null, null, null,
|
|
null, null, null, null, null, null, null, null, null, null, null, null,
|
|
null, null, null, null, null, null, null, null, null, null, null, null,
|
|
null, null, null, null, null, null, null, null, null, null, null, null,
|
|
null, null, null, null, null, null, null, null, null, null, null, null,
|
|
null, null, null, null, "LINECOMMENT", "COMMENT", "WS", "EOL", "NAME",
|
|
"DEC_INTEGER", "HEX_INTEGER", "BIN_INTEGER", "FLOAT_NUMBER", "STRING",
|
|
"INLINEASMBLOCK"
|
|
};
|
|
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
|
|
|
|
/**
|
|
* @deprecated Use {@link #VOCABULARY} instead.
|
|
*/
|
|
@Deprecated
|
|
public static final String[] tokenNames;
|
|
static {
|
|
tokenNames = new String[_SYMBOLIC_NAMES.length];
|
|
for (int i = 0; i < tokenNames.length; i++) {
|
|
tokenNames[i] = VOCABULARY.getLiteralName(i);
|
|
if (tokenNames[i] == null) {
|
|
tokenNames[i] = VOCABULARY.getSymbolicName(i);
|
|
}
|
|
|
|
if (tokenNames[i] == null) {
|
|
tokenNames[i] = "<INVALID>";
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override
|
|
@Deprecated
|
|
public String[] getTokenNames() {
|
|
return tokenNames;
|
|
}
|
|
|
|
@Override
|
|
|
|
public Vocabulary getVocabulary() {
|
|
return VOCABULARY;
|
|
}
|
|
|
|
@Override
|
|
public String getGrammarFileName() { return "prog8.g4"; }
|
|
|
|
@Override
|
|
public String[] getRuleNames() { return ruleNames; }
|
|
|
|
@Override
|
|
public String getSerializedATN() { return _serializedATN; }
|
|
|
|
@Override
|
|
public ATN getATN() { return _ATN; }
|
|
|
|
public prog8Parser(TokenStream input) {
|
|
super(input);
|
|
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
|
|
}
|
|
public static class ModuleContext extends ParserRuleContext {
|
|
public TerminalNode EOF() { return getToken(prog8Parser.EOF, 0); }
|
|
public List<ModulestatementContext> modulestatement() {
|
|
return getRuleContexts(ModulestatementContext.class);
|
|
}
|
|
public ModulestatementContext modulestatement(int i) {
|
|
return getRuleContext(ModulestatementContext.class,i);
|
|
}
|
|
public List<TerminalNode> EOL() { return getTokens(prog8Parser.EOL); }
|
|
public TerminalNode EOL(int i) {
|
|
return getToken(prog8Parser.EOL, i);
|
|
}
|
|
public ModuleContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_module; }
|
|
}
|
|
|
|
public final ModuleContext module() throws RecognitionException {
|
|
ModuleContext _localctx = new ModuleContext(_ctx, getState());
|
|
enterRule(_localctx, 0, RULE_module);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(96);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__3) | (1L << T__4) | (1L << T__5) | (1L << T__6) | (1L << T__7) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11))) != 0) || _la==EOL) {
|
|
{
|
|
setState(94);
|
|
_errHandler.sync(this);
|
|
switch (_input.LA(1)) {
|
|
case T__0:
|
|
case T__3:
|
|
case T__4:
|
|
case T__5:
|
|
case T__6:
|
|
case T__7:
|
|
case T__8:
|
|
case T__9:
|
|
case T__10:
|
|
case T__11:
|
|
{
|
|
setState(92);
|
|
modulestatement();
|
|
}
|
|
break;
|
|
case EOL:
|
|
{
|
|
setState(93);
|
|
match(EOL);
|
|
}
|
|
break;
|
|
default:
|
|
throw new NoViableAltException(this);
|
|
}
|
|
}
|
|
setState(98);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
}
|
|
setState(99);
|
|
match(EOF);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class ModulestatementContext extends ParserRuleContext {
|
|
public DirectiveContext directive() {
|
|
return getRuleContext(DirectiveContext.class,0);
|
|
}
|
|
public BlockContext block() {
|
|
return getRuleContext(BlockContext.class,0);
|
|
}
|
|
public ModulestatementContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_modulestatement; }
|
|
}
|
|
|
|
public final ModulestatementContext modulestatement() throws RecognitionException {
|
|
ModulestatementContext _localctx = new ModulestatementContext(_ctx, getState());
|
|
enterRule(_localctx, 2, RULE_modulestatement);
|
|
try {
|
|
setState(103);
|
|
_errHandler.sync(this);
|
|
switch (_input.LA(1)) {
|
|
case T__3:
|
|
case T__4:
|
|
case T__5:
|
|
case T__6:
|
|
case T__7:
|
|
case T__8:
|
|
case T__9:
|
|
case T__10:
|
|
case T__11:
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(101);
|
|
directive();
|
|
}
|
|
break;
|
|
case T__0:
|
|
enterOuterAlt(_localctx, 2);
|
|
{
|
|
setState(102);
|
|
block();
|
|
}
|
|
break;
|
|
default:
|
|
throw new NoViableAltException(this);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class BlockContext extends ParserRuleContext {
|
|
public IdentifierContext identifier() {
|
|
return getRuleContext(IdentifierContext.class,0);
|
|
}
|
|
public Statement_blockContext statement_block() {
|
|
return getRuleContext(Statement_blockContext.class,0);
|
|
}
|
|
public TerminalNode EOL() { return getToken(prog8Parser.EOL, 0); }
|
|
public IntegerliteralContext integerliteral() {
|
|
return getRuleContext(IntegerliteralContext.class,0);
|
|
}
|
|
public BlockContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_block; }
|
|
}
|
|
|
|
public final BlockContext block() throws RecognitionException {
|
|
BlockContext _localctx = new BlockContext(_ctx, getState());
|
|
enterRule(_localctx, 4, RULE_block);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(105);
|
|
match(T__0);
|
|
setState(106);
|
|
identifier();
|
|
setState(108);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
if (((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & ((1L << (DEC_INTEGER - 93)) | (1L << (HEX_INTEGER - 93)) | (1L << (BIN_INTEGER - 93)))) != 0)) {
|
|
{
|
|
setState(107);
|
|
integerliteral();
|
|
}
|
|
}
|
|
|
|
setState(110);
|
|
statement_block();
|
|
setState(111);
|
|
match(EOL);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class StatementContext extends ParserRuleContext {
|
|
public DirectiveContext directive() {
|
|
return getRuleContext(DirectiveContext.class,0);
|
|
}
|
|
public VarinitializerContext varinitializer() {
|
|
return getRuleContext(VarinitializerContext.class,0);
|
|
}
|
|
public VardeclContext vardecl() {
|
|
return getRuleContext(VardeclContext.class,0);
|
|
}
|
|
public ConstdeclContext constdecl() {
|
|
return getRuleContext(ConstdeclContext.class,0);
|
|
}
|
|
public MemoryvardeclContext memoryvardecl() {
|
|
return getRuleContext(MemoryvardeclContext.class,0);
|
|
}
|
|
public AssignmentContext assignment() {
|
|
return getRuleContext(AssignmentContext.class,0);
|
|
}
|
|
public AugassignmentContext augassignment() {
|
|
return getRuleContext(AugassignmentContext.class,0);
|
|
}
|
|
public UnconditionaljumpContext unconditionaljump() {
|
|
return getRuleContext(UnconditionaljumpContext.class,0);
|
|
}
|
|
public PostincrdecrContext postincrdecr() {
|
|
return getRuleContext(PostincrdecrContext.class,0);
|
|
}
|
|
public Functioncall_stmtContext functioncall_stmt() {
|
|
return getRuleContext(Functioncall_stmtContext.class,0);
|
|
}
|
|
public If_stmtContext if_stmt() {
|
|
return getRuleContext(If_stmtContext.class,0);
|
|
}
|
|
public Branch_stmtContext branch_stmt() {
|
|
return getRuleContext(Branch_stmtContext.class,0);
|
|
}
|
|
public SubroutineContext subroutine() {
|
|
return getRuleContext(SubroutineContext.class,0);
|
|
}
|
|
public InlineasmContext inlineasm() {
|
|
return getRuleContext(InlineasmContext.class,0);
|
|
}
|
|
public LabeldefContext labeldef() {
|
|
return getRuleContext(LabeldefContext.class,0);
|
|
}
|
|
public ReturnstmtContext returnstmt() {
|
|
return getRuleContext(ReturnstmtContext.class,0);
|
|
}
|
|
public StatementContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_statement; }
|
|
}
|
|
|
|
public final StatementContext statement() throws RecognitionException {
|
|
StatementContext _localctx = new StatementContext(_ctx, getState());
|
|
enterRule(_localctx, 6, RULE_statement);
|
|
try {
|
|
setState(129);
|
|
_errHandler.sync(this);
|
|
switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) {
|
|
case 1:
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(113);
|
|
directive();
|
|
}
|
|
break;
|
|
case 2:
|
|
enterOuterAlt(_localctx, 2);
|
|
{
|
|
setState(114);
|
|
varinitializer();
|
|
}
|
|
break;
|
|
case 3:
|
|
enterOuterAlt(_localctx, 3);
|
|
{
|
|
setState(115);
|
|
vardecl();
|
|
}
|
|
break;
|
|
case 4:
|
|
enterOuterAlt(_localctx, 4);
|
|
{
|
|
setState(116);
|
|
constdecl();
|
|
}
|
|
break;
|
|
case 5:
|
|
enterOuterAlt(_localctx, 5);
|
|
{
|
|
setState(117);
|
|
memoryvardecl();
|
|
}
|
|
break;
|
|
case 6:
|
|
enterOuterAlt(_localctx, 6);
|
|
{
|
|
setState(118);
|
|
assignment();
|
|
}
|
|
break;
|
|
case 7:
|
|
enterOuterAlt(_localctx, 7);
|
|
{
|
|
setState(119);
|
|
augassignment();
|
|
}
|
|
break;
|
|
case 8:
|
|
enterOuterAlt(_localctx, 8);
|
|
{
|
|
setState(120);
|
|
unconditionaljump();
|
|
}
|
|
break;
|
|
case 9:
|
|
enterOuterAlt(_localctx, 9);
|
|
{
|
|
setState(121);
|
|
postincrdecr();
|
|
}
|
|
break;
|
|
case 10:
|
|
enterOuterAlt(_localctx, 10);
|
|
{
|
|
setState(122);
|
|
functioncall_stmt();
|
|
}
|
|
break;
|
|
case 11:
|
|
enterOuterAlt(_localctx, 11);
|
|
{
|
|
setState(123);
|
|
if_stmt();
|
|
}
|
|
break;
|
|
case 12:
|
|
enterOuterAlt(_localctx, 12);
|
|
{
|
|
setState(124);
|
|
branch_stmt();
|
|
}
|
|
break;
|
|
case 13:
|
|
enterOuterAlt(_localctx, 13);
|
|
{
|
|
setState(125);
|
|
subroutine();
|
|
}
|
|
break;
|
|
case 14:
|
|
enterOuterAlt(_localctx, 14);
|
|
{
|
|
setState(126);
|
|
inlineasm();
|
|
}
|
|
break;
|
|
case 15:
|
|
enterOuterAlt(_localctx, 15);
|
|
{
|
|
setState(127);
|
|
labeldef();
|
|
}
|
|
break;
|
|
case 16:
|
|
enterOuterAlt(_localctx, 16);
|
|
{
|
|
setState(128);
|
|
returnstmt();
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class LabeldefContext extends ParserRuleContext {
|
|
public IdentifierContext identifier() {
|
|
return getRuleContext(IdentifierContext.class,0);
|
|
}
|
|
public LabeldefContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_labeldef; }
|
|
}
|
|
|
|
public final LabeldefContext labeldef() throws RecognitionException {
|
|
LabeldefContext _localctx = new LabeldefContext(_ctx, getState());
|
|
enterRule(_localctx, 8, RULE_labeldef);
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(131);
|
|
identifier();
|
|
setState(132);
|
|
match(T__1);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class UnconditionaljumpContext extends ParserRuleContext {
|
|
public IntegerliteralContext integerliteral() {
|
|
return getRuleContext(IntegerliteralContext.class,0);
|
|
}
|
|
public IdentifierContext identifier() {
|
|
return getRuleContext(IdentifierContext.class,0);
|
|
}
|
|
public Scoped_identifierContext scoped_identifier() {
|
|
return getRuleContext(Scoped_identifierContext.class,0);
|
|
}
|
|
public UnconditionaljumpContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_unconditionaljump; }
|
|
}
|
|
|
|
public final UnconditionaljumpContext unconditionaljump() throws RecognitionException {
|
|
UnconditionaljumpContext _localctx = new UnconditionaljumpContext(_ctx, getState());
|
|
enterRule(_localctx, 10, RULE_unconditionaljump);
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(134);
|
|
match(T__2);
|
|
setState(138);
|
|
_errHandler.sync(this);
|
|
switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) {
|
|
case 1:
|
|
{
|
|
setState(135);
|
|
integerliteral();
|
|
}
|
|
break;
|
|
case 2:
|
|
{
|
|
setState(136);
|
|
identifier();
|
|
}
|
|
break;
|
|
case 3:
|
|
{
|
|
setState(137);
|
|
scoped_identifier();
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class DirectiveContext extends ParserRuleContext {
|
|
public Token directivename;
|
|
public List<DirectiveargContext> directivearg() {
|
|
return getRuleContexts(DirectiveargContext.class);
|
|
}
|
|
public DirectiveargContext directivearg(int i) {
|
|
return getRuleContext(DirectiveargContext.class,i);
|
|
}
|
|
public DirectiveContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_directive; }
|
|
}
|
|
|
|
public final DirectiveContext directive() throws RecognitionException {
|
|
DirectiveContext _localctx = new DirectiveContext(_ctx, getState());
|
|
enterRule(_localctx, 12, RULE_directive);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(140);
|
|
((DirectiveContext)_localctx).directivename = _input.LT(1);
|
|
_la = _input.LA(1);
|
|
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__4) | (1L << T__5) | (1L << T__6) | (1L << T__7) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11))) != 0)) ) {
|
|
((DirectiveContext)_localctx).directivename = (Token)_errHandler.recoverInline(this);
|
|
}
|
|
else {
|
|
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
_errHandler.reportMatch(this);
|
|
consume();
|
|
}
|
|
setState(152);
|
|
_errHandler.sync(this);
|
|
switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) {
|
|
case 1:
|
|
{
|
|
setState(142);
|
|
_errHandler.sync(this);
|
|
switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
|
|
case 1:
|
|
{
|
|
setState(141);
|
|
directivearg();
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
case 2:
|
|
{
|
|
setState(144);
|
|
directivearg();
|
|
setState(149);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
while (_la==T__12) {
|
|
{
|
|
{
|
|
setState(145);
|
|
match(T__12);
|
|
setState(146);
|
|
directivearg();
|
|
}
|
|
}
|
|
setState(151);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class DirectiveargContext extends ParserRuleContext {
|
|
public StringliteralContext stringliteral() {
|
|
return getRuleContext(StringliteralContext.class,0);
|
|
}
|
|
public IdentifierContext identifier() {
|
|
return getRuleContext(IdentifierContext.class,0);
|
|
}
|
|
public IntegerliteralContext integerliteral() {
|
|
return getRuleContext(IntegerliteralContext.class,0);
|
|
}
|
|
public DirectiveargContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_directivearg; }
|
|
}
|
|
|
|
public final DirectiveargContext directivearg() throws RecognitionException {
|
|
DirectiveargContext _localctx = new DirectiveargContext(_ctx, getState());
|
|
enterRule(_localctx, 14, RULE_directivearg);
|
|
try {
|
|
setState(157);
|
|
_errHandler.sync(this);
|
|
switch (_input.LA(1)) {
|
|
case STRING:
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(154);
|
|
stringliteral();
|
|
}
|
|
break;
|
|
case NAME:
|
|
enterOuterAlt(_localctx, 2);
|
|
{
|
|
setState(155);
|
|
identifier();
|
|
}
|
|
break;
|
|
case DEC_INTEGER:
|
|
case HEX_INTEGER:
|
|
case BIN_INTEGER:
|
|
enterOuterAlt(_localctx, 3);
|
|
{
|
|
setState(156);
|
|
integerliteral();
|
|
}
|
|
break;
|
|
default:
|
|
throw new NoViableAltException(this);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class VardeclContext extends ParserRuleContext {
|
|
public DatatypeContext datatype() {
|
|
return getRuleContext(DatatypeContext.class,0);
|
|
}
|
|
public IdentifierContext identifier() {
|
|
return getRuleContext(IdentifierContext.class,0);
|
|
}
|
|
public ArrayspecContext arrayspec() {
|
|
return getRuleContext(ArrayspecContext.class,0);
|
|
}
|
|
public VardeclContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_vardecl; }
|
|
}
|
|
|
|
public final VardeclContext vardecl() throws RecognitionException {
|
|
VardeclContext _localctx = new VardeclContext(_ctx, getState());
|
|
enterRule(_localctx, 16, RULE_vardecl);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(159);
|
|
datatype();
|
|
setState(161);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
if (_la==T__23) {
|
|
{
|
|
setState(160);
|
|
arrayspec();
|
|
}
|
|
}
|
|
|
|
setState(163);
|
|
identifier();
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class VarinitializerContext extends ParserRuleContext {
|
|
public DatatypeContext datatype() {
|
|
return getRuleContext(DatatypeContext.class,0);
|
|
}
|
|
public IdentifierContext identifier() {
|
|
return getRuleContext(IdentifierContext.class,0);
|
|
}
|
|
public ExpressionContext expression() {
|
|
return getRuleContext(ExpressionContext.class,0);
|
|
}
|
|
public ArrayspecContext arrayspec() {
|
|
return getRuleContext(ArrayspecContext.class,0);
|
|
}
|
|
public VarinitializerContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_varinitializer; }
|
|
}
|
|
|
|
public final VarinitializerContext varinitializer() throws RecognitionException {
|
|
VarinitializerContext _localctx = new VarinitializerContext(_ctx, getState());
|
|
enterRule(_localctx, 18, RULE_varinitializer);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(165);
|
|
datatype();
|
|
setState(167);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
if (_la==T__23) {
|
|
{
|
|
setState(166);
|
|
arrayspec();
|
|
}
|
|
}
|
|
|
|
setState(169);
|
|
identifier();
|
|
setState(170);
|
|
match(T__13);
|
|
setState(171);
|
|
expression(0);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class ConstdeclContext extends ParserRuleContext {
|
|
public VarinitializerContext varinitializer() {
|
|
return getRuleContext(VarinitializerContext.class,0);
|
|
}
|
|
public ConstdeclContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_constdecl; }
|
|
}
|
|
|
|
public final ConstdeclContext constdecl() throws RecognitionException {
|
|
ConstdeclContext _localctx = new ConstdeclContext(_ctx, getState());
|
|
enterRule(_localctx, 20, RULE_constdecl);
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(173);
|
|
match(T__14);
|
|
setState(174);
|
|
varinitializer();
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class MemoryvardeclContext extends ParserRuleContext {
|
|
public VarinitializerContext varinitializer() {
|
|
return getRuleContext(VarinitializerContext.class,0);
|
|
}
|
|
public MemoryvardeclContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_memoryvardecl; }
|
|
}
|
|
|
|
public final MemoryvardeclContext memoryvardecl() throws RecognitionException {
|
|
MemoryvardeclContext _localctx = new MemoryvardeclContext(_ctx, getState());
|
|
enterRule(_localctx, 22, RULE_memoryvardecl);
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(176);
|
|
match(T__15);
|
|
setState(177);
|
|
varinitializer();
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class DatatypeContext extends ParserRuleContext {
|
|
public DatatypeContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_datatype; }
|
|
}
|
|
|
|
public final DatatypeContext datatype() throws RecognitionException {
|
|
DatatypeContext _localctx = new DatatypeContext(_ctx, getState());
|
|
enterRule(_localctx, 24, RULE_datatype);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(179);
|
|
_la = _input.LA(1);
|
|
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22))) != 0)) ) {
|
|
_errHandler.recoverInline(this);
|
|
}
|
|
else {
|
|
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
_errHandler.reportMatch(this);
|
|
consume();
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class ArrayspecContext extends ParserRuleContext {
|
|
public List<ExpressionContext> expression() {
|
|
return getRuleContexts(ExpressionContext.class);
|
|
}
|
|
public ExpressionContext expression(int i) {
|
|
return getRuleContext(ExpressionContext.class,i);
|
|
}
|
|
public ArrayspecContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_arrayspec; }
|
|
}
|
|
|
|
public final ArrayspecContext arrayspec() throws RecognitionException {
|
|
ArrayspecContext _localctx = new ArrayspecContext(_ctx, getState());
|
|
enterRule(_localctx, 26, RULE_arrayspec);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(181);
|
|
match(T__23);
|
|
setState(182);
|
|
expression(0);
|
|
setState(185);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
if (_la==T__12) {
|
|
{
|
|
setState(183);
|
|
match(T__12);
|
|
setState(184);
|
|
expression(0);
|
|
}
|
|
}
|
|
|
|
setState(187);
|
|
match(T__24);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class AssignmentContext extends ParserRuleContext {
|
|
public Assign_targetContext assign_target() {
|
|
return getRuleContext(Assign_targetContext.class,0);
|
|
}
|
|
public ExpressionContext expression() {
|
|
return getRuleContext(ExpressionContext.class,0);
|
|
}
|
|
public AssignmentContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_assignment; }
|
|
}
|
|
|
|
public final AssignmentContext assignment() throws RecognitionException {
|
|
AssignmentContext _localctx = new AssignmentContext(_ctx, getState());
|
|
enterRule(_localctx, 28, RULE_assignment);
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(189);
|
|
assign_target();
|
|
setState(190);
|
|
match(T__13);
|
|
setState(191);
|
|
expression(0);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class AugassignmentContext extends ParserRuleContext {
|
|
public Token operator;
|
|
public Assign_targetContext assign_target() {
|
|
return getRuleContext(Assign_targetContext.class,0);
|
|
}
|
|
public ExpressionContext expression() {
|
|
return getRuleContext(ExpressionContext.class,0);
|
|
}
|
|
public AugassignmentContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_augassignment; }
|
|
}
|
|
|
|
public final AugassignmentContext augassignment() throws RecognitionException {
|
|
AugassignmentContext _localctx = new AugassignmentContext(_ctx, getState());
|
|
enterRule(_localctx, 30, RULE_augassignment);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(193);
|
|
assign_target();
|
|
setState(194);
|
|
((AugassignmentContext)_localctx).operator = _input.LT(1);
|
|
_la = _input.LA(1);
|
|
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << T__30) | (1L << T__31) | (1L << T__32))) != 0)) ) {
|
|
((AugassignmentContext)_localctx).operator = (Token)_errHandler.recoverInline(this);
|
|
}
|
|
else {
|
|
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
_errHandler.reportMatch(this);
|
|
consume();
|
|
}
|
|
setState(195);
|
|
expression(0);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class Assign_targetContext extends ParserRuleContext {
|
|
public RegisterContext register() {
|
|
return getRuleContext(RegisterContext.class,0);
|
|
}
|
|
public IdentifierContext identifier() {
|
|
return getRuleContext(IdentifierContext.class,0);
|
|
}
|
|
public Scoped_identifierContext scoped_identifier() {
|
|
return getRuleContext(Scoped_identifierContext.class,0);
|
|
}
|
|
public Assign_targetContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_assign_target; }
|
|
}
|
|
|
|
public final Assign_targetContext assign_target() throws RecognitionException {
|
|
Assign_targetContext _localctx = new Assign_targetContext(_ctx, getState());
|
|
enterRule(_localctx, 32, RULE_assign_target);
|
|
try {
|
|
setState(200);
|
|
_errHandler.sync(this);
|
|
switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) {
|
|
case 1:
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(197);
|
|
register();
|
|
}
|
|
break;
|
|
case 2:
|
|
enterOuterAlt(_localctx, 2);
|
|
{
|
|
setState(198);
|
|
identifier();
|
|
}
|
|
break;
|
|
case 3:
|
|
enterOuterAlt(_localctx, 3);
|
|
{
|
|
setState(199);
|
|
scoped_identifier();
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class PostincrdecrContext extends ParserRuleContext {
|
|
public Token operator;
|
|
public Assign_targetContext assign_target() {
|
|
return getRuleContext(Assign_targetContext.class,0);
|
|
}
|
|
public PostincrdecrContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_postincrdecr; }
|
|
}
|
|
|
|
public final PostincrdecrContext postincrdecr() throws RecognitionException {
|
|
PostincrdecrContext _localctx = new PostincrdecrContext(_ctx, getState());
|
|
enterRule(_localctx, 34, RULE_postincrdecr);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(202);
|
|
assign_target();
|
|
setState(203);
|
|
((PostincrdecrContext)_localctx).operator = _input.LT(1);
|
|
_la = _input.LA(1);
|
|
if ( !(_la==T__33 || _la==T__34) ) {
|
|
((PostincrdecrContext)_localctx).operator = (Token)_errHandler.recoverInline(this);
|
|
}
|
|
else {
|
|
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
_errHandler.reportMatch(this);
|
|
consume();
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class ExpressionContext extends ParserRuleContext {
|
|
public ExpressionContext left;
|
|
public ExpressionContext rangefrom;
|
|
public Token prefix;
|
|
public Token bop;
|
|
public ExpressionContext right;
|
|
public ExpressionContext rangeto;
|
|
public List<ExpressionContext> expression() {
|
|
return getRuleContexts(ExpressionContext.class);
|
|
}
|
|
public ExpressionContext expression(int i) {
|
|
return getRuleContext(ExpressionContext.class,i);
|
|
}
|
|
public FunctioncallContext functioncall() {
|
|
return getRuleContext(FunctioncallContext.class,0);
|
|
}
|
|
public LiteralvalueContext literalvalue() {
|
|
return getRuleContext(LiteralvalueContext.class,0);
|
|
}
|
|
public RegisterContext register() {
|
|
return getRuleContext(RegisterContext.class,0);
|
|
}
|
|
public IdentifierContext identifier() {
|
|
return getRuleContext(IdentifierContext.class,0);
|
|
}
|
|
public Scoped_identifierContext scoped_identifier() {
|
|
return getRuleContext(Scoped_identifierContext.class,0);
|
|
}
|
|
public ArrayspecContext arrayspec() {
|
|
return getRuleContext(ArrayspecContext.class,0);
|
|
}
|
|
public ExpressionContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_expression; }
|
|
}
|
|
|
|
public final ExpressionContext expression() throws RecognitionException {
|
|
return expression(0);
|
|
}
|
|
|
|
private ExpressionContext expression(int _p) throws RecognitionException {
|
|
ParserRuleContext _parentctx = _ctx;
|
|
int _parentState = getState();
|
|
ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState);
|
|
ExpressionContext _prevctx = _localctx;
|
|
int _startState = 36;
|
|
enterRecursionRule(_localctx, 36, RULE_expression, _p);
|
|
int _la;
|
|
try {
|
|
int _alt;
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(219);
|
|
_errHandler.sync(this);
|
|
switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) {
|
|
case 1:
|
|
{
|
|
setState(206);
|
|
match(T__35);
|
|
setState(207);
|
|
expression(0);
|
|
setState(208);
|
|
match(T__36);
|
|
}
|
|
break;
|
|
case 2:
|
|
{
|
|
setState(210);
|
|
functioncall();
|
|
}
|
|
break;
|
|
case 3:
|
|
{
|
|
setState(211);
|
|
((ExpressionContext)_localctx).prefix = _input.LT(1);
|
|
_la = _input.LA(1);
|
|
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__37) | (1L << T__38))) != 0)) ) {
|
|
((ExpressionContext)_localctx).prefix = (Token)_errHandler.recoverInline(this);
|
|
}
|
|
else {
|
|
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
_errHandler.reportMatch(this);
|
|
consume();
|
|
}
|
|
setState(212);
|
|
expression(18);
|
|
}
|
|
break;
|
|
case 4:
|
|
{
|
|
setState(213);
|
|
((ExpressionContext)_localctx).prefix = match(T__55);
|
|
setState(214);
|
|
expression(5);
|
|
}
|
|
break;
|
|
case 5:
|
|
{
|
|
setState(215);
|
|
literalvalue();
|
|
}
|
|
break;
|
|
case 6:
|
|
{
|
|
setState(216);
|
|
register();
|
|
}
|
|
break;
|
|
case 7:
|
|
{
|
|
setState(217);
|
|
identifier();
|
|
}
|
|
break;
|
|
case 8:
|
|
{
|
|
setState(218);
|
|
scoped_identifier();
|
|
}
|
|
break;
|
|
}
|
|
_ctx.stop = _input.LT(-1);
|
|
setState(261);
|
|
_errHandler.sync(this);
|
|
_alt = getInterpreter().adaptivePredict(_input,16,_ctx);
|
|
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
|
|
if ( _alt==1 ) {
|
|
if ( _parseListeners!=null ) triggerExitRuleEvent();
|
|
_prevctx = _localctx;
|
|
{
|
|
setState(259);
|
|
_errHandler.sync(this);
|
|
switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) {
|
|
case 1:
|
|
{
|
|
_localctx = new ExpressionContext(_parentctx, _parentState);
|
|
_localctx.left = _prevctx;
|
|
_localctx.left = _prevctx;
|
|
pushNewRecursionContext(_localctx, _startState, RULE_expression);
|
|
setState(221);
|
|
if (!(precpred(_ctx, 17))) throw new FailedPredicateException(this, "precpred(_ctx, 17)");
|
|
setState(222);
|
|
((ExpressionContext)_localctx).bop = match(T__39);
|
|
setState(223);
|
|
((ExpressionContext)_localctx).right = expression(18);
|
|
}
|
|
break;
|
|
case 2:
|
|
{
|
|
_localctx = new ExpressionContext(_parentctx, _parentState);
|
|
_localctx.left = _prevctx;
|
|
_localctx.left = _prevctx;
|
|
pushNewRecursionContext(_localctx, _startState, RULE_expression);
|
|
setState(224);
|
|
if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)");
|
|
setState(225);
|
|
((ExpressionContext)_localctx).bop = _input.LT(1);
|
|
_la = _input.LA(1);
|
|
if ( !(_la==T__40 || _la==T__41) ) {
|
|
((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this);
|
|
}
|
|
else {
|
|
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
_errHandler.reportMatch(this);
|
|
consume();
|
|
}
|
|
setState(226);
|
|
((ExpressionContext)_localctx).right = expression(17);
|
|
}
|
|
break;
|
|
case 3:
|
|
{
|
|
_localctx = new ExpressionContext(_parentctx, _parentState);
|
|
_localctx.left = _prevctx;
|
|
_localctx.left = _prevctx;
|
|
pushNewRecursionContext(_localctx, _startState, RULE_expression);
|
|
setState(227);
|
|
if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)");
|
|
setState(228);
|
|
((ExpressionContext)_localctx).bop = _input.LT(1);
|
|
_la = _input.LA(1);
|
|
if ( !(_la==T__37 || _la==T__38) ) {
|
|
((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this);
|
|
}
|
|
else {
|
|
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
_errHandler.reportMatch(this);
|
|
consume();
|
|
}
|
|
setState(229);
|
|
((ExpressionContext)_localctx).right = expression(16);
|
|
}
|
|
break;
|
|
case 4:
|
|
{
|
|
_localctx = new ExpressionContext(_parentctx, _parentState);
|
|
_localctx.left = _prevctx;
|
|
_localctx.left = _prevctx;
|
|
pushNewRecursionContext(_localctx, _startState, RULE_expression);
|
|
setState(230);
|
|
if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)");
|
|
setState(231);
|
|
((ExpressionContext)_localctx).bop = _input.LT(1);
|
|
_la = _input.LA(1);
|
|
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__42) | (1L << T__43) | (1L << T__44) | (1L << T__45))) != 0)) ) {
|
|
((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this);
|
|
}
|
|
else {
|
|
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
_errHandler.reportMatch(this);
|
|
consume();
|
|
}
|
|
setState(232);
|
|
((ExpressionContext)_localctx).right = expression(15);
|
|
}
|
|
break;
|
|
case 5:
|
|
{
|
|
_localctx = new ExpressionContext(_parentctx, _parentState);
|
|
_localctx.left = _prevctx;
|
|
_localctx.left = _prevctx;
|
|
pushNewRecursionContext(_localctx, _startState, RULE_expression);
|
|
setState(233);
|
|
if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)");
|
|
setState(234);
|
|
((ExpressionContext)_localctx).bop = _input.LT(1);
|
|
_la = _input.LA(1);
|
|
if ( !(_la==T__46 || _la==T__47) ) {
|
|
((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this);
|
|
}
|
|
else {
|
|
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
_errHandler.reportMatch(this);
|
|
consume();
|
|
}
|
|
setState(235);
|
|
((ExpressionContext)_localctx).right = expression(14);
|
|
}
|
|
break;
|
|
case 6:
|
|
{
|
|
_localctx = new ExpressionContext(_parentctx, _parentState);
|
|
_localctx.left = _prevctx;
|
|
_localctx.left = _prevctx;
|
|
pushNewRecursionContext(_localctx, _startState, RULE_expression);
|
|
setState(236);
|
|
if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)");
|
|
setState(237);
|
|
((ExpressionContext)_localctx).bop = match(T__48);
|
|
setState(238);
|
|
((ExpressionContext)_localctx).right = expression(13);
|
|
}
|
|
break;
|
|
case 7:
|
|
{
|
|
_localctx = new ExpressionContext(_parentctx, _parentState);
|
|
_localctx.left = _prevctx;
|
|
_localctx.left = _prevctx;
|
|
pushNewRecursionContext(_localctx, _startState, RULE_expression);
|
|
setState(239);
|
|
if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)");
|
|
setState(240);
|
|
((ExpressionContext)_localctx).bop = match(T__49);
|
|
setState(241);
|
|
((ExpressionContext)_localctx).right = expression(12);
|
|
}
|
|
break;
|
|
case 8:
|
|
{
|
|
_localctx = new ExpressionContext(_parentctx, _parentState);
|
|
_localctx.left = _prevctx;
|
|
_localctx.left = _prevctx;
|
|
pushNewRecursionContext(_localctx, _startState, RULE_expression);
|
|
setState(242);
|
|
if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)");
|
|
setState(243);
|
|
((ExpressionContext)_localctx).bop = match(T__50);
|
|
setState(244);
|
|
((ExpressionContext)_localctx).right = expression(11);
|
|
}
|
|
break;
|
|
case 9:
|
|
{
|
|
_localctx = new ExpressionContext(_parentctx, _parentState);
|
|
_localctx.rangefrom = _prevctx;
|
|
_localctx.rangefrom = _prevctx;
|
|
pushNewRecursionContext(_localctx, _startState, RULE_expression);
|
|
setState(245);
|
|
if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)");
|
|
setState(246);
|
|
match(T__51);
|
|
setState(247);
|
|
((ExpressionContext)_localctx).rangeto = expression(10);
|
|
}
|
|
break;
|
|
case 10:
|
|
{
|
|
_localctx = new ExpressionContext(_parentctx, _parentState);
|
|
_localctx.left = _prevctx;
|
|
_localctx.left = _prevctx;
|
|
pushNewRecursionContext(_localctx, _startState, RULE_expression);
|
|
setState(248);
|
|
if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)");
|
|
setState(249);
|
|
((ExpressionContext)_localctx).bop = match(T__52);
|
|
setState(250);
|
|
((ExpressionContext)_localctx).right = expression(9);
|
|
}
|
|
break;
|
|
case 11:
|
|
{
|
|
_localctx = new ExpressionContext(_parentctx, _parentState);
|
|
_localctx.left = _prevctx;
|
|
_localctx.left = _prevctx;
|
|
pushNewRecursionContext(_localctx, _startState, RULE_expression);
|
|
setState(251);
|
|
if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)");
|
|
setState(252);
|
|
((ExpressionContext)_localctx).bop = match(T__53);
|
|
setState(253);
|
|
((ExpressionContext)_localctx).right = expression(8);
|
|
}
|
|
break;
|
|
case 12:
|
|
{
|
|
_localctx = new ExpressionContext(_parentctx, _parentState);
|
|
_localctx.left = _prevctx;
|
|
_localctx.left = _prevctx;
|
|
pushNewRecursionContext(_localctx, _startState, RULE_expression);
|
|
setState(254);
|
|
if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)");
|
|
setState(255);
|
|
((ExpressionContext)_localctx).bop = match(T__54);
|
|
setState(256);
|
|
((ExpressionContext)_localctx).right = expression(7);
|
|
}
|
|
break;
|
|
case 13:
|
|
{
|
|
_localctx = new ExpressionContext(_parentctx, _parentState);
|
|
pushNewRecursionContext(_localctx, _startState, RULE_expression);
|
|
setState(257);
|
|
if (!(precpred(_ctx, 20))) throw new FailedPredicateException(this, "precpred(_ctx, 20)");
|
|
setState(258);
|
|
arrayspec();
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
setState(263);
|
|
_errHandler.sync(this);
|
|
_alt = getInterpreter().adaptivePredict(_input,16,_ctx);
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
unrollRecursionContexts(_parentctx);
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class FunctioncallContext extends ParserRuleContext {
|
|
public IdentifierContext identifier() {
|
|
return getRuleContext(IdentifierContext.class,0);
|
|
}
|
|
public Scoped_identifierContext scoped_identifier() {
|
|
return getRuleContext(Scoped_identifierContext.class,0);
|
|
}
|
|
public Expression_listContext expression_list() {
|
|
return getRuleContext(Expression_listContext.class,0);
|
|
}
|
|
public FunctioncallContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_functioncall; }
|
|
}
|
|
|
|
public final FunctioncallContext functioncall() throws RecognitionException {
|
|
FunctioncallContext _localctx = new FunctioncallContext(_ctx, getState());
|
|
enterRule(_localctx, 38, RULE_functioncall);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(266);
|
|
_errHandler.sync(this);
|
|
switch ( getInterpreter().adaptivePredict(_input,17,_ctx) ) {
|
|
case 1:
|
|
{
|
|
setState(264);
|
|
identifier();
|
|
}
|
|
break;
|
|
case 2:
|
|
{
|
|
setState(265);
|
|
scoped_identifier();
|
|
}
|
|
break;
|
|
}
|
|
setState(268);
|
|
match(T__35);
|
|
setState(270);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__23) | (1L << T__35) | (1L << T__37) | (1L << T__38) | (1L << T__55) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__69 - 64)) | (1L << (T__70 - 64)) | (1L << (NAME - 64)) | (1L << (DEC_INTEGER - 64)) | (1L << (HEX_INTEGER - 64)) | (1L << (BIN_INTEGER - 64)) | (1L << (FLOAT_NUMBER - 64)) | (1L << (STRING - 64)))) != 0)) {
|
|
{
|
|
setState(269);
|
|
expression_list();
|
|
}
|
|
}
|
|
|
|
setState(272);
|
|
match(T__36);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class Functioncall_stmtContext extends ParserRuleContext {
|
|
public IdentifierContext identifier() {
|
|
return getRuleContext(IdentifierContext.class,0);
|
|
}
|
|
public Scoped_identifierContext scoped_identifier() {
|
|
return getRuleContext(Scoped_identifierContext.class,0);
|
|
}
|
|
public Expression_listContext expression_list() {
|
|
return getRuleContext(Expression_listContext.class,0);
|
|
}
|
|
public Functioncall_stmtContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_functioncall_stmt; }
|
|
}
|
|
|
|
public final Functioncall_stmtContext functioncall_stmt() throws RecognitionException {
|
|
Functioncall_stmtContext _localctx = new Functioncall_stmtContext(_ctx, getState());
|
|
enterRule(_localctx, 40, RULE_functioncall_stmt);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(276);
|
|
_errHandler.sync(this);
|
|
switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) {
|
|
case 1:
|
|
{
|
|
setState(274);
|
|
identifier();
|
|
}
|
|
break;
|
|
case 2:
|
|
{
|
|
setState(275);
|
|
scoped_identifier();
|
|
}
|
|
break;
|
|
}
|
|
setState(278);
|
|
match(T__35);
|
|
setState(280);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__23) | (1L << T__35) | (1L << T__37) | (1L << T__38) | (1L << T__55) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__69 - 64)) | (1L << (T__70 - 64)) | (1L << (NAME - 64)) | (1L << (DEC_INTEGER - 64)) | (1L << (HEX_INTEGER - 64)) | (1L << (BIN_INTEGER - 64)) | (1L << (FLOAT_NUMBER - 64)) | (1L << (STRING - 64)))) != 0)) {
|
|
{
|
|
setState(279);
|
|
expression_list();
|
|
}
|
|
}
|
|
|
|
setState(282);
|
|
match(T__36);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class Expression_listContext extends ParserRuleContext {
|
|
public List<ExpressionContext> expression() {
|
|
return getRuleContexts(ExpressionContext.class);
|
|
}
|
|
public ExpressionContext expression(int i) {
|
|
return getRuleContext(ExpressionContext.class,i);
|
|
}
|
|
public Expression_listContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_expression_list; }
|
|
}
|
|
|
|
public final Expression_listContext expression_list() throws RecognitionException {
|
|
Expression_listContext _localctx = new Expression_listContext(_ctx, getState());
|
|
enterRule(_localctx, 42, RULE_expression_list);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(284);
|
|
expression(0);
|
|
setState(289);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
while (_la==T__12) {
|
|
{
|
|
{
|
|
setState(285);
|
|
match(T__12);
|
|
setState(286);
|
|
expression(0);
|
|
}
|
|
}
|
|
setState(291);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class ReturnstmtContext extends ParserRuleContext {
|
|
public Expression_listContext expression_list() {
|
|
return getRuleContext(Expression_listContext.class,0);
|
|
}
|
|
public ReturnstmtContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_returnstmt; }
|
|
}
|
|
|
|
public final ReturnstmtContext returnstmt() throws RecognitionException {
|
|
ReturnstmtContext _localctx = new ReturnstmtContext(_ctx, getState());
|
|
enterRule(_localctx, 44, RULE_returnstmt);
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(292);
|
|
match(T__56);
|
|
setState(294);
|
|
_errHandler.sync(this);
|
|
switch ( getInterpreter().adaptivePredict(_input,22,_ctx) ) {
|
|
case 1:
|
|
{
|
|
setState(293);
|
|
expression_list();
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class IdentifierContext extends ParserRuleContext {
|
|
public TerminalNode NAME() { return getToken(prog8Parser.NAME, 0); }
|
|
public IdentifierContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_identifier; }
|
|
}
|
|
|
|
public final IdentifierContext identifier() throws RecognitionException {
|
|
IdentifierContext _localctx = new IdentifierContext(_ctx, getState());
|
|
enterRule(_localctx, 46, RULE_identifier);
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(296);
|
|
match(NAME);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class Scoped_identifierContext extends ParserRuleContext {
|
|
public List<TerminalNode> NAME() { return getTokens(prog8Parser.NAME); }
|
|
public TerminalNode NAME(int i) {
|
|
return getToken(prog8Parser.NAME, i);
|
|
}
|
|
public Scoped_identifierContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_scoped_identifier; }
|
|
}
|
|
|
|
public final Scoped_identifierContext scoped_identifier() throws RecognitionException {
|
|
Scoped_identifierContext _localctx = new Scoped_identifierContext(_ctx, getState());
|
|
enterRule(_localctx, 48, RULE_scoped_identifier);
|
|
try {
|
|
int _alt;
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(298);
|
|
match(NAME);
|
|
setState(301);
|
|
_errHandler.sync(this);
|
|
_alt = 1;
|
|
do {
|
|
switch (_alt) {
|
|
case 1:
|
|
{
|
|
{
|
|
setState(299);
|
|
match(T__57);
|
|
setState(300);
|
|
match(NAME);
|
|
}
|
|
}
|
|
break;
|
|
default:
|
|
throw new NoViableAltException(this);
|
|
}
|
|
setState(303);
|
|
_errHandler.sync(this);
|
|
_alt = getInterpreter().adaptivePredict(_input,23,_ctx);
|
|
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class RegisterContext extends ParserRuleContext {
|
|
public RegisterContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_register; }
|
|
}
|
|
|
|
public final RegisterContext register() throws RecognitionException {
|
|
RegisterContext _localctx = new RegisterContext(_ctx, getState());
|
|
enterRule(_localctx, 50, RULE_register);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(305);
|
|
_la = _input.LA(1);
|
|
if ( !(((((_la - 59)) & ~0x3f) == 0 && ((1L << (_la - 59)) & ((1L << (T__58 - 59)) | (1L << (T__59 - 59)) | (1L << (T__60 - 59)) | (1L << (T__61 - 59)) | (1L << (T__62 - 59)) | (1L << (T__63 - 59)))) != 0)) ) {
|
|
_errHandler.recoverInline(this);
|
|
}
|
|
else {
|
|
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
_errHandler.reportMatch(this);
|
|
consume();
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class StatusflagContext extends ParserRuleContext {
|
|
public StatusflagContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_statusflag; }
|
|
}
|
|
|
|
public final StatusflagContext statusflag() throws RecognitionException {
|
|
StatusflagContext _localctx = new StatusflagContext(_ctx, getState());
|
|
enterRule(_localctx, 52, RULE_statusflag);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(307);
|
|
_la = _input.LA(1);
|
|
if ( !(((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (T__64 - 65)) | (1L << (T__65 - 65)) | (1L << (T__66 - 65)) | (1L << (T__67 - 65)))) != 0)) ) {
|
|
_errHandler.recoverInline(this);
|
|
}
|
|
else {
|
|
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
_errHandler.reportMatch(this);
|
|
consume();
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class IntegerliteralContext extends ParserRuleContext {
|
|
public Token intpart;
|
|
public TerminalNode DEC_INTEGER() { return getToken(prog8Parser.DEC_INTEGER, 0); }
|
|
public TerminalNode HEX_INTEGER() { return getToken(prog8Parser.HEX_INTEGER, 0); }
|
|
public TerminalNode BIN_INTEGER() { return getToken(prog8Parser.BIN_INTEGER, 0); }
|
|
public WordsuffixContext wordsuffix() {
|
|
return getRuleContext(WordsuffixContext.class,0);
|
|
}
|
|
public IntegerliteralContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_integerliteral; }
|
|
}
|
|
|
|
public final IntegerliteralContext integerliteral() throws RecognitionException {
|
|
IntegerliteralContext _localctx = new IntegerliteralContext(_ctx, getState());
|
|
enterRule(_localctx, 54, RULE_integerliteral);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(309);
|
|
((IntegerliteralContext)_localctx).intpart = _input.LT(1);
|
|
_la = _input.LA(1);
|
|
if ( !(((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & ((1L << (DEC_INTEGER - 93)) | (1L << (HEX_INTEGER - 93)) | (1L << (BIN_INTEGER - 93)))) != 0)) ) {
|
|
((IntegerliteralContext)_localctx).intpart = (Token)_errHandler.recoverInline(this);
|
|
}
|
|
else {
|
|
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
_errHandler.reportMatch(this);
|
|
consume();
|
|
}
|
|
setState(311);
|
|
_errHandler.sync(this);
|
|
switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) {
|
|
case 1:
|
|
{
|
|
setState(310);
|
|
wordsuffix();
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class WordsuffixContext extends ParserRuleContext {
|
|
public WordsuffixContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_wordsuffix; }
|
|
}
|
|
|
|
public final WordsuffixContext wordsuffix() throws RecognitionException {
|
|
WordsuffixContext _localctx = new WordsuffixContext(_ctx, getState());
|
|
enterRule(_localctx, 56, RULE_wordsuffix);
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(313);
|
|
match(T__68);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class BooleanliteralContext extends ParserRuleContext {
|
|
public BooleanliteralContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_booleanliteral; }
|
|
}
|
|
|
|
public final BooleanliteralContext booleanliteral() throws RecognitionException {
|
|
BooleanliteralContext _localctx = new BooleanliteralContext(_ctx, getState());
|
|
enterRule(_localctx, 58, RULE_booleanliteral);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(315);
|
|
_la = _input.LA(1);
|
|
if ( !(_la==T__69 || _la==T__70) ) {
|
|
_errHandler.recoverInline(this);
|
|
}
|
|
else {
|
|
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
_errHandler.reportMatch(this);
|
|
consume();
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class ArrayliteralContext extends ParserRuleContext {
|
|
public List<ExpressionContext> expression() {
|
|
return getRuleContexts(ExpressionContext.class);
|
|
}
|
|
public ExpressionContext expression(int i) {
|
|
return getRuleContext(ExpressionContext.class,i);
|
|
}
|
|
public ArrayliteralContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_arrayliteral; }
|
|
}
|
|
|
|
public final ArrayliteralContext arrayliteral() throws RecognitionException {
|
|
ArrayliteralContext _localctx = new ArrayliteralContext(_ctx, getState());
|
|
enterRule(_localctx, 60, RULE_arrayliteral);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(317);
|
|
match(T__23);
|
|
setState(318);
|
|
expression(0);
|
|
setState(323);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
while (_la==T__12) {
|
|
{
|
|
{
|
|
setState(319);
|
|
match(T__12);
|
|
setState(320);
|
|
expression(0);
|
|
}
|
|
}
|
|
setState(325);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
}
|
|
setState(326);
|
|
match(T__24);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class StringliteralContext extends ParserRuleContext {
|
|
public TerminalNode STRING() { return getToken(prog8Parser.STRING, 0); }
|
|
public StringliteralContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_stringliteral; }
|
|
}
|
|
|
|
public final StringliteralContext stringliteral() throws RecognitionException {
|
|
StringliteralContext _localctx = new StringliteralContext(_ctx, getState());
|
|
enterRule(_localctx, 62, RULE_stringliteral);
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(328);
|
|
match(STRING);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class FloatliteralContext extends ParserRuleContext {
|
|
public TerminalNode FLOAT_NUMBER() { return getToken(prog8Parser.FLOAT_NUMBER, 0); }
|
|
public FloatliteralContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_floatliteral; }
|
|
}
|
|
|
|
public final FloatliteralContext floatliteral() throws RecognitionException {
|
|
FloatliteralContext _localctx = new FloatliteralContext(_ctx, getState());
|
|
enterRule(_localctx, 64, RULE_floatliteral);
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(330);
|
|
match(FLOAT_NUMBER);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class LiteralvalueContext extends ParserRuleContext {
|
|
public IntegerliteralContext integerliteral() {
|
|
return getRuleContext(IntegerliteralContext.class,0);
|
|
}
|
|
public BooleanliteralContext booleanliteral() {
|
|
return getRuleContext(BooleanliteralContext.class,0);
|
|
}
|
|
public ArrayliteralContext arrayliteral() {
|
|
return getRuleContext(ArrayliteralContext.class,0);
|
|
}
|
|
public StringliteralContext stringliteral() {
|
|
return getRuleContext(StringliteralContext.class,0);
|
|
}
|
|
public FloatliteralContext floatliteral() {
|
|
return getRuleContext(FloatliteralContext.class,0);
|
|
}
|
|
public LiteralvalueContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_literalvalue; }
|
|
}
|
|
|
|
public final LiteralvalueContext literalvalue() throws RecognitionException {
|
|
LiteralvalueContext _localctx = new LiteralvalueContext(_ctx, getState());
|
|
enterRule(_localctx, 66, RULE_literalvalue);
|
|
try {
|
|
setState(337);
|
|
_errHandler.sync(this);
|
|
switch (_input.LA(1)) {
|
|
case DEC_INTEGER:
|
|
case HEX_INTEGER:
|
|
case BIN_INTEGER:
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(332);
|
|
integerliteral();
|
|
}
|
|
break;
|
|
case T__69:
|
|
case T__70:
|
|
enterOuterAlt(_localctx, 2);
|
|
{
|
|
setState(333);
|
|
booleanliteral();
|
|
}
|
|
break;
|
|
case T__23:
|
|
enterOuterAlt(_localctx, 3);
|
|
{
|
|
setState(334);
|
|
arrayliteral();
|
|
}
|
|
break;
|
|
case STRING:
|
|
enterOuterAlt(_localctx, 4);
|
|
{
|
|
setState(335);
|
|
stringliteral();
|
|
}
|
|
break;
|
|
case FLOAT_NUMBER:
|
|
enterOuterAlt(_localctx, 5);
|
|
{
|
|
setState(336);
|
|
floatliteral();
|
|
}
|
|
break;
|
|
default:
|
|
throw new NoViableAltException(this);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class InlineasmContext extends ParserRuleContext {
|
|
public TerminalNode INLINEASMBLOCK() { return getToken(prog8Parser.INLINEASMBLOCK, 0); }
|
|
public InlineasmContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_inlineasm; }
|
|
}
|
|
|
|
public final InlineasmContext inlineasm() throws RecognitionException {
|
|
InlineasmContext _localctx = new InlineasmContext(_ctx, getState());
|
|
enterRule(_localctx, 68, RULE_inlineasm);
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(339);
|
|
match(T__71);
|
|
setState(340);
|
|
match(INLINEASMBLOCK);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class SubroutineContext extends ParserRuleContext {
|
|
public IdentifierContext identifier() {
|
|
return getRuleContext(IdentifierContext.class,0);
|
|
}
|
|
public Sub_addressContext sub_address() {
|
|
return getRuleContext(Sub_addressContext.class,0);
|
|
}
|
|
public Sub_paramsContext sub_params() {
|
|
return getRuleContext(Sub_paramsContext.class,0);
|
|
}
|
|
public Sub_returnsContext sub_returns() {
|
|
return getRuleContext(Sub_returnsContext.class,0);
|
|
}
|
|
public Statement_blockContext statement_block() {
|
|
return getRuleContext(Statement_blockContext.class,0);
|
|
}
|
|
public TerminalNode EOL() { return getToken(prog8Parser.EOL, 0); }
|
|
public SubroutineContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_subroutine; }
|
|
}
|
|
|
|
public final SubroutineContext subroutine() throws RecognitionException {
|
|
SubroutineContext _localctx = new SubroutineContext(_ctx, getState());
|
|
enterRule(_localctx, 70, RULE_subroutine);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(342);
|
|
match(T__72);
|
|
setState(343);
|
|
identifier();
|
|
setState(344);
|
|
match(T__35);
|
|
setState(346);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
if (_la==NAME) {
|
|
{
|
|
setState(345);
|
|
sub_params();
|
|
}
|
|
}
|
|
|
|
setState(348);
|
|
match(T__36);
|
|
setState(349);
|
|
match(T__73);
|
|
setState(350);
|
|
match(T__35);
|
|
setState(352);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
if (((((_la - 59)) & ~0x3f) == 0 && ((1L << (_la - 59)) & ((1L << (T__58 - 59)) | (1L << (T__59 - 59)) | (1L << (T__60 - 59)) | (1L << (T__61 - 59)) | (1L << (T__62 - 59)) | (1L << (T__63 - 59)) | (1L << (T__64 - 59)) | (1L << (T__65 - 59)) | (1L << (T__66 - 59)) | (1L << (T__67 - 59)) | (1L << (T__76 - 59)))) != 0)) {
|
|
{
|
|
setState(351);
|
|
sub_returns();
|
|
}
|
|
}
|
|
|
|
setState(354);
|
|
match(T__36);
|
|
setState(359);
|
|
_errHandler.sync(this);
|
|
switch (_input.LA(1)) {
|
|
case T__13:
|
|
{
|
|
setState(355);
|
|
sub_address();
|
|
}
|
|
break;
|
|
case T__74:
|
|
{
|
|
{
|
|
setState(356);
|
|
statement_block();
|
|
setState(357);
|
|
match(EOL);
|
|
}
|
|
}
|
|
break;
|
|
default:
|
|
throw new NoViableAltException(this);
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class Statement_blockContext extends ParserRuleContext {
|
|
public List<TerminalNode> EOL() { return getTokens(prog8Parser.EOL); }
|
|
public TerminalNode EOL(int i) {
|
|
return getToken(prog8Parser.EOL, i);
|
|
}
|
|
public List<StatementContext> statement() {
|
|
return getRuleContexts(StatementContext.class);
|
|
}
|
|
public StatementContext statement(int i) {
|
|
return getRuleContext(StatementContext.class,i);
|
|
}
|
|
public Statement_blockContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_statement_block; }
|
|
}
|
|
|
|
public final Statement_blockContext statement_block() throws RecognitionException {
|
|
Statement_blockContext _localctx = new Statement_blockContext(_ctx, getState());
|
|
enterRule(_localctx, 72, RULE_statement_block);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(361);
|
|
match(T__74);
|
|
setState(362);
|
|
match(EOL);
|
|
setState(367);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__2) | (1L << T__3) | (1L << T__4) | (1L << T__5) | (1L << T__6) | (1L << T__7) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__14) | (1L << T__15) | (1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__56) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__71 - 64)) | (1L << (T__72 - 64)) | (1L << (T__77 - 64)) | (1L << (T__79 - 64)) | (1L << (T__80 - 64)) | (1L << (T__81 - 64)) | (1L << (T__82 - 64)) | (1L << (T__83 - 64)) | (1L << (T__84 - 64)) | (1L << (T__85 - 64)) | (1L << (T__86 - 64)) | (1L << (EOL - 64)) | (1L << (NAME - 64)))) != 0)) {
|
|
{
|
|
setState(365);
|
|
_errHandler.sync(this);
|
|
switch (_input.LA(1)) {
|
|
case T__2:
|
|
case T__3:
|
|
case T__4:
|
|
case T__5:
|
|
case T__6:
|
|
case T__7:
|
|
case T__8:
|
|
case T__9:
|
|
case T__10:
|
|
case T__11:
|
|
case T__14:
|
|
case T__15:
|
|
case T__16:
|
|
case T__17:
|
|
case T__18:
|
|
case T__19:
|
|
case T__20:
|
|
case T__21:
|
|
case T__22:
|
|
case T__56:
|
|
case T__58:
|
|
case T__59:
|
|
case T__60:
|
|
case T__61:
|
|
case T__62:
|
|
case T__63:
|
|
case T__71:
|
|
case T__72:
|
|
case T__77:
|
|
case T__79:
|
|
case T__80:
|
|
case T__81:
|
|
case T__82:
|
|
case T__83:
|
|
case T__84:
|
|
case T__85:
|
|
case T__86:
|
|
case NAME:
|
|
{
|
|
setState(363);
|
|
statement();
|
|
}
|
|
break;
|
|
case EOL:
|
|
{
|
|
setState(364);
|
|
match(EOL);
|
|
}
|
|
break;
|
|
default:
|
|
throw new NoViableAltException(this);
|
|
}
|
|
}
|
|
setState(369);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
}
|
|
setState(370);
|
|
match(T__75);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class Sub_addressContext extends ParserRuleContext {
|
|
public IntegerliteralContext integerliteral() {
|
|
return getRuleContext(IntegerliteralContext.class,0);
|
|
}
|
|
public Sub_addressContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_sub_address; }
|
|
}
|
|
|
|
public final Sub_addressContext sub_address() throws RecognitionException {
|
|
Sub_addressContext _localctx = new Sub_addressContext(_ctx, getState());
|
|
enterRule(_localctx, 74, RULE_sub_address);
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(372);
|
|
match(T__13);
|
|
setState(373);
|
|
integerliteral();
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class Sub_paramsContext extends ParserRuleContext {
|
|
public List<Sub_paramContext> sub_param() {
|
|
return getRuleContexts(Sub_paramContext.class);
|
|
}
|
|
public Sub_paramContext sub_param(int i) {
|
|
return getRuleContext(Sub_paramContext.class,i);
|
|
}
|
|
public Sub_paramsContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_sub_params; }
|
|
}
|
|
|
|
public final Sub_paramsContext sub_params() throws RecognitionException {
|
|
Sub_paramsContext _localctx = new Sub_paramsContext(_ctx, getState());
|
|
enterRule(_localctx, 76, RULE_sub_params);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(375);
|
|
sub_param();
|
|
setState(380);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
while (_la==T__12) {
|
|
{
|
|
{
|
|
setState(376);
|
|
match(T__12);
|
|
setState(377);
|
|
sub_param();
|
|
}
|
|
}
|
|
setState(382);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class Sub_paramContext extends ParserRuleContext {
|
|
public IdentifierContext identifier() {
|
|
return getRuleContext(IdentifierContext.class,0);
|
|
}
|
|
public RegisterContext register() {
|
|
return getRuleContext(RegisterContext.class,0);
|
|
}
|
|
public StatusflagContext statusflag() {
|
|
return getRuleContext(StatusflagContext.class,0);
|
|
}
|
|
public Sub_paramContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_sub_param; }
|
|
}
|
|
|
|
public final Sub_paramContext sub_param() throws RecognitionException {
|
|
Sub_paramContext _localctx = new Sub_paramContext(_ctx, getState());
|
|
enterRule(_localctx, 78, RULE_sub_param);
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(383);
|
|
identifier();
|
|
setState(384);
|
|
match(T__1);
|
|
setState(387);
|
|
_errHandler.sync(this);
|
|
switch (_input.LA(1)) {
|
|
case T__58:
|
|
case T__59:
|
|
case T__60:
|
|
case T__61:
|
|
case T__62:
|
|
case T__63:
|
|
{
|
|
setState(385);
|
|
register();
|
|
}
|
|
break;
|
|
case T__64:
|
|
case T__65:
|
|
case T__66:
|
|
case T__67:
|
|
{
|
|
setState(386);
|
|
statusflag();
|
|
}
|
|
break;
|
|
default:
|
|
throw new NoViableAltException(this);
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class Sub_returnsContext extends ParserRuleContext {
|
|
public List<Sub_returnContext> sub_return() {
|
|
return getRuleContexts(Sub_returnContext.class);
|
|
}
|
|
public Sub_returnContext sub_return(int i) {
|
|
return getRuleContext(Sub_returnContext.class,i);
|
|
}
|
|
public Sub_returnsContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_sub_returns; }
|
|
}
|
|
|
|
public final Sub_returnsContext sub_returns() throws RecognitionException {
|
|
Sub_returnsContext _localctx = new Sub_returnsContext(_ctx, getState());
|
|
enterRule(_localctx, 80, RULE_sub_returns);
|
|
int _la;
|
|
try {
|
|
setState(398);
|
|
_errHandler.sync(this);
|
|
switch (_input.LA(1)) {
|
|
case T__76:
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(389);
|
|
match(T__76);
|
|
}
|
|
break;
|
|
case T__58:
|
|
case T__59:
|
|
case T__60:
|
|
case T__61:
|
|
case T__62:
|
|
case T__63:
|
|
case T__64:
|
|
case T__65:
|
|
case T__66:
|
|
case T__67:
|
|
enterOuterAlt(_localctx, 2);
|
|
{
|
|
{
|
|
setState(390);
|
|
sub_return();
|
|
setState(395);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
while (_la==T__12) {
|
|
{
|
|
{
|
|
setState(391);
|
|
match(T__12);
|
|
setState(392);
|
|
sub_return();
|
|
}
|
|
}
|
|
setState(397);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
default:
|
|
throw new NoViableAltException(this);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class Sub_returnContext extends ParserRuleContext {
|
|
public RegisterContext register() {
|
|
return getRuleContext(RegisterContext.class,0);
|
|
}
|
|
public StatusflagContext statusflag() {
|
|
return getRuleContext(StatusflagContext.class,0);
|
|
}
|
|
public Sub_returnContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_sub_return; }
|
|
}
|
|
|
|
public final Sub_returnContext sub_return() throws RecognitionException {
|
|
Sub_returnContext _localctx = new Sub_returnContext(_ctx, getState());
|
|
enterRule(_localctx, 82, RULE_sub_return);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(402);
|
|
_errHandler.sync(this);
|
|
switch (_input.LA(1)) {
|
|
case T__58:
|
|
case T__59:
|
|
case T__60:
|
|
case T__61:
|
|
case T__62:
|
|
case T__63:
|
|
{
|
|
setState(400);
|
|
register();
|
|
}
|
|
break;
|
|
case T__64:
|
|
case T__65:
|
|
case T__66:
|
|
case T__67:
|
|
{
|
|
setState(401);
|
|
statusflag();
|
|
}
|
|
break;
|
|
default:
|
|
throw new NoViableAltException(this);
|
|
}
|
|
setState(405);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
if (_la==T__76) {
|
|
{
|
|
setState(404);
|
|
match(T__76);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class If_stmtContext extends ParserRuleContext {
|
|
public ExpressionContext expression() {
|
|
return getRuleContext(ExpressionContext.class,0);
|
|
}
|
|
public List<TerminalNode> EOL() { return getTokens(prog8Parser.EOL); }
|
|
public TerminalNode EOL(int i) {
|
|
return getToken(prog8Parser.EOL, i);
|
|
}
|
|
public StatementContext statement() {
|
|
return getRuleContext(StatementContext.class,0);
|
|
}
|
|
public Statement_blockContext statement_block() {
|
|
return getRuleContext(Statement_blockContext.class,0);
|
|
}
|
|
public Else_partContext else_part() {
|
|
return getRuleContext(Else_partContext.class,0);
|
|
}
|
|
public If_stmtContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_if_stmt; }
|
|
}
|
|
|
|
public final If_stmtContext if_stmt() throws RecognitionException {
|
|
If_stmtContext _localctx = new If_stmtContext(_ctx, getState());
|
|
enterRule(_localctx, 84, RULE_if_stmt);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(407);
|
|
match(T__77);
|
|
setState(408);
|
|
match(T__35);
|
|
setState(409);
|
|
expression(0);
|
|
setState(410);
|
|
match(T__36);
|
|
setState(412);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
if (_la==EOL) {
|
|
{
|
|
setState(411);
|
|
match(EOL);
|
|
}
|
|
}
|
|
|
|
setState(416);
|
|
_errHandler.sync(this);
|
|
switch (_input.LA(1)) {
|
|
case T__2:
|
|
case T__3:
|
|
case T__4:
|
|
case T__5:
|
|
case T__6:
|
|
case T__7:
|
|
case T__8:
|
|
case T__9:
|
|
case T__10:
|
|
case T__11:
|
|
case T__14:
|
|
case T__15:
|
|
case T__16:
|
|
case T__17:
|
|
case T__18:
|
|
case T__19:
|
|
case T__20:
|
|
case T__21:
|
|
case T__22:
|
|
case T__56:
|
|
case T__58:
|
|
case T__59:
|
|
case T__60:
|
|
case T__61:
|
|
case T__62:
|
|
case T__63:
|
|
case T__71:
|
|
case T__72:
|
|
case T__77:
|
|
case T__79:
|
|
case T__80:
|
|
case T__81:
|
|
case T__82:
|
|
case T__83:
|
|
case T__84:
|
|
case T__85:
|
|
case T__86:
|
|
case NAME:
|
|
{
|
|
setState(414);
|
|
statement();
|
|
}
|
|
break;
|
|
case T__74:
|
|
{
|
|
setState(415);
|
|
statement_block();
|
|
}
|
|
break;
|
|
default:
|
|
throw new NoViableAltException(this);
|
|
}
|
|
setState(419);
|
|
_errHandler.sync(this);
|
|
switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) {
|
|
case 1:
|
|
{
|
|
setState(418);
|
|
match(EOL);
|
|
}
|
|
break;
|
|
}
|
|
setState(422);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
if (_la==T__78) {
|
|
{
|
|
setState(421);
|
|
else_part();
|
|
}
|
|
}
|
|
|
|
setState(424);
|
|
match(EOL);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class Else_partContext extends ParserRuleContext {
|
|
public StatementContext statement() {
|
|
return getRuleContext(StatementContext.class,0);
|
|
}
|
|
public Statement_blockContext statement_block() {
|
|
return getRuleContext(Statement_blockContext.class,0);
|
|
}
|
|
public TerminalNode EOL() { return getToken(prog8Parser.EOL, 0); }
|
|
public Else_partContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_else_part; }
|
|
}
|
|
|
|
public final Else_partContext else_part() throws RecognitionException {
|
|
Else_partContext _localctx = new Else_partContext(_ctx, getState());
|
|
enterRule(_localctx, 86, RULE_else_part);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(426);
|
|
match(T__78);
|
|
setState(428);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
if (_la==EOL) {
|
|
{
|
|
setState(427);
|
|
match(EOL);
|
|
}
|
|
}
|
|
|
|
setState(432);
|
|
_errHandler.sync(this);
|
|
switch (_input.LA(1)) {
|
|
case T__2:
|
|
case T__3:
|
|
case T__4:
|
|
case T__5:
|
|
case T__6:
|
|
case T__7:
|
|
case T__8:
|
|
case T__9:
|
|
case T__10:
|
|
case T__11:
|
|
case T__14:
|
|
case T__15:
|
|
case T__16:
|
|
case T__17:
|
|
case T__18:
|
|
case T__19:
|
|
case T__20:
|
|
case T__21:
|
|
case T__22:
|
|
case T__56:
|
|
case T__58:
|
|
case T__59:
|
|
case T__60:
|
|
case T__61:
|
|
case T__62:
|
|
case T__63:
|
|
case T__71:
|
|
case T__72:
|
|
case T__77:
|
|
case T__79:
|
|
case T__80:
|
|
case T__81:
|
|
case T__82:
|
|
case T__83:
|
|
case T__84:
|
|
case T__85:
|
|
case T__86:
|
|
case NAME:
|
|
{
|
|
setState(430);
|
|
statement();
|
|
}
|
|
break;
|
|
case T__74:
|
|
{
|
|
setState(431);
|
|
statement_block();
|
|
}
|
|
break;
|
|
default:
|
|
throw new NoViableAltException(this);
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class Branch_stmtContext extends ParserRuleContext {
|
|
public BranchconditionContext branchcondition() {
|
|
return getRuleContext(BranchconditionContext.class,0);
|
|
}
|
|
public List<TerminalNode> EOL() { return getTokens(prog8Parser.EOL); }
|
|
public TerminalNode EOL(int i) {
|
|
return getToken(prog8Parser.EOL, i);
|
|
}
|
|
public StatementContext statement() {
|
|
return getRuleContext(StatementContext.class,0);
|
|
}
|
|
public Statement_blockContext statement_block() {
|
|
return getRuleContext(Statement_blockContext.class,0);
|
|
}
|
|
public Else_partContext else_part() {
|
|
return getRuleContext(Else_partContext.class,0);
|
|
}
|
|
public Branch_stmtContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_branch_stmt; }
|
|
}
|
|
|
|
public final Branch_stmtContext branch_stmt() throws RecognitionException {
|
|
Branch_stmtContext _localctx = new Branch_stmtContext(_ctx, getState());
|
|
enterRule(_localctx, 88, RULE_branch_stmt);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(434);
|
|
branchcondition();
|
|
setState(436);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
if (_la==EOL) {
|
|
{
|
|
setState(435);
|
|
match(EOL);
|
|
}
|
|
}
|
|
|
|
setState(440);
|
|
_errHandler.sync(this);
|
|
switch (_input.LA(1)) {
|
|
case T__2:
|
|
case T__3:
|
|
case T__4:
|
|
case T__5:
|
|
case T__6:
|
|
case T__7:
|
|
case T__8:
|
|
case T__9:
|
|
case T__10:
|
|
case T__11:
|
|
case T__14:
|
|
case T__15:
|
|
case T__16:
|
|
case T__17:
|
|
case T__18:
|
|
case T__19:
|
|
case T__20:
|
|
case T__21:
|
|
case T__22:
|
|
case T__56:
|
|
case T__58:
|
|
case T__59:
|
|
case T__60:
|
|
case T__61:
|
|
case T__62:
|
|
case T__63:
|
|
case T__71:
|
|
case T__72:
|
|
case T__77:
|
|
case T__79:
|
|
case T__80:
|
|
case T__81:
|
|
case T__82:
|
|
case T__83:
|
|
case T__84:
|
|
case T__85:
|
|
case T__86:
|
|
case NAME:
|
|
{
|
|
setState(438);
|
|
statement();
|
|
}
|
|
break;
|
|
case T__74:
|
|
{
|
|
setState(439);
|
|
statement_block();
|
|
}
|
|
break;
|
|
default:
|
|
throw new NoViableAltException(this);
|
|
}
|
|
setState(443);
|
|
_errHandler.sync(this);
|
|
switch ( getInterpreter().adaptivePredict(_input,46,_ctx) ) {
|
|
case 1:
|
|
{
|
|
setState(442);
|
|
match(EOL);
|
|
}
|
|
break;
|
|
}
|
|
setState(446);
|
|
_errHandler.sync(this);
|
|
_la = _input.LA(1);
|
|
if (_la==T__78) {
|
|
{
|
|
setState(445);
|
|
else_part();
|
|
}
|
|
}
|
|
|
|
setState(448);
|
|
match(EOL);
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public static class BranchconditionContext extends ParserRuleContext {
|
|
public BranchconditionContext(ParserRuleContext parent, int invokingState) {
|
|
super(parent, invokingState);
|
|
}
|
|
@Override public int getRuleIndex() { return RULE_branchcondition; }
|
|
}
|
|
|
|
public final BranchconditionContext branchcondition() throws RecognitionException {
|
|
BranchconditionContext _localctx = new BranchconditionContext(_ctx, getState());
|
|
enterRule(_localctx, 90, RULE_branchcondition);
|
|
int _la;
|
|
try {
|
|
enterOuterAlt(_localctx, 1);
|
|
{
|
|
setState(450);
|
|
_la = _input.LA(1);
|
|
if ( !(((((_la - 80)) & ~0x3f) == 0 && ((1L << (_la - 80)) & ((1L << (T__79 - 80)) | (1L << (T__80 - 80)) | (1L << (T__81 - 80)) | (1L << (T__82 - 80)) | (1L << (T__83 - 80)) | (1L << (T__84 - 80)) | (1L << (T__85 - 80)) | (1L << (T__86 - 80)))) != 0)) ) {
|
|
_errHandler.recoverInline(this);
|
|
}
|
|
else {
|
|
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
_errHandler.reportMatch(this);
|
|
consume();
|
|
}
|
|
}
|
|
}
|
|
catch (RecognitionException re) {
|
|
_localctx.exception = re;
|
|
_errHandler.reportError(this, re);
|
|
_errHandler.recover(this, re);
|
|
}
|
|
finally {
|
|
exitRule();
|
|
}
|
|
return _localctx;
|
|
}
|
|
|
|
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
|
|
switch (ruleIndex) {
|
|
case 18:
|
|
return expression_sempred((ExpressionContext)_localctx, predIndex);
|
|
}
|
|
return true;
|
|
}
|
|
private boolean expression_sempred(ExpressionContext _localctx, int predIndex) {
|
|
switch (predIndex) {
|
|
case 0:
|
|
return precpred(_ctx, 17);
|
|
case 1:
|
|
return precpred(_ctx, 16);
|
|
case 2:
|
|
return precpred(_ctx, 15);
|
|
case 3:
|
|
return precpred(_ctx, 14);
|
|
case 4:
|
|
return precpred(_ctx, 13);
|
|
case 5:
|
|
return precpred(_ctx, 12);
|
|
case 6:
|
|
return precpred(_ctx, 11);
|
|
case 7:
|
|
return precpred(_ctx, 10);
|
|
case 8:
|
|
return precpred(_ctx, 9);
|
|
case 9:
|
|
return precpred(_ctx, 8);
|
|
case 10:
|
|
return precpred(_ctx, 7);
|
|
case 11:
|
|
return precpred(_ctx, 6);
|
|
case 12:
|
|
return precpred(_ctx, 20);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public static final String _serializedATN =
|
|
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3d\u01c7\4\2\t\2\4"+
|
|
"\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+
|
|
"\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
|
|
"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
|
|
"\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+
|
|
"\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+
|
|
",\t,\4-\t-\4.\t.\4/\t/\3\2\3\2\7\2a\n\2\f\2\16\2d\13\2\3\2\3\2\3\3\3\3"+
|
|
"\5\3j\n\3\3\4\3\4\3\4\5\4o\n\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5"+
|
|
"\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\5\5\u0084\n\5\3\6\3\6\3\6\3\7\3\7"+
|
|
"\3\7\3\7\5\7\u008d\n\7\3\b\3\b\5\b\u0091\n\b\3\b\3\b\3\b\7\b\u0096\n\b"+
|
|
"\f\b\16\b\u0099\13\b\5\b\u009b\n\b\3\t\3\t\3\t\5\t\u00a0\n\t\3\n\3\n\5"+
|
|
"\n\u00a4\n\n\3\n\3\n\3\13\3\13\5\13\u00aa\n\13\3\13\3\13\3\13\3\13\3\f"+
|
|
"\3\f\3\f\3\r\3\r\3\r\3\16\3\16\3\17\3\17\3\17\3\17\5\17\u00bc\n\17\3\17"+
|
|
"\3\17\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3\22\3\22\3\22\5\22\u00cb"+
|
|
"\n\22\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24"+
|
|
"\3\24\3\24\3\24\3\24\5\24\u00de\n\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24"+
|
|
"\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24"+
|
|
"\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24"+
|
|
"\3\24\3\24\3\24\7\24\u0106\n\24\f\24\16\24\u0109\13\24\3\25\3\25\5\25"+
|
|
"\u010d\n\25\3\25\3\25\5\25\u0111\n\25\3\25\3\25\3\26\3\26\5\26\u0117\n"+
|
|
"\26\3\26\3\26\5\26\u011b\n\26\3\26\3\26\3\27\3\27\3\27\7\27\u0122\n\27"+
|
|
"\f\27\16\27\u0125\13\27\3\30\3\30\5\30\u0129\n\30\3\31\3\31\3\32\3\32"+
|
|
"\3\32\6\32\u0130\n\32\r\32\16\32\u0131\3\33\3\33\3\34\3\34\3\35\3\35\5"+
|
|
"\35\u013a\n\35\3\36\3\36\3\37\3\37\3 \3 \3 \3 \7 \u0144\n \f \16 \u0147"+
|
|
"\13 \3 \3 \3!\3!\3\"\3\"\3#\3#\3#\3#\3#\5#\u0154\n#\3$\3$\3$\3%\3%\3%"+
|
|
"\3%\5%\u015d\n%\3%\3%\3%\3%\5%\u0163\n%\3%\3%\3%\3%\3%\5%\u016a\n%\3&"+
|
|
"\3&\3&\3&\7&\u0170\n&\f&\16&\u0173\13&\3&\3&\3\'\3\'\3\'\3(\3(\3(\7(\u017d"+
|
|
"\n(\f(\16(\u0180\13(\3)\3)\3)\3)\5)\u0186\n)\3*\3*\3*\3*\7*\u018c\n*\f"+
|
|
"*\16*\u018f\13*\5*\u0191\n*\3+\3+\5+\u0195\n+\3+\5+\u0198\n+\3,\3,\3,"+
|
|
"\3,\3,\5,\u019f\n,\3,\3,\5,\u01a3\n,\3,\5,\u01a6\n,\3,\5,\u01a9\n,\3,"+
|
|
"\3,\3-\3-\5-\u01af\n-\3-\3-\5-\u01b3\n-\3.\3.\5.\u01b7\n.\3.\3.\5.\u01bb"+
|
|
"\n.\3.\5.\u01be\n.\3.\5.\u01c1\n.\3.\3.\3/\3/\3/\2\3&\60\2\4\6\b\n\f\16"+
|
|
"\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\\2\20"+
|
|
"\3\2\6\16\3\2\23\31\3\2\34#\3\2$%\4\2\3\3()\3\2+,\3\2()\3\2-\60\3\2\61"+
|
|
"\62\3\2=B\3\2CF\3\2_a\3\2HI\3\2RY\2\u01ed\2b\3\2\2\2\4i\3\2\2\2\6k\3\2"+
|
|
"\2\2\b\u0083\3\2\2\2\n\u0085\3\2\2\2\f\u0088\3\2\2\2\16\u008e\3\2\2\2"+
|
|
"\20\u009f\3\2\2\2\22\u00a1\3\2\2\2\24\u00a7\3\2\2\2\26\u00af\3\2\2\2\30"+
|
|
"\u00b2\3\2\2\2\32\u00b5\3\2\2\2\34\u00b7\3\2\2\2\36\u00bf\3\2\2\2 \u00c3"+
|
|
"\3\2\2\2\"\u00ca\3\2\2\2$\u00cc\3\2\2\2&\u00dd\3\2\2\2(\u010c\3\2\2\2"+
|
|
"*\u0116\3\2\2\2,\u011e\3\2\2\2.\u0126\3\2\2\2\60\u012a\3\2\2\2\62\u012c"+
|
|
"\3\2\2\2\64\u0133\3\2\2\2\66\u0135\3\2\2\28\u0137\3\2\2\2:\u013b\3\2\2"+
|
|
"\2<\u013d\3\2\2\2>\u013f\3\2\2\2@\u014a\3\2\2\2B\u014c\3\2\2\2D\u0153"+
|
|
"\3\2\2\2F\u0155\3\2\2\2H\u0158\3\2\2\2J\u016b\3\2\2\2L\u0176\3\2\2\2N"+
|
|
"\u0179\3\2\2\2P\u0181\3\2\2\2R\u0190\3\2\2\2T\u0194\3\2\2\2V\u0199\3\2"+
|
|
"\2\2X\u01ac\3\2\2\2Z\u01b4\3\2\2\2\\\u01c4\3\2\2\2^a\5\4\3\2_a\7]\2\2"+
|
|
"`^\3\2\2\2`_\3\2\2\2ad\3\2\2\2b`\3\2\2\2bc\3\2\2\2ce\3\2\2\2db\3\2\2\2"+
|
|
"ef\7\2\2\3f\3\3\2\2\2gj\5\16\b\2hj\5\6\4\2ig\3\2\2\2ih\3\2\2\2j\5\3\2"+
|
|
"\2\2kl\7\3\2\2ln\5\60\31\2mo\58\35\2nm\3\2\2\2no\3\2\2\2op\3\2\2\2pq\5"+
|
|
"J&\2qr\7]\2\2r\7\3\2\2\2s\u0084\5\16\b\2t\u0084\5\24\13\2u\u0084\5\22"+
|
|
"\n\2v\u0084\5\26\f\2w\u0084\5\30\r\2x\u0084\5\36\20\2y\u0084\5 \21\2z"+
|
|
"\u0084\5\f\7\2{\u0084\5$\23\2|\u0084\5*\26\2}\u0084\5V,\2~\u0084\5Z.\2"+
|
|
"\177\u0084\5H%\2\u0080\u0084\5F$\2\u0081\u0084\5\n\6\2\u0082\u0084\5."+
|
|
"\30\2\u0083s\3\2\2\2\u0083t\3\2\2\2\u0083u\3\2\2\2\u0083v\3\2\2\2\u0083"+
|
|
"w\3\2\2\2\u0083x\3\2\2\2\u0083y\3\2\2\2\u0083z\3\2\2\2\u0083{\3\2\2\2"+
|
|
"\u0083|\3\2\2\2\u0083}\3\2\2\2\u0083~\3\2\2\2\u0083\177\3\2\2\2\u0083"+
|
|
"\u0080\3\2\2\2\u0083\u0081\3\2\2\2\u0083\u0082\3\2\2\2\u0084\t\3\2\2\2"+
|
|
"\u0085\u0086\5\60\31\2\u0086\u0087\7\4\2\2\u0087\13\3\2\2\2\u0088\u008c"+
|
|
"\7\5\2\2\u0089\u008d\58\35\2\u008a\u008d\5\60\31\2\u008b\u008d\5\62\32"+
|
|
"\2\u008c\u0089\3\2\2\2\u008c\u008a\3\2\2\2\u008c\u008b\3\2\2\2\u008d\r"+
|
|
"\3\2\2\2\u008e\u009a\t\2\2\2\u008f\u0091\5\20\t\2\u0090\u008f\3\2\2\2"+
|
|
"\u0090\u0091\3\2\2\2\u0091\u009b\3\2\2\2\u0092\u0097\5\20\t\2\u0093\u0094"+
|
|
"\7\17\2\2\u0094\u0096\5\20\t\2\u0095\u0093\3\2\2\2\u0096\u0099\3\2\2\2"+
|
|
"\u0097\u0095\3\2\2\2\u0097\u0098\3\2\2\2\u0098\u009b\3\2\2\2\u0099\u0097"+
|
|
"\3\2\2\2\u009a\u0090\3\2\2\2\u009a\u0092\3\2\2\2\u009b\17\3\2\2\2\u009c"+
|
|
"\u00a0\5@!\2\u009d\u00a0\5\60\31\2\u009e\u00a0\58\35\2\u009f\u009c\3\2"+
|
|
"\2\2\u009f\u009d\3\2\2\2\u009f\u009e\3\2\2\2\u00a0\21\3\2\2\2\u00a1\u00a3"+
|
|
"\5\32\16\2\u00a2\u00a4\5\34\17\2\u00a3\u00a2\3\2\2\2\u00a3\u00a4\3\2\2"+
|
|
"\2\u00a4\u00a5\3\2\2\2\u00a5\u00a6\5\60\31\2\u00a6\23\3\2\2\2\u00a7\u00a9"+
|
|
"\5\32\16\2\u00a8\u00aa\5\34\17\2\u00a9\u00a8\3\2\2\2\u00a9\u00aa\3\2\2"+
|
|
"\2\u00aa\u00ab\3\2\2\2\u00ab\u00ac\5\60\31\2\u00ac\u00ad\7\20\2\2\u00ad"+
|
|
"\u00ae\5&\24\2\u00ae\25\3\2\2\2\u00af\u00b0\7\21\2\2\u00b0\u00b1\5\24"+
|
|
"\13\2\u00b1\27\3\2\2\2\u00b2\u00b3\7\22\2\2\u00b3\u00b4\5\24\13\2\u00b4"+
|
|
"\31\3\2\2\2\u00b5\u00b6\t\3\2\2\u00b6\33\3\2\2\2\u00b7\u00b8\7\32\2\2"+
|
|
"\u00b8\u00bb\5&\24\2\u00b9\u00ba\7\17\2\2\u00ba\u00bc\5&\24\2\u00bb\u00b9"+
|
|
"\3\2\2\2\u00bb\u00bc\3\2\2\2\u00bc\u00bd\3\2\2\2\u00bd\u00be\7\33\2\2"+
|
|
"\u00be\35\3\2\2\2\u00bf\u00c0\5\"\22\2\u00c0\u00c1\7\20\2\2\u00c1\u00c2"+
|
|
"\5&\24\2\u00c2\37\3\2\2\2\u00c3\u00c4\5\"\22\2\u00c4\u00c5\t\4\2\2\u00c5"+
|
|
"\u00c6\5&\24\2\u00c6!\3\2\2\2\u00c7\u00cb\5\64\33\2\u00c8\u00cb\5\60\31"+
|
|
"\2\u00c9\u00cb\5\62\32\2\u00ca\u00c7\3\2\2\2\u00ca\u00c8\3\2\2\2\u00ca"+
|
|
"\u00c9\3\2\2\2\u00cb#\3\2\2\2\u00cc\u00cd\5\"\22\2\u00cd\u00ce\t\5\2\2"+
|
|
"\u00ce%\3\2\2\2\u00cf\u00d0\b\24\1\2\u00d0\u00d1\7&\2\2\u00d1\u00d2\5"+
|
|
"&\24\2\u00d2\u00d3\7\'\2\2\u00d3\u00de\3\2\2\2\u00d4\u00de\5(\25\2\u00d5"+
|
|
"\u00d6\t\6\2\2\u00d6\u00de\5&\24\24\u00d7\u00d8\7:\2\2\u00d8\u00de\5&"+
|
|
"\24\7\u00d9\u00de\5D#\2\u00da\u00de\5\64\33\2\u00db\u00de\5\60\31\2\u00dc"+
|
|
"\u00de\5\62\32\2\u00dd\u00cf\3\2\2\2\u00dd\u00d4\3\2\2\2\u00dd\u00d5\3"+
|
|
"\2\2\2\u00dd\u00d7\3\2\2\2\u00dd\u00d9\3\2\2\2\u00dd\u00da\3\2\2\2\u00dd"+
|
|
"\u00db\3\2\2\2\u00dd\u00dc\3\2\2\2\u00de\u0107\3\2\2\2\u00df\u00e0\f\23"+
|
|
"\2\2\u00e0\u00e1\7*\2\2\u00e1\u0106\5&\24\24\u00e2\u00e3\f\22\2\2\u00e3"+
|
|
"\u00e4\t\7\2\2\u00e4\u0106\5&\24\23\u00e5\u00e6\f\21\2\2\u00e6\u00e7\t"+
|
|
"\b\2\2\u00e7\u0106\5&\24\22\u00e8\u00e9\f\20\2\2\u00e9\u00ea\t\t\2\2\u00ea"+
|
|
"\u0106\5&\24\21\u00eb\u00ec\f\17\2\2\u00ec\u00ed\t\n\2\2\u00ed\u0106\5"+
|
|
"&\24\20\u00ee\u00ef\f\16\2\2\u00ef\u00f0\7\63\2\2\u00f0\u0106\5&\24\17"+
|
|
"\u00f1\u00f2\f\r\2\2\u00f2\u00f3\7\64\2\2\u00f3\u0106\5&\24\16\u00f4\u00f5"+
|
|
"\f\f\2\2\u00f5\u00f6\7\65\2\2\u00f6\u0106\5&\24\r\u00f7\u00f8\f\13\2\2"+
|
|
"\u00f8\u00f9\7\66\2\2\u00f9\u0106\5&\24\f\u00fa\u00fb\f\n\2\2\u00fb\u00fc"+
|
|
"\7\67\2\2\u00fc\u0106\5&\24\13\u00fd\u00fe\f\t\2\2\u00fe\u00ff\78\2\2"+
|
|
"\u00ff\u0106\5&\24\n\u0100\u0101\f\b\2\2\u0101\u0102\79\2\2\u0102\u0106"+
|
|
"\5&\24\t\u0103\u0104\f\26\2\2\u0104\u0106\5\34\17\2\u0105\u00df\3\2\2"+
|
|
"\2\u0105\u00e2\3\2\2\2\u0105\u00e5\3\2\2\2\u0105\u00e8\3\2\2\2\u0105\u00eb"+
|
|
"\3\2\2\2\u0105\u00ee\3\2\2\2\u0105\u00f1\3\2\2\2\u0105\u00f4\3\2\2\2\u0105"+
|
|
"\u00f7\3\2\2\2\u0105\u00fa\3\2\2\2\u0105\u00fd\3\2\2\2\u0105\u0100\3\2"+
|
|
"\2\2\u0105\u0103\3\2\2\2\u0106\u0109\3\2\2\2\u0107\u0105\3\2\2\2\u0107"+
|
|
"\u0108\3\2\2\2\u0108\'\3\2\2\2\u0109\u0107\3\2\2\2\u010a\u010d\5\60\31"+
|
|
"\2\u010b\u010d\5\62\32\2\u010c\u010a\3\2\2\2\u010c\u010b\3\2\2\2\u010d"+
|
|
"\u010e\3\2\2\2\u010e\u0110\7&\2\2\u010f\u0111\5,\27\2\u0110\u010f\3\2"+
|
|
"\2\2\u0110\u0111\3\2\2\2\u0111\u0112\3\2\2\2\u0112\u0113\7\'\2\2\u0113"+
|
|
")\3\2\2\2\u0114\u0117\5\60\31\2\u0115\u0117\5\62\32\2\u0116\u0114\3\2"+
|
|
"\2\2\u0116\u0115\3\2\2\2\u0117\u0118\3\2\2\2\u0118\u011a\7&\2\2\u0119"+
|
|
"\u011b\5,\27\2\u011a\u0119\3\2\2\2\u011a\u011b\3\2\2\2\u011b\u011c\3\2"+
|
|
"\2\2\u011c\u011d\7\'\2\2\u011d+\3\2\2\2\u011e\u0123\5&\24\2\u011f\u0120"+
|
|
"\7\17\2\2\u0120\u0122\5&\24\2\u0121\u011f\3\2\2\2\u0122\u0125\3\2\2\2"+
|
|
"\u0123\u0121\3\2\2\2\u0123\u0124\3\2\2\2\u0124-\3\2\2\2\u0125\u0123\3"+
|
|
"\2\2\2\u0126\u0128\7;\2\2\u0127\u0129\5,\27\2\u0128\u0127\3\2\2\2\u0128"+
|
|
"\u0129\3\2\2\2\u0129/\3\2\2\2\u012a\u012b\7^\2\2\u012b\61\3\2\2\2\u012c"+
|
|
"\u012f\7^\2\2\u012d\u012e\7<\2\2\u012e\u0130\7^\2\2\u012f\u012d\3\2\2"+
|
|
"\2\u0130\u0131\3\2\2\2\u0131\u012f\3\2\2\2\u0131\u0132\3\2\2\2\u0132\63"+
|
|
"\3\2\2\2\u0133\u0134\t\13\2\2\u0134\65\3\2\2\2\u0135\u0136\t\f\2\2\u0136"+
|
|
"\67\3\2\2\2\u0137\u0139\t\r\2\2\u0138\u013a\5:\36\2\u0139\u0138\3\2\2"+
|
|
"\2\u0139\u013a\3\2\2\2\u013a9\3\2\2\2\u013b\u013c\7G\2\2\u013c;\3\2\2"+
|
|
"\2\u013d\u013e\t\16\2\2\u013e=\3\2\2\2\u013f\u0140\7\32\2\2\u0140\u0145"+
|
|
"\5&\24\2\u0141\u0142\7\17\2\2\u0142\u0144\5&\24\2\u0143\u0141\3\2\2\2"+
|
|
"\u0144\u0147\3\2\2\2\u0145\u0143\3\2\2\2\u0145\u0146\3\2\2\2\u0146\u0148"+
|
|
"\3\2\2\2\u0147\u0145\3\2\2\2\u0148\u0149\7\33\2\2\u0149?\3\2\2\2\u014a"+
|
|
"\u014b\7c\2\2\u014bA\3\2\2\2\u014c\u014d\7b\2\2\u014dC\3\2\2\2\u014e\u0154"+
|
|
"\58\35\2\u014f\u0154\5<\37\2\u0150\u0154\5> \2\u0151\u0154\5@!\2\u0152"+
|
|
"\u0154\5B\"\2\u0153\u014e\3\2\2\2\u0153\u014f\3\2\2\2\u0153\u0150\3\2"+
|
|
"\2\2\u0153\u0151\3\2\2\2\u0153\u0152\3\2\2\2\u0154E\3\2\2\2\u0155\u0156"+
|
|
"\7J\2\2\u0156\u0157\7d\2\2\u0157G\3\2\2\2\u0158\u0159\7K\2\2\u0159\u015a"+
|
|
"\5\60\31\2\u015a\u015c\7&\2\2\u015b\u015d\5N(\2\u015c\u015b\3\2\2\2\u015c"+
|
|
"\u015d\3\2\2\2\u015d\u015e\3\2\2\2\u015e\u015f\7\'\2\2\u015f\u0160\7L"+
|
|
"\2\2\u0160\u0162\7&\2\2\u0161\u0163\5R*\2\u0162\u0161\3\2\2\2\u0162\u0163"+
|
|
"\3\2\2\2\u0163\u0164\3\2\2\2\u0164\u0169\7\'\2\2\u0165\u016a\5L\'\2\u0166"+
|
|
"\u0167\5J&\2\u0167\u0168\7]\2\2\u0168\u016a\3\2\2\2\u0169\u0165\3\2\2"+
|
|
"\2\u0169\u0166\3\2\2\2\u016aI\3\2\2\2\u016b\u016c\7M\2\2\u016c\u0171\7"+
|
|
"]\2\2\u016d\u0170\5\b\5\2\u016e\u0170\7]\2\2\u016f\u016d\3\2\2\2\u016f"+
|
|
"\u016e\3\2\2\2\u0170\u0173\3\2\2\2\u0171\u016f\3\2\2\2\u0171\u0172\3\2"+
|
|
"\2\2\u0172\u0174\3\2\2\2\u0173\u0171\3\2\2\2\u0174\u0175\7N\2\2\u0175"+
|
|
"K\3\2\2\2\u0176\u0177\7\20\2\2\u0177\u0178\58\35\2\u0178M\3\2\2\2\u0179"+
|
|
"\u017e\5P)\2\u017a\u017b\7\17\2\2\u017b\u017d\5P)\2\u017c\u017a\3\2\2"+
|
|
"\2\u017d\u0180\3\2\2\2\u017e\u017c\3\2\2\2\u017e\u017f\3\2\2\2\u017fO"+
|
|
"\3\2\2\2\u0180\u017e\3\2\2\2\u0181\u0182\5\60\31\2\u0182\u0185\7\4\2\2"+
|
|
"\u0183\u0186\5\64\33\2\u0184\u0186\5\66\34\2\u0185\u0183\3\2\2\2\u0185"+
|
|
"\u0184\3\2\2\2\u0186Q\3\2\2\2\u0187\u0191\7O\2\2\u0188\u018d\5T+\2\u0189"+
|
|
"\u018a\7\17\2\2\u018a\u018c\5T+\2\u018b\u0189\3\2\2\2\u018c\u018f\3\2"+
|
|
"\2\2\u018d\u018b\3\2\2\2\u018d\u018e\3\2\2\2\u018e\u0191\3\2\2\2\u018f"+
|
|
"\u018d\3\2\2\2\u0190\u0187\3\2\2\2\u0190\u0188\3\2\2\2\u0191S\3\2\2\2"+
|
|
"\u0192\u0195\5\64\33\2\u0193\u0195\5\66\34\2\u0194\u0192\3\2\2\2\u0194"+
|
|
"\u0193\3\2\2\2\u0195\u0197\3\2\2\2\u0196\u0198\7O\2\2\u0197\u0196\3\2"+
|
|
"\2\2\u0197\u0198\3\2\2\2\u0198U\3\2\2\2\u0199\u019a\7P\2\2\u019a\u019b"+
|
|
"\7&\2\2\u019b\u019c\5&\24\2\u019c\u019e\7\'\2\2\u019d\u019f\7]\2\2\u019e"+
|
|
"\u019d\3\2\2\2\u019e\u019f\3\2\2\2\u019f\u01a2\3\2\2\2\u01a0\u01a3\5\b"+
|
|
"\5\2\u01a1\u01a3\5J&\2\u01a2\u01a0\3\2\2\2\u01a2\u01a1\3\2\2\2\u01a3\u01a5"+
|
|
"\3\2\2\2\u01a4\u01a6\7]\2\2\u01a5\u01a4\3\2\2\2\u01a5\u01a6\3\2\2\2\u01a6"+
|
|
"\u01a8\3\2\2\2\u01a7\u01a9\5X-\2\u01a8\u01a7\3\2\2\2\u01a8\u01a9\3\2\2"+
|
|
"\2\u01a9\u01aa\3\2\2\2\u01aa\u01ab\7]\2\2\u01abW\3\2\2\2\u01ac\u01ae\7"+
|
|
"Q\2\2\u01ad\u01af\7]\2\2\u01ae\u01ad\3\2\2\2\u01ae\u01af\3\2\2\2\u01af"+
|
|
"\u01b2\3\2\2\2\u01b0\u01b3\5\b\5\2\u01b1\u01b3\5J&\2\u01b2\u01b0\3\2\2"+
|
|
"\2\u01b2\u01b1\3\2\2\2\u01b3Y\3\2\2\2\u01b4\u01b6\5\\/\2\u01b5\u01b7\7"+
|
|
"]\2\2\u01b6\u01b5\3\2\2\2\u01b6\u01b7\3\2\2\2\u01b7\u01ba\3\2\2\2\u01b8"+
|
|
"\u01bb\5\b\5\2\u01b9\u01bb\5J&\2\u01ba\u01b8\3\2\2\2\u01ba\u01b9\3\2\2"+
|
|
"\2\u01bb\u01bd\3\2\2\2\u01bc\u01be\7]\2\2\u01bd\u01bc\3\2\2\2\u01bd\u01be"+
|
|
"\3\2\2\2\u01be\u01c0\3\2\2\2\u01bf\u01c1\5X-\2\u01c0\u01bf\3\2\2\2\u01c0"+
|
|
"\u01c1\3\2\2\2\u01c1\u01c2\3\2\2\2\u01c2\u01c3\7]\2\2\u01c3[\3\2\2\2\u01c4"+
|
|
"\u01c5\t\17\2\2\u01c5]\3\2\2\2\62`bin\u0083\u008c\u0090\u0097\u009a\u009f"+
|
|
"\u00a3\u00a9\u00bb\u00ca\u00dd\u0105\u0107\u010c\u0110\u0116\u011a\u0123"+
|
|
"\u0128\u0131\u0139\u0145\u0153\u015c\u0162\u0169\u016f\u0171\u017e\u0185"+
|
|
"\u018d\u0190\u0194\u0197\u019e\u01a2\u01a5\u01a8\u01ae\u01b2\u01b6\u01ba"+
|
|
"\u01bd\u01c0";
|
|
public static final ATN _ATN =
|
|
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
|
|
static {
|
|
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
|
|
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
|
|
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
|
|
}
|
|
}
|
|
} |