example of parsing pdp7 with antlr4
This commit is contained in:
@@ -0,0 +1,281 @@
|
||||
/*
|
||||
BSD License
|
||||
|
||||
Copyright (c) 2013, Tom Everett
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of Tom Everett nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
grammar pdp7;
|
||||
|
||||
prog
|
||||
: line +
|
||||
;
|
||||
|
||||
line
|
||||
: declarations? comment? eol
|
||||
;
|
||||
|
||||
declarations
|
||||
: declaration (';' declaration)*
|
||||
;
|
||||
|
||||
// multiple labels can occur on the same line
|
||||
declaration
|
||||
: label* (instruction | assignment | expression)*
|
||||
;
|
||||
|
||||
instruction
|
||||
: opcode argument*
|
||||
;
|
||||
|
||||
argument
|
||||
: expression
|
||||
;
|
||||
|
||||
assignment
|
||||
: (variable | LOC | RELOC) '=' expression
|
||||
;
|
||||
|
||||
expression
|
||||
: multiplyingExpression ((PLUS | MINUS) multiplyingExpression)*
|
||||
;
|
||||
|
||||
multiplyingExpression
|
||||
: atom ((TIMES | DIV) atom)*
|
||||
;
|
||||
|
||||
atom
|
||||
: variable
|
||||
| LOC
|
||||
| RELOC
|
||||
| string
|
||||
| DECIMAL
|
||||
| DECIMAL_MINUS
|
||||
| OCTAL
|
||||
| signednumber
|
||||
;
|
||||
|
||||
// string chars, then potentially more than 1 octal constant, then potentially '>'
|
||||
string
|
||||
: STRING NUMERIC_LITERAL* '>'?
|
||||
;
|
||||
|
||||
signednumber
|
||||
: '-'? NUMERIC_LITERAL
|
||||
;
|
||||
|
||||
eol
|
||||
: EOL
|
||||
;
|
||||
|
||||
comment
|
||||
: COMMENT
|
||||
;
|
||||
|
||||
label
|
||||
: LABEL
|
||||
;
|
||||
|
||||
variable
|
||||
: IDENTIFIER
|
||||
;
|
||||
|
||||
opcode
|
||||
: 'dac'
|
||||
| 'jms'
|
||||
| 'dzm'
|
||||
| 'lac'
|
||||
| 'xor'
|
||||
| 'add'
|
||||
| 'tad'
|
||||
| 'xct'
|
||||
| 'isz'
|
||||
| 'and'
|
||||
| 'sad'
|
||||
| 'jmp'
|
||||
| 'nop'
|
||||
// | 'i'
|
||||
| 'law'
|
||||
| 'cma'
|
||||
| 'las'
|
||||
| 'ral'
|
||||
| 'rar'
|
||||
| 'hlt'
|
||||
| 'sma'
|
||||
| 'sza'
|
||||
| 'snl'
|
||||
| 'skp'
|
||||
| 'sna'
|
||||
| 'szl'
|
||||
| 'rtl'
|
||||
| 'rtr'
|
||||
| 'cil'
|
||||
| 'rcl'
|
||||
| 'rcr'
|
||||
| 'cia'
|
||||
| 'lrs'
|
||||
| 'lrss'
|
||||
| 'lls'
|
||||
| 'llss'
|
||||
| 'als'
|
||||
| 'alss'
|
||||
| 'mul'
|
||||
| 'idiv'
|
||||
| 'lacq'
|
||||
| 'clq'
|
||||
| 'omq'
|
||||
| 'cmq'
|
||||
| 'lmq'
|
||||
| 'dscs'
|
||||
| 'dslw'
|
||||
| 'dslm'
|
||||
| 'dsld'
|
||||
| 'dsls'
|
||||
| 'dssf'
|
||||
| 'dsrs'
|
||||
| 'iof'
|
||||
| 'ion'
|
||||
| 'caf'
|
||||
| 'clon'
|
||||
| 'clsf'
|
||||
| 'clof'
|
||||
| 'ksf'
|
||||
| 'krb'
|
||||
| 'tsf'
|
||||
| 'tcf'
|
||||
| 'tls'
|
||||
| 'sck'
|
||||
| 'cck'
|
||||
| 'lck'
|
||||
| 'rsf'
|
||||
| 'rsa'
|
||||
| 'rrb'
|
||||
| 'psf'
|
||||
| 'pcf'
|
||||
| 'psa'
|
||||
| 'cdf'
|
||||
| 'rlpd'
|
||||
| 'lda'
|
||||
| 'wcga'
|
||||
| 'raef'
|
||||
| 'rlpd'
|
||||
| 'beg'
|
||||
| 'spb'
|
||||
| 'cpb'
|
||||
| 'lpb'
|
||||
| 'wbl'
|
||||
| 'dprs'
|
||||
| 'dpsf'
|
||||
| 'dpcf'
|
||||
| 'dprc'
|
||||
| 'crsf'
|
||||
| 'crrb'
|
||||
| 'sys'
|
||||
| 'czm'
|
||||
| 'irss'
|
||||
| 'dsm'
|
||||
;
|
||||
|
||||
LOC
|
||||
: '.'
|
||||
;
|
||||
|
||||
|
||||
RELOC
|
||||
: '..'
|
||||
;
|
||||
|
||||
|
||||
PLUS
|
||||
: '+'
|
||||
;
|
||||
|
||||
|
||||
MINUS
|
||||
: '-'
|
||||
;
|
||||
|
||||
|
||||
TIMES
|
||||
: '*'
|
||||
;
|
||||
|
||||
|
||||
DIV
|
||||
: '/'
|
||||
;
|
||||
|
||||
|
||||
LABEL
|
||||
: [a-zA-Z0-9.] + ':'
|
||||
;
|
||||
|
||||
|
||||
// the period is considered a letter
|
||||
IDENTIFIER
|
||||
: [a-zA-Z] [a-zA-Z0-9.]*
|
||||
;
|
||||
|
||||
|
||||
NUMERIC_LITERAL
|
||||
: [0-9][0-9a-f]*
|
||||
;
|
||||
|
||||
DECIMAL
|
||||
: 'd' [0-9] +
|
||||
;
|
||||
|
||||
|
||||
OCTAL
|
||||
: 'o' [0-7] +
|
||||
;
|
||||
|
||||
|
||||
DECIMAL_MINUS
|
||||
: 'dm' [0-9] +
|
||||
;
|
||||
|
||||
|
||||
STRING
|
||||
: '<' [a-zA-Z0-9$*,%/]*
|
||||
;
|
||||
|
||||
|
||||
COMMENT
|
||||
: '"' ~ [\r\n]*
|
||||
;
|
||||
|
||||
|
||||
EOL
|
||||
: [\r\n]+
|
||||
;
|
||||
|
||||
|
||||
WS
|
||||
: [ \t] -> skip
|
||||
;
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.khubla.pdp7parse;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
|
||||
import org.apache.commons.cli.CommandLine;
|
||||
import org.apache.commons.cli.CommandLineParser;
|
||||
import org.apache.commons.cli.HelpFormatter;
|
||||
import org.apache.commons.cli.Option;
|
||||
import org.apache.commons.cli.OptionBuilder;
|
||||
import org.apache.commons.cli.Options;
|
||||
import org.apache.commons.cli.PosixParser;
|
||||
|
||||
/**
|
||||
* @author tom
|
||||
*/
|
||||
public class PDP7Parse {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
System.out.println("khubla.com PDP7 Parser");
|
||||
/*
|
||||
* options
|
||||
*/
|
||||
final Options options = new Options();
|
||||
OptionBuilder.withArgName(INPUT_FILE_OPTION);
|
||||
OptionBuilder.isRequired();
|
||||
OptionBuilder.withType(String.class);
|
||||
OptionBuilder.hasArg();
|
||||
OptionBuilder.withDescription("file to read");
|
||||
final Option ifo = OptionBuilder.create(INPUT_FILE_OPTION);
|
||||
options.addOption(ifo);
|
||||
/*
|
||||
* parse
|
||||
*/
|
||||
final CommandLineParser parser = new PosixParser();
|
||||
CommandLine cmd = null;
|
||||
try {
|
||||
cmd = parser.parse(options, args);
|
||||
} catch (final Exception e) {
|
||||
e.printStackTrace();
|
||||
final HelpFormatter formatter = new HelpFormatter();
|
||||
formatter.printHelp("posix", options);
|
||||
System.exit(0);
|
||||
}
|
||||
/*
|
||||
* get file
|
||||
*/
|
||||
final String inputFileName = cmd.getOptionValue(INPUT_FILE_OPTION);
|
||||
final File inputFile = new File(inputFileName);
|
||||
if (inputFile.exists()) {
|
||||
PDP7Parser.parse(new FileInputStream(inputFile), System.out);
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* file option
|
||||
*/
|
||||
private static final String INPUT_FILE_OPTION = "file";
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.khubla.pdp7parse;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.io.Reader;
|
||||
|
||||
import org.antlr.v4.runtime.ANTLRInputStream;
|
||||
import org.antlr.v4.runtime.CommonTokenStream;
|
||||
|
||||
import com.khubla.pdp7parse.antlr4.pdp7Lexer;
|
||||
import com.khubla.pdp7parse.antlr4.pdp7Parser;
|
||||
import com.khubla.pdp7parse.antlr4.pdp7Parser.ProgContext;
|
||||
|
||||
public class PDP7Parser {
|
||||
public static ProgContext parse(InputStream inputStream, OutputStream outputStream) throws Exception {
|
||||
try {
|
||||
if (null != inputStream) {
|
||||
final Reader reader = new InputStreamReader(inputStream, "UTF-8");
|
||||
final pdp7Lexer lexer = new pdp7Lexer(new ANTLRInputStream(reader));
|
||||
final CommonTokenStream commonTokenStream = new CommonTokenStream(lexer);
|
||||
final pdp7Parser parser = new pdp7Parser(commonTokenStream);
|
||||
return parser.prog();
|
||||
} else {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
throw new Exception("Exception reading and parsing file", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,244 @@
|
||||
// Generated from com/khubla/pdp7parse/antlr4/pdp7.g4 by ANTLR 4.5
|
||||
package com.khubla.pdp7parse.antlr4;
|
||||
|
||||
import org.antlr.v4.runtime.ParserRuleContext;
|
||||
import org.antlr.v4.runtime.misc.NotNull;
|
||||
import org.antlr.v4.runtime.tree.ErrorNode;
|
||||
import org.antlr.v4.runtime.tree.TerminalNode;
|
||||
|
||||
/**
|
||||
* This class provides an empty implementation of {@link pdp7Listener},
|
||||
* which can be extended to create a listener which only needs to handle a subset
|
||||
* of the available methods.
|
||||
*/
|
||||
public class pdp7BaseListener implements pdp7Listener {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterProg(pdp7Parser.ProgContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitProg(pdp7Parser.ProgContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterLine(pdp7Parser.LineContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitLine(pdp7Parser.LineContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterDeclarations(pdp7Parser.DeclarationsContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitDeclarations(pdp7Parser.DeclarationsContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterDeclaration(pdp7Parser.DeclarationContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitDeclaration(pdp7Parser.DeclarationContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterInstruction(pdp7Parser.InstructionContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitInstruction(pdp7Parser.InstructionContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterArgument(pdp7Parser.ArgumentContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitArgument(pdp7Parser.ArgumentContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterAssignment(pdp7Parser.AssignmentContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitAssignment(pdp7Parser.AssignmentContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterExpression(pdp7Parser.ExpressionContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitExpression(pdp7Parser.ExpressionContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterMultiplyingExpression(pdp7Parser.MultiplyingExpressionContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitMultiplyingExpression(pdp7Parser.MultiplyingExpressionContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterAtom(pdp7Parser.AtomContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitAtom(pdp7Parser.AtomContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterString(pdp7Parser.StringContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitString(pdp7Parser.StringContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterSignednumber(pdp7Parser.SignednumberContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitSignednumber(pdp7Parser.SignednumberContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterEol(pdp7Parser.EolContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitEol(pdp7Parser.EolContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterComment(pdp7Parser.CommentContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitComment(pdp7Parser.CommentContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterLabel(pdp7Parser.LabelContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitLabel(pdp7Parser.LabelContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterVariable(pdp7Parser.VariableContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitVariable(pdp7Parser.VariableContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterOpcode(pdp7Parser.OpcodeContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitOpcode(pdp7Parser.OpcodeContext ctx) { }
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterEveryRule(ParserRuleContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitEveryRule(ParserRuleContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void visitTerminal(TerminalNode node) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void visitErrorNode(ErrorNode node) { }
|
||||
}
|
||||
@@ -0,0 +1,372 @@
|
||||
// Generated from com/khubla/pdp7parse/antlr4/pdp7.g4 by ANTLR 4.5
|
||||
package com.khubla.pdp7parse.antlr4;
|
||||
import org.antlr.v4.runtime.Lexer;
|
||||
import org.antlr.v4.runtime.CharStream;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
import org.antlr.v4.runtime.TokenStream;
|
||||
import org.antlr.v4.runtime.*;
|
||||
import org.antlr.v4.runtime.atn.*;
|
||||
import org.antlr.v4.runtime.dfa.DFA;
|
||||
import org.antlr.v4.runtime.misc.*;
|
||||
|
||||
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
|
||||
public class pdp7Lexer extends Lexer {
|
||||
static { RuntimeMetaData.checkVersion("4.5", 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,
|
||||
T__87=88, T__88=89, T__89=90, T__90=91, T__91=92, T__92=93, T__93=94,
|
||||
LOC=95, RELOC=96, PLUS=97, MINUS=98, TIMES=99, DIV=100, LABEL=101, IDENTIFIER=102,
|
||||
NUMERIC_LITERAL=103, DECIMAL=104, OCTAL=105, DECIMAL_MINUS=106, STRING=107,
|
||||
COMMENT=108, EOL=109, WS=110;
|
||||
public static String[] modeNames = {
|
||||
"DEFAULT_MODE"
|
||||
};
|
||||
|
||||
public static final String[] ruleNames = {
|
||||
"T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8",
|
||||
"T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16",
|
||||
"T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24",
|
||||
"T__25", "T__26", "T__27", "T__28", "T__29", "T__30", "T__31", "T__32",
|
||||
"T__33", "T__34", "T__35", "T__36", "T__37", "T__38", "T__39", "T__40",
|
||||
"T__41", "T__42", "T__43", "T__44", "T__45", "T__46", "T__47", "T__48",
|
||||
"T__49", "T__50", "T__51", "T__52", "T__53", "T__54", "T__55", "T__56",
|
||||
"T__57", "T__58", "T__59", "T__60", "T__61", "T__62", "T__63", "T__64",
|
||||
"T__65", "T__66", "T__67", "T__68", "T__69", "T__70", "T__71", "T__72",
|
||||
"T__73", "T__74", "T__75", "T__76", "T__77", "T__78", "T__79", "T__80",
|
||||
"T__81", "T__82", "T__83", "T__84", "T__85", "T__86", "T__87", "T__88",
|
||||
"T__89", "T__90", "T__91", "T__92", "T__93", "LOC", "RELOC", "PLUS", "MINUS",
|
||||
"TIMES", "DIV", "LABEL", "IDENTIFIER", "NUMERIC_LITERAL", "DECIMAL", "OCTAL",
|
||||
"DECIMAL_MINUS", "STRING", "COMMENT", "EOL", "WS"
|
||||
};
|
||||
|
||||
private static final String[] _LITERAL_NAMES = {
|
||||
null, "';'", "'='", "'>'", "'dac'", "'jms'", "'dzm'", "'lac'", "'xor'",
|
||||
"'add'", "'tad'", "'xct'", "'isz'", "'and'", "'sad'", "'jmp'", "'nop'",
|
||||
"'law'", "'cma'", "'las'", "'ral'", "'rar'", "'hlt'", "'sma'", "'sza'",
|
||||
"'snl'", "'skp'", "'sna'", "'szl'", "'rtl'", "'rtr'", "'cil'", "'rcl'",
|
||||
"'rcr'", "'cia'", "'lrs'", "'lrss'", "'lls'", "'llss'", "'als'", "'alss'",
|
||||
"'mul'", "'idiv'", "'lacq'", "'clq'", "'omq'", "'cmq'", "'lmq'", "'dscs'",
|
||||
"'dslw'", "'dslm'", "'dsld'", "'dsls'", "'dssf'", "'dsrs'", "'iof'", "'ion'",
|
||||
"'caf'", "'clon'", "'clsf'", "'clof'", "'ksf'", "'krb'", "'tsf'", "'tcf'",
|
||||
"'tls'", "'sck'", "'cck'", "'lck'", "'rsf'", "'rsa'", "'rrb'", "'psf'",
|
||||
"'pcf'", "'psa'", "'cdf'", "'rlpd'", "'lda'", "'wcga'", "'raef'", "'beg'",
|
||||
"'spb'", "'cpb'", "'lpb'", "'wbl'", "'dprs'", "'dpsf'", "'dpcf'", "'dprc'",
|
||||
"'crsf'", "'crrb'", "'sys'", "'czm'", "'irss'", "'dsm'", "'.'", "'..'",
|
||||
"'+'", "'-'", "'*'", "'/'"
|
||||
};
|
||||
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, null, null, null, null, null, null, null, "LOC",
|
||||
"RELOC", "PLUS", "MINUS", "TIMES", "DIV", "LABEL", "IDENTIFIER", "NUMERIC_LITERAL",
|
||||
"DECIMAL", "OCTAL", "DECIMAL_MINUS", "STRING", "COMMENT", "EOL", "WS"
|
||||
};
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
public pdp7Lexer(CharStream input) {
|
||||
super(input);
|
||||
_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGrammarFileName() { return "pdp7.g4"; }
|
||||
|
||||
@Override
|
||||
public String[] getRuleNames() { return ruleNames; }
|
||||
|
||||
@Override
|
||||
public String getSerializedATN() { return _serializedATN; }
|
||||
|
||||
@Override
|
||||
public String[] getModeNames() { return modeNames; }
|
||||
|
||||
@Override
|
||||
public ATN getATN() { return _ATN; }
|
||||
|
||||
public static final String _serializedATN =
|
||||
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2p\u02b7\b\1\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/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+
|
||||
"\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+
|
||||
"\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+
|
||||
"\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+
|
||||
"\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+
|
||||
"`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+
|
||||
"k\4l\tl\4m\tm\4n\tn\4o\to\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\5\3\5\3\6"+
|
||||
"\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\n\3\n\3"+
|
||||
"\n\3\n\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\16\3\16\3"+
|
||||
"\16\3\16\3\17\3\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\3\22\3\23\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\25\3\25\3"+
|
||||
"\25\3\25\3\26\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3"+
|
||||
"\31\3\31\3\31\3\31\3\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3\34\3\34\3"+
|
||||
"\34\3\34\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3\37\3\37\3\37\3\37\3"+
|
||||
" \3 \3 \3 \3!\3!\3!\3!\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3$\3$\3$\3$\3%\3%\3"+
|
||||
"%\3%\3%\3&\3&\3&\3&\3\'\3\'\3\'\3\'\3\'\3(\3(\3(\3(\3)\3)\3)\3)\3)\3*"+
|
||||
"\3*\3*\3*\3+\3+\3+\3+\3+\3,\3,\3,\3,\3,\3-\3-\3-\3-\3.\3.\3.\3.\3/\3/"+
|
||||
"\3/\3/\3\60\3\60\3\60\3\60\3\61\3\61\3\61\3\61\3\61\3\62\3\62\3\62\3\62"+
|
||||
"\3\62\3\63\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3\64\3\64\3\65\3\65\3\65"+
|
||||
"\3\65\3\65\3\66\3\66\3\66\3\66\3\66\3\67\3\67\3\67\3\67\3\67\38\38\38"+
|
||||
"\38\39\39\39\39\3:\3:\3:\3:\3;\3;\3;\3;\3;\3<\3<\3<\3<\3<\3=\3=\3=\3="+
|
||||
"\3=\3>\3>\3>\3>\3?\3?\3?\3?\3@\3@\3@\3@\3A\3A\3A\3A\3B\3B\3B\3B\3C\3C"+
|
||||
"\3C\3C\3D\3D\3D\3D\3E\3E\3E\3E\3F\3F\3F\3F\3G\3G\3G\3G\3H\3H\3H\3H\3I"+
|
||||
"\3I\3I\3I\3J\3J\3J\3J\3K\3K\3K\3K\3L\3L\3L\3L\3M\3M\3M\3M\3M\3N\3N\3N"+
|
||||
"\3N\3O\3O\3O\3O\3O\3P\3P\3P\3P\3P\3Q\3Q\3Q\3Q\3R\3R\3R\3R\3S\3S\3S\3S"+
|
||||
"\3T\3T\3T\3T\3U\3U\3U\3U\3V\3V\3V\3V\3V\3W\3W\3W\3W\3W\3X\3X\3X\3X\3X"+
|
||||
"\3Y\3Y\3Y\3Y\3Y\3Z\3Z\3Z\3Z\3Z\3[\3[\3[\3[\3[\3\\\3\\\3\\\3\\\3]\3]\3"+
|
||||
"]\3]\3^\3^\3^\3^\3^\3_\3_\3_\3_\3`\3`\3a\3a\3a\3b\3b\3c\3c\3d\3d\3e\3"+
|
||||
"e\3f\6f\u0279\nf\rf\16f\u027a\3f\3f\3g\3g\7g\u0281\ng\fg\16g\u0284\13"+
|
||||
"g\3h\3h\7h\u0288\nh\fh\16h\u028b\13h\3i\3i\6i\u028f\ni\ri\16i\u0290\3"+
|
||||
"j\3j\6j\u0295\nj\rj\16j\u0296\3k\3k\3k\3k\6k\u029d\nk\rk\16k\u029e\3l"+
|
||||
"\3l\7l\u02a3\nl\fl\16l\u02a6\13l\3m\3m\7m\u02aa\nm\fm\16m\u02ad\13m\3"+
|
||||
"n\6n\u02b0\nn\rn\16n\u02b1\3o\3o\3o\3o\2\2p\3\3\5\4\7\5\t\6\13\7\r\b\17"+
|
||||
"\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+"+
|
||||
"\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+"+
|
||||
"U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66k\67m8o9q:s;u<w=y>{?}@\177A\u0081"+
|
||||
"B\u0083C\u0085D\u0087E\u0089F\u008bG\u008dH\u008fI\u0091J\u0093K\u0095"+
|
||||
"L\u0097M\u0099N\u009bO\u009dP\u009fQ\u00a1R\u00a3S\u00a5T\u00a7U\u00a9"+
|
||||
"V\u00abW\u00adX\u00afY\u00b1Z\u00b3[\u00b5\\\u00b7]\u00b9^\u00bb_\u00bd"+
|
||||
"`\u00bfa\u00c1b\u00c3c\u00c5d\u00c7e\u00c9f\u00cbg\u00cdh\u00cfi\u00d1"+
|
||||
"j\u00d3k\u00d5l\u00d7m\u00d9n\u00dbo\u00ddp\3\2\n\6\2\60\60\62;C\\c|\4"+
|
||||
"\2C\\c|\3\2\62;\4\2\62;ch\3\2\629\b\2&\',,..\61;C\\c|\4\2\f\f\17\17\4"+
|
||||
"\2\13\13\"\"\u02bf\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13"+
|
||||
"\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2"+
|
||||
"\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2"+
|
||||
"!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3"+
|
||||
"\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2"+
|
||||
"\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E"+
|
||||
"\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2"+
|
||||
"\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2"+
|
||||
"\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2k"+
|
||||
"\3\2\2\2\2m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w\3\2"+
|
||||
"\2\2\2y\3\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\2\u0081\3\2\2\2\2"+
|
||||
"\u0083\3\2\2\2\2\u0085\3\2\2\2\2\u0087\3\2\2\2\2\u0089\3\2\2\2\2\u008b"+
|
||||
"\3\2\2\2\2\u008d\3\2\2\2\2\u008f\3\2\2\2\2\u0091\3\2\2\2\2\u0093\3\2\2"+
|
||||
"\2\2\u0095\3\2\2\2\2\u0097\3\2\2\2\2\u0099\3\2\2\2\2\u009b\3\2\2\2\2\u009d"+
|
||||
"\3\2\2\2\2\u009f\3\2\2\2\2\u00a1\3\2\2\2\2\u00a3\3\2\2\2\2\u00a5\3\2\2"+
|
||||
"\2\2\u00a7\3\2\2\2\2\u00a9\3\2\2\2\2\u00ab\3\2\2\2\2\u00ad\3\2\2\2\2\u00af"+
|
||||
"\3\2\2\2\2\u00b1\3\2\2\2\2\u00b3\3\2\2\2\2\u00b5\3\2\2\2\2\u00b7\3\2\2"+
|
||||
"\2\2\u00b9\3\2\2\2\2\u00bb\3\2\2\2\2\u00bd\3\2\2\2\2\u00bf\3\2\2\2\2\u00c1"+
|
||||
"\3\2\2\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7\3\2\2\2\2\u00c9\3\2\2"+
|
||||
"\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2\2\2\u00d1\3\2\2\2\2\u00d3"+
|
||||
"\3\2\2\2\2\u00d5\3\2\2\2\2\u00d7\3\2\2\2\2\u00d9\3\2\2\2\2\u00db\3\2\2"+
|
||||
"\2\2\u00dd\3\2\2\2\3\u00df\3\2\2\2\5\u00e1\3\2\2\2\7\u00e3\3\2\2\2\t\u00e5"+
|
||||
"\3\2\2\2\13\u00e9\3\2\2\2\r\u00ed\3\2\2\2\17\u00f1\3\2\2\2\21\u00f5\3"+
|
||||
"\2\2\2\23\u00f9\3\2\2\2\25\u00fd\3\2\2\2\27\u0101\3\2\2\2\31\u0105\3\2"+
|
||||
"\2\2\33\u0109\3\2\2\2\35\u010d\3\2\2\2\37\u0111\3\2\2\2!\u0115\3\2\2\2"+
|
||||
"#\u0119\3\2\2\2%\u011d\3\2\2\2\'\u0121\3\2\2\2)\u0125\3\2\2\2+\u0129\3"+
|
||||
"\2\2\2-\u012d\3\2\2\2/\u0131\3\2\2\2\61\u0135\3\2\2\2\63\u0139\3\2\2\2"+
|
||||
"\65\u013d\3\2\2\2\67\u0141\3\2\2\29\u0145\3\2\2\2;\u0149\3\2\2\2=\u014d"+
|
||||
"\3\2\2\2?\u0151\3\2\2\2A\u0155\3\2\2\2C\u0159\3\2\2\2E\u015d\3\2\2\2G"+
|
||||
"\u0161\3\2\2\2I\u0165\3\2\2\2K\u016a\3\2\2\2M\u016e\3\2\2\2O\u0173\3\2"+
|
||||
"\2\2Q\u0177\3\2\2\2S\u017c\3\2\2\2U\u0180\3\2\2\2W\u0185\3\2\2\2Y\u018a"+
|
||||
"\3\2\2\2[\u018e\3\2\2\2]\u0192\3\2\2\2_\u0196\3\2\2\2a\u019a\3\2\2\2c"+
|
||||
"\u019f\3\2\2\2e\u01a4\3\2\2\2g\u01a9\3\2\2\2i\u01ae\3\2\2\2k\u01b3\3\2"+
|
||||
"\2\2m\u01b8\3\2\2\2o\u01bd\3\2\2\2q\u01c1\3\2\2\2s\u01c5\3\2\2\2u\u01c9"+
|
||||
"\3\2\2\2w\u01ce\3\2\2\2y\u01d3\3\2\2\2{\u01d8\3\2\2\2}\u01dc\3\2\2\2\177"+
|
||||
"\u01e0\3\2\2\2\u0081\u01e4\3\2\2\2\u0083\u01e8\3\2\2\2\u0085\u01ec\3\2"+
|
||||
"\2\2\u0087\u01f0\3\2\2\2\u0089\u01f4\3\2\2\2\u008b\u01f8\3\2\2\2\u008d"+
|
||||
"\u01fc\3\2\2\2\u008f\u0200\3\2\2\2\u0091\u0204\3\2\2\2\u0093\u0208\3\2"+
|
||||
"\2\2\u0095\u020c\3\2\2\2\u0097\u0210\3\2\2\2\u0099\u0214\3\2\2\2\u009b"+
|
||||
"\u0219\3\2\2\2\u009d\u021d\3\2\2\2\u009f\u0222\3\2\2\2\u00a1\u0227\3\2"+
|
||||
"\2\2\u00a3\u022b\3\2\2\2\u00a5\u022f\3\2\2\2\u00a7\u0233\3\2\2\2\u00a9"+
|
||||
"\u0237\3\2\2\2\u00ab\u023b\3\2\2\2\u00ad\u0240\3\2\2\2\u00af\u0245\3\2"+
|
||||
"\2\2\u00b1\u024a\3\2\2\2\u00b3\u024f\3\2\2\2\u00b5\u0254\3\2\2\2\u00b7"+
|
||||
"\u0259\3\2\2\2\u00b9\u025d\3\2\2\2\u00bb\u0261\3\2\2\2\u00bd\u0266\3\2"+
|
||||
"\2\2\u00bf\u026a\3\2\2\2\u00c1\u026c\3\2\2\2\u00c3\u026f\3\2\2\2\u00c5"+
|
||||
"\u0271\3\2\2\2\u00c7\u0273\3\2\2\2\u00c9\u0275\3\2\2\2\u00cb\u0278\3\2"+
|
||||
"\2\2\u00cd\u027e\3\2\2\2\u00cf\u0285\3\2\2\2\u00d1\u028c\3\2\2\2\u00d3"+
|
||||
"\u0292\3\2\2\2\u00d5\u0298\3\2\2\2\u00d7\u02a0\3\2\2\2\u00d9\u02a7\3\2"+
|
||||
"\2\2\u00db\u02af\3\2\2\2\u00dd\u02b3\3\2\2\2\u00df\u00e0\7=\2\2\u00e0"+
|
||||
"\4\3\2\2\2\u00e1\u00e2\7?\2\2\u00e2\6\3\2\2\2\u00e3\u00e4\7@\2\2\u00e4"+
|
||||
"\b\3\2\2\2\u00e5\u00e6\7f\2\2\u00e6\u00e7\7c\2\2\u00e7\u00e8\7e\2\2\u00e8"+
|
||||
"\n\3\2\2\2\u00e9\u00ea\7l\2\2\u00ea\u00eb\7o\2\2\u00eb\u00ec\7u\2\2\u00ec"+
|
||||
"\f\3\2\2\2\u00ed\u00ee\7f\2\2\u00ee\u00ef\7|\2\2\u00ef\u00f0\7o\2\2\u00f0"+
|
||||
"\16\3\2\2\2\u00f1\u00f2\7n\2\2\u00f2\u00f3\7c\2\2\u00f3\u00f4\7e\2\2\u00f4"+
|
||||
"\20\3\2\2\2\u00f5\u00f6\7z\2\2\u00f6\u00f7\7q\2\2\u00f7\u00f8\7t\2\2\u00f8"+
|
||||
"\22\3\2\2\2\u00f9\u00fa\7c\2\2\u00fa\u00fb\7f\2\2\u00fb\u00fc\7f\2\2\u00fc"+
|
||||
"\24\3\2\2\2\u00fd\u00fe\7v\2\2\u00fe\u00ff\7c\2\2\u00ff\u0100\7f\2\2\u0100"+
|
||||
"\26\3\2\2\2\u0101\u0102\7z\2\2\u0102\u0103\7e\2\2\u0103\u0104\7v\2\2\u0104"+
|
||||
"\30\3\2\2\2\u0105\u0106\7k\2\2\u0106\u0107\7u\2\2\u0107\u0108\7|\2\2\u0108"+
|
||||
"\32\3\2\2\2\u0109\u010a\7c\2\2\u010a\u010b\7p\2\2\u010b\u010c\7f\2\2\u010c"+
|
||||
"\34\3\2\2\2\u010d\u010e\7u\2\2\u010e\u010f\7c\2\2\u010f\u0110\7f\2\2\u0110"+
|
||||
"\36\3\2\2\2\u0111\u0112\7l\2\2\u0112\u0113\7o\2\2\u0113\u0114\7r\2\2\u0114"+
|
||||
" \3\2\2\2\u0115\u0116\7p\2\2\u0116\u0117\7q\2\2\u0117\u0118\7r\2\2\u0118"+
|
||||
"\"\3\2\2\2\u0119\u011a\7n\2\2\u011a\u011b\7c\2\2\u011b\u011c\7y\2\2\u011c"+
|
||||
"$\3\2\2\2\u011d\u011e\7e\2\2\u011e\u011f\7o\2\2\u011f\u0120\7c\2\2\u0120"+
|
||||
"&\3\2\2\2\u0121\u0122\7n\2\2\u0122\u0123\7c\2\2\u0123\u0124\7u\2\2\u0124"+
|
||||
"(\3\2\2\2\u0125\u0126\7t\2\2\u0126\u0127\7c\2\2\u0127\u0128\7n\2\2\u0128"+
|
||||
"*\3\2\2\2\u0129\u012a\7t\2\2\u012a\u012b\7c\2\2\u012b\u012c\7t\2\2\u012c"+
|
||||
",\3\2\2\2\u012d\u012e\7j\2\2\u012e\u012f\7n\2\2\u012f\u0130\7v\2\2\u0130"+
|
||||
".\3\2\2\2\u0131\u0132\7u\2\2\u0132\u0133\7o\2\2\u0133\u0134\7c\2\2\u0134"+
|
||||
"\60\3\2\2\2\u0135\u0136\7u\2\2\u0136\u0137\7|\2\2\u0137\u0138\7c\2\2\u0138"+
|
||||
"\62\3\2\2\2\u0139\u013a\7u\2\2\u013a\u013b\7p\2\2\u013b\u013c\7n\2\2\u013c"+
|
||||
"\64\3\2\2\2\u013d\u013e\7u\2\2\u013e\u013f\7m\2\2\u013f\u0140\7r\2\2\u0140"+
|
||||
"\66\3\2\2\2\u0141\u0142\7u\2\2\u0142\u0143\7p\2\2\u0143\u0144\7c\2\2\u0144"+
|
||||
"8\3\2\2\2\u0145\u0146\7u\2\2\u0146\u0147\7|\2\2\u0147\u0148\7n\2\2\u0148"+
|
||||
":\3\2\2\2\u0149\u014a\7t\2\2\u014a\u014b\7v\2\2\u014b\u014c\7n\2\2\u014c"+
|
||||
"<\3\2\2\2\u014d\u014e\7t\2\2\u014e\u014f\7v\2\2\u014f\u0150\7t\2\2\u0150"+
|
||||
">\3\2\2\2\u0151\u0152\7e\2\2\u0152\u0153\7k\2\2\u0153\u0154\7n\2\2\u0154"+
|
||||
"@\3\2\2\2\u0155\u0156\7t\2\2\u0156\u0157\7e\2\2\u0157\u0158\7n\2\2\u0158"+
|
||||
"B\3\2\2\2\u0159\u015a\7t\2\2\u015a\u015b\7e\2\2\u015b\u015c\7t\2\2\u015c"+
|
||||
"D\3\2\2\2\u015d\u015e\7e\2\2\u015e\u015f\7k\2\2\u015f\u0160\7c\2\2\u0160"+
|
||||
"F\3\2\2\2\u0161\u0162\7n\2\2\u0162\u0163\7t\2\2\u0163\u0164\7u\2\2\u0164"+
|
||||
"H\3\2\2\2\u0165\u0166\7n\2\2\u0166\u0167\7t\2\2\u0167\u0168\7u\2\2\u0168"+
|
||||
"\u0169\7u\2\2\u0169J\3\2\2\2\u016a\u016b\7n\2\2\u016b\u016c\7n\2\2\u016c"+
|
||||
"\u016d\7u\2\2\u016dL\3\2\2\2\u016e\u016f\7n\2\2\u016f\u0170\7n\2\2\u0170"+
|
||||
"\u0171\7u\2\2\u0171\u0172\7u\2\2\u0172N\3\2\2\2\u0173\u0174\7c\2\2\u0174"+
|
||||
"\u0175\7n\2\2\u0175\u0176\7u\2\2\u0176P\3\2\2\2\u0177\u0178\7c\2\2\u0178"+
|
||||
"\u0179\7n\2\2\u0179\u017a\7u\2\2\u017a\u017b\7u\2\2\u017bR\3\2\2\2\u017c"+
|
||||
"\u017d\7o\2\2\u017d\u017e\7w\2\2\u017e\u017f\7n\2\2\u017fT\3\2\2\2\u0180"+
|
||||
"\u0181\7k\2\2\u0181\u0182\7f\2\2\u0182\u0183\7k\2\2\u0183\u0184\7x\2\2"+
|
||||
"\u0184V\3\2\2\2\u0185\u0186\7n\2\2\u0186\u0187\7c\2\2\u0187\u0188\7e\2"+
|
||||
"\2\u0188\u0189\7s\2\2\u0189X\3\2\2\2\u018a\u018b\7e\2\2\u018b\u018c\7"+
|
||||
"n\2\2\u018c\u018d\7s\2\2\u018dZ\3\2\2\2\u018e\u018f\7q\2\2\u018f\u0190"+
|
||||
"\7o\2\2\u0190\u0191\7s\2\2\u0191\\\3\2\2\2\u0192\u0193\7e\2\2\u0193\u0194"+
|
||||
"\7o\2\2\u0194\u0195\7s\2\2\u0195^\3\2\2\2\u0196\u0197\7n\2\2\u0197\u0198"+
|
||||
"\7o\2\2\u0198\u0199\7s\2\2\u0199`\3\2\2\2\u019a\u019b\7f\2\2\u019b\u019c"+
|
||||
"\7u\2\2\u019c\u019d\7e\2\2\u019d\u019e\7u\2\2\u019eb\3\2\2\2\u019f\u01a0"+
|
||||
"\7f\2\2\u01a0\u01a1\7u\2\2\u01a1\u01a2\7n\2\2\u01a2\u01a3\7y\2\2\u01a3"+
|
||||
"d\3\2\2\2\u01a4\u01a5\7f\2\2\u01a5\u01a6\7u\2\2\u01a6\u01a7\7n\2\2\u01a7"+
|
||||
"\u01a8\7o\2\2\u01a8f\3\2\2\2\u01a9\u01aa\7f\2\2\u01aa\u01ab\7u\2\2\u01ab"+
|
||||
"\u01ac\7n\2\2\u01ac\u01ad\7f\2\2\u01adh\3\2\2\2\u01ae\u01af\7f\2\2\u01af"+
|
||||
"\u01b0\7u\2\2\u01b0\u01b1\7n\2\2\u01b1\u01b2\7u\2\2\u01b2j\3\2\2\2\u01b3"+
|
||||
"\u01b4\7f\2\2\u01b4\u01b5\7u\2\2\u01b5\u01b6\7u\2\2\u01b6\u01b7\7h\2\2"+
|
||||
"\u01b7l\3\2\2\2\u01b8\u01b9\7f\2\2\u01b9\u01ba\7u\2\2\u01ba\u01bb\7t\2"+
|
||||
"\2\u01bb\u01bc\7u\2\2\u01bcn\3\2\2\2\u01bd\u01be\7k\2\2\u01be\u01bf\7"+
|
||||
"q\2\2\u01bf\u01c0\7h\2\2\u01c0p\3\2\2\2\u01c1\u01c2\7k\2\2\u01c2\u01c3"+
|
||||
"\7q\2\2\u01c3\u01c4\7p\2\2\u01c4r\3\2\2\2\u01c5\u01c6\7e\2\2\u01c6\u01c7"+
|
||||
"\7c\2\2\u01c7\u01c8\7h\2\2\u01c8t\3\2\2\2\u01c9\u01ca\7e\2\2\u01ca\u01cb"+
|
||||
"\7n\2\2\u01cb\u01cc\7q\2\2\u01cc\u01cd\7p\2\2\u01cdv\3\2\2\2\u01ce\u01cf"+
|
||||
"\7e\2\2\u01cf\u01d0\7n\2\2\u01d0\u01d1\7u\2\2\u01d1\u01d2\7h\2\2\u01d2"+
|
||||
"x\3\2\2\2\u01d3\u01d4\7e\2\2\u01d4\u01d5\7n\2\2\u01d5\u01d6\7q\2\2\u01d6"+
|
||||
"\u01d7\7h\2\2\u01d7z\3\2\2\2\u01d8\u01d9\7m\2\2\u01d9\u01da\7u\2\2\u01da"+
|
||||
"\u01db\7h\2\2\u01db|\3\2\2\2\u01dc\u01dd\7m\2\2\u01dd\u01de\7t\2\2\u01de"+
|
||||
"\u01df\7d\2\2\u01df~\3\2\2\2\u01e0\u01e1\7v\2\2\u01e1\u01e2\7u\2\2\u01e2"+
|
||||
"\u01e3\7h\2\2\u01e3\u0080\3\2\2\2\u01e4\u01e5\7v\2\2\u01e5\u01e6\7e\2"+
|
||||
"\2\u01e6\u01e7\7h\2\2\u01e7\u0082\3\2\2\2\u01e8\u01e9\7v\2\2\u01e9\u01ea"+
|
||||
"\7n\2\2\u01ea\u01eb\7u\2\2\u01eb\u0084\3\2\2\2\u01ec\u01ed\7u\2\2\u01ed"+
|
||||
"\u01ee\7e\2\2\u01ee\u01ef\7m\2\2\u01ef\u0086\3\2\2\2\u01f0\u01f1\7e\2"+
|
||||
"\2\u01f1\u01f2\7e\2\2\u01f2\u01f3\7m\2\2\u01f3\u0088\3\2\2\2\u01f4\u01f5"+
|
||||
"\7n\2\2\u01f5\u01f6\7e\2\2\u01f6\u01f7\7m\2\2\u01f7\u008a\3\2\2\2\u01f8"+
|
||||
"\u01f9\7t\2\2\u01f9\u01fa\7u\2\2\u01fa\u01fb\7h\2\2\u01fb\u008c\3\2\2"+
|
||||
"\2\u01fc\u01fd\7t\2\2\u01fd\u01fe\7u\2\2\u01fe\u01ff\7c\2\2\u01ff\u008e"+
|
||||
"\3\2\2\2\u0200\u0201\7t\2\2\u0201\u0202\7t\2\2\u0202\u0203\7d\2\2\u0203"+
|
||||
"\u0090\3\2\2\2\u0204\u0205\7r\2\2\u0205\u0206\7u\2\2\u0206\u0207\7h\2"+
|
||||
"\2\u0207\u0092\3\2\2\2\u0208\u0209\7r\2\2\u0209\u020a\7e\2\2\u020a\u020b"+
|
||||
"\7h\2\2\u020b\u0094\3\2\2\2\u020c\u020d\7r\2\2\u020d\u020e\7u\2\2\u020e"+
|
||||
"\u020f\7c\2\2\u020f\u0096\3\2\2\2\u0210\u0211\7e\2\2\u0211\u0212\7f\2"+
|
||||
"\2\u0212\u0213\7h\2\2\u0213\u0098\3\2\2\2\u0214\u0215\7t\2\2\u0215\u0216"+
|
||||
"\7n\2\2\u0216\u0217\7r\2\2\u0217\u0218\7f\2\2\u0218\u009a\3\2\2\2\u0219"+
|
||||
"\u021a\7n\2\2\u021a\u021b\7f\2\2\u021b\u021c\7c\2\2\u021c\u009c\3\2\2"+
|
||||
"\2\u021d\u021e\7y\2\2\u021e\u021f\7e\2\2\u021f\u0220\7i\2\2\u0220\u0221"+
|
||||
"\7c\2\2\u0221\u009e\3\2\2\2\u0222\u0223\7t\2\2\u0223\u0224\7c\2\2\u0224"+
|
||||
"\u0225\7g\2\2\u0225\u0226\7h\2\2\u0226\u00a0\3\2\2\2\u0227\u0228\7d\2"+
|
||||
"\2\u0228\u0229\7g\2\2\u0229\u022a\7i\2\2\u022a\u00a2\3\2\2\2\u022b\u022c"+
|
||||
"\7u\2\2\u022c\u022d\7r\2\2\u022d\u022e\7d\2\2\u022e\u00a4\3\2\2\2\u022f"+
|
||||
"\u0230\7e\2\2\u0230\u0231\7r\2\2\u0231\u0232\7d\2\2\u0232\u00a6\3\2\2"+
|
||||
"\2\u0233\u0234\7n\2\2\u0234\u0235\7r\2\2\u0235\u0236\7d\2\2\u0236\u00a8"+
|
||||
"\3\2\2\2\u0237\u0238\7y\2\2\u0238\u0239\7d\2\2\u0239\u023a\7n\2\2\u023a"+
|
||||
"\u00aa\3\2\2\2\u023b\u023c\7f\2\2\u023c\u023d\7r\2\2\u023d\u023e\7t\2"+
|
||||
"\2\u023e\u023f\7u\2\2\u023f\u00ac\3\2\2\2\u0240\u0241\7f\2\2\u0241\u0242"+
|
||||
"\7r\2\2\u0242\u0243\7u\2\2\u0243\u0244\7h\2\2\u0244\u00ae\3\2\2\2\u0245"+
|
||||
"\u0246\7f\2\2\u0246\u0247\7r\2\2\u0247\u0248\7e\2\2\u0248\u0249\7h\2\2"+
|
||||
"\u0249\u00b0\3\2\2\2\u024a\u024b\7f\2\2\u024b\u024c\7r\2\2\u024c\u024d"+
|
||||
"\7t\2\2\u024d\u024e\7e\2\2\u024e\u00b2\3\2\2\2\u024f\u0250\7e\2\2\u0250"+
|
||||
"\u0251\7t\2\2\u0251\u0252\7u\2\2\u0252\u0253\7h\2\2\u0253\u00b4\3\2\2"+
|
||||
"\2\u0254\u0255\7e\2\2\u0255\u0256\7t\2\2\u0256\u0257\7t\2\2\u0257\u0258"+
|
||||
"\7d\2\2\u0258\u00b6\3\2\2\2\u0259\u025a\7u\2\2\u025a\u025b\7{\2\2\u025b"+
|
||||
"\u025c\7u\2\2\u025c\u00b8\3\2\2\2\u025d\u025e\7e\2\2\u025e\u025f\7|\2"+
|
||||
"\2\u025f\u0260\7o\2\2\u0260\u00ba\3\2\2\2\u0261\u0262\7k\2\2\u0262\u0263"+
|
||||
"\7t\2\2\u0263\u0264\7u\2\2\u0264\u0265\7u\2\2\u0265\u00bc\3\2\2\2\u0266"+
|
||||
"\u0267\7f\2\2\u0267\u0268\7u\2\2\u0268\u0269\7o\2\2\u0269\u00be\3\2\2"+
|
||||
"\2\u026a\u026b\7\60\2\2\u026b\u00c0\3\2\2\2\u026c\u026d\7\60\2\2\u026d"+
|
||||
"\u026e\7\60\2\2\u026e\u00c2\3\2\2\2\u026f\u0270\7-\2\2\u0270\u00c4\3\2"+
|
||||
"\2\2\u0271\u0272\7/\2\2\u0272\u00c6\3\2\2\2\u0273\u0274\7,\2\2\u0274\u00c8"+
|
||||
"\3\2\2\2\u0275\u0276\7\61\2\2\u0276\u00ca\3\2\2\2\u0277\u0279\t\2\2\2"+
|
||||
"\u0278\u0277\3\2\2\2\u0279\u027a\3\2\2\2\u027a\u0278\3\2\2\2\u027a\u027b"+
|
||||
"\3\2\2\2\u027b\u027c\3\2\2\2\u027c\u027d\7<\2\2\u027d\u00cc\3\2\2\2\u027e"+
|
||||
"\u0282\t\3\2\2\u027f\u0281\t\2\2\2\u0280\u027f\3\2\2\2\u0281\u0284\3\2"+
|
||||
"\2\2\u0282\u0280\3\2\2\2\u0282\u0283\3\2\2\2\u0283\u00ce\3\2\2\2\u0284"+
|
||||
"\u0282\3\2\2\2\u0285\u0289\t\4\2\2\u0286\u0288\t\5\2\2\u0287\u0286\3\2"+
|
||||
"\2\2\u0288\u028b\3\2\2\2\u0289\u0287\3\2\2\2\u0289\u028a\3\2\2\2\u028a"+
|
||||
"\u00d0\3\2\2\2\u028b\u0289\3\2\2\2\u028c\u028e\7f\2\2\u028d\u028f\t\4"+
|
||||
"\2\2\u028e\u028d\3\2\2\2\u028f\u0290\3\2\2\2\u0290\u028e\3\2\2\2\u0290"+
|
||||
"\u0291\3\2\2\2\u0291\u00d2\3\2\2\2\u0292\u0294\7q\2\2\u0293\u0295\t\6"+
|
||||
"\2\2\u0294\u0293\3\2\2\2\u0295\u0296\3\2\2\2\u0296\u0294\3\2\2\2\u0296"+
|
||||
"\u0297\3\2\2\2\u0297\u00d4\3\2\2\2\u0298\u0299\7f\2\2\u0299\u029a\7o\2"+
|
||||
"\2\u029a\u029c\3\2\2\2\u029b\u029d\t\4\2\2\u029c\u029b\3\2\2\2\u029d\u029e"+
|
||||
"\3\2\2\2\u029e\u029c\3\2\2\2\u029e\u029f\3\2\2\2\u029f\u00d6\3\2\2\2\u02a0"+
|
||||
"\u02a4\7>\2\2\u02a1\u02a3\t\7\2\2\u02a2\u02a1\3\2\2\2\u02a3\u02a6\3\2"+
|
||||
"\2\2\u02a4\u02a2\3\2\2\2\u02a4\u02a5\3\2\2\2\u02a5\u00d8\3\2\2\2\u02a6"+
|
||||
"\u02a4\3\2\2\2\u02a7\u02ab\7$\2\2\u02a8\u02aa\n\b\2\2\u02a9\u02a8\3\2"+
|
||||
"\2\2\u02aa\u02ad\3\2\2\2\u02ab\u02a9\3\2\2\2\u02ab\u02ac\3\2\2\2\u02ac"+
|
||||
"\u00da\3\2\2\2\u02ad\u02ab\3\2\2\2\u02ae\u02b0\t\b\2\2\u02af\u02ae\3\2"+
|
||||
"\2\2\u02b0\u02b1\3\2\2\2\u02b1\u02af\3\2\2\2\u02b1\u02b2\3\2\2\2\u02b2"+
|
||||
"\u00dc\3\2\2\2\u02b3\u02b4\t\t\2\2\u02b4\u02b5\3\2\2\2\u02b5\u02b6\bo"+
|
||||
"\2\2\u02b6\u00de\3\2\2\2\f\2\u027a\u0282\u0289\u0290\u0296\u029e\u02a4"+
|
||||
"\u02ab\u02b1\3\b\2\2";
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,181 @@
|
||||
// Generated from com/khubla/pdp7parse/antlr4/pdp7.g4 by ANTLR 4.5
|
||||
package com.khubla.pdp7parse.antlr4;
|
||||
import org.antlr.v4.runtime.misc.NotNull;
|
||||
import org.antlr.v4.runtime.tree.ParseTreeListener;
|
||||
|
||||
/**
|
||||
* This interface defines a complete listener for a parse tree produced by
|
||||
* {@link pdp7Parser}.
|
||||
*/
|
||||
public interface pdp7Listener extends ParseTreeListener {
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#prog}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterProg(pdp7Parser.ProgContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#prog}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitProg(pdp7Parser.ProgContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#line}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterLine(pdp7Parser.LineContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#line}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitLine(pdp7Parser.LineContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#declarations}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterDeclarations(pdp7Parser.DeclarationsContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#declarations}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitDeclarations(pdp7Parser.DeclarationsContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#declaration}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterDeclaration(pdp7Parser.DeclarationContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#declaration}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitDeclaration(pdp7Parser.DeclarationContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#instruction}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterInstruction(pdp7Parser.InstructionContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#instruction}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitInstruction(pdp7Parser.InstructionContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#argument}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterArgument(pdp7Parser.ArgumentContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#argument}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitArgument(pdp7Parser.ArgumentContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#assignment}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterAssignment(pdp7Parser.AssignmentContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#assignment}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitAssignment(pdp7Parser.AssignmentContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#expression}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterExpression(pdp7Parser.ExpressionContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#expression}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitExpression(pdp7Parser.ExpressionContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#multiplyingExpression}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterMultiplyingExpression(pdp7Parser.MultiplyingExpressionContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#multiplyingExpression}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitMultiplyingExpression(pdp7Parser.MultiplyingExpressionContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#atom}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterAtom(pdp7Parser.AtomContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#atom}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitAtom(pdp7Parser.AtomContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#string}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterString(pdp7Parser.StringContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#string}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitString(pdp7Parser.StringContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#signednumber}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterSignednumber(pdp7Parser.SignednumberContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#signednumber}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitSignednumber(pdp7Parser.SignednumberContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#eol}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterEol(pdp7Parser.EolContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#eol}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitEol(pdp7Parser.EolContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#comment}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterComment(pdp7Parser.CommentContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#comment}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitComment(pdp7Parser.CommentContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#label}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterLabel(pdp7Parser.LabelContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#label}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitLabel(pdp7Parser.LabelContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#variable}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterVariable(pdp7Parser.VariableContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#variable}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitVariable(pdp7Parser.VariableContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by {@link pdp7Parser#opcode}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterOpcode(pdp7Parser.OpcodeContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by {@link pdp7Parser#opcode}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitOpcode(pdp7Parser.OpcodeContext ctx);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,210 @@
|
||||
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
|
||||
T__87=88
|
||||
T__88=89
|
||||
T__89=90
|
||||
T__90=91
|
||||
T__91=92
|
||||
T__92=93
|
||||
T__93=94
|
||||
LOC=95
|
||||
RELOC=96
|
||||
PLUS=97
|
||||
MINUS=98
|
||||
TIMES=99
|
||||
DIV=100
|
||||
LABEL=101
|
||||
IDENTIFIER=102
|
||||
NUMERIC_LITERAL=103
|
||||
DECIMAL=104
|
||||
OCTAL=105
|
||||
DECIMAL_MINUS=106
|
||||
STRING=107
|
||||
COMMENT=108
|
||||
EOL=109
|
||||
WS=110
|
||||
';'=1
|
||||
'='=2
|
||||
'>'=3
|
||||
'dac'=4
|
||||
'jms'=5
|
||||
'dzm'=6
|
||||
'lac'=7
|
||||
'xor'=8
|
||||
'add'=9
|
||||
'tad'=10
|
||||
'xct'=11
|
||||
'isz'=12
|
||||
'and'=13
|
||||
'sad'=14
|
||||
'jmp'=15
|
||||
'nop'=16
|
||||
'law'=17
|
||||
'cma'=18
|
||||
'las'=19
|
||||
'ral'=20
|
||||
'rar'=21
|
||||
'hlt'=22
|
||||
'sma'=23
|
||||
'sza'=24
|
||||
'snl'=25
|
||||
'skp'=26
|
||||
'sna'=27
|
||||
'szl'=28
|
||||
'rtl'=29
|
||||
'rtr'=30
|
||||
'cil'=31
|
||||
'rcl'=32
|
||||
'rcr'=33
|
||||
'cia'=34
|
||||
'lrs'=35
|
||||
'lrss'=36
|
||||
'lls'=37
|
||||
'llss'=38
|
||||
'als'=39
|
||||
'alss'=40
|
||||
'mul'=41
|
||||
'idiv'=42
|
||||
'lacq'=43
|
||||
'clq'=44
|
||||
'omq'=45
|
||||
'cmq'=46
|
||||
'lmq'=47
|
||||
'dscs'=48
|
||||
'dslw'=49
|
||||
'dslm'=50
|
||||
'dsld'=51
|
||||
'dsls'=52
|
||||
'dssf'=53
|
||||
'dsrs'=54
|
||||
'iof'=55
|
||||
'ion'=56
|
||||
'caf'=57
|
||||
'clon'=58
|
||||
'clsf'=59
|
||||
'clof'=60
|
||||
'ksf'=61
|
||||
'krb'=62
|
||||
'tsf'=63
|
||||
'tcf'=64
|
||||
'tls'=65
|
||||
'sck'=66
|
||||
'cck'=67
|
||||
'lck'=68
|
||||
'rsf'=69
|
||||
'rsa'=70
|
||||
'rrb'=71
|
||||
'psf'=72
|
||||
'pcf'=73
|
||||
'psa'=74
|
||||
'cdf'=75
|
||||
'rlpd'=76
|
||||
'lda'=77
|
||||
'wcga'=78
|
||||
'raef'=79
|
||||
'beg'=80
|
||||
'spb'=81
|
||||
'cpb'=82
|
||||
'lpb'=83
|
||||
'wbl'=84
|
||||
'dprs'=85
|
||||
'dpsf'=86
|
||||
'dpcf'=87
|
||||
'dprc'=88
|
||||
'crsf'=89
|
||||
'crrb'=90
|
||||
'sys'=91
|
||||
'czm'=92
|
||||
'irss'=93
|
||||
'dsm'=94
|
||||
'.'=95
|
||||
'..'=96
|
||||
'+'=97
|
||||
'-'=98
|
||||
'*'=99
|
||||
'/'=100
|
||||
@@ -0,0 +1,210 @@
|
||||
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
|
||||
T__87=88
|
||||
T__88=89
|
||||
T__89=90
|
||||
T__90=91
|
||||
T__91=92
|
||||
T__92=93
|
||||
T__93=94
|
||||
LOC=95
|
||||
RELOC=96
|
||||
PLUS=97
|
||||
MINUS=98
|
||||
TIMES=99
|
||||
DIV=100
|
||||
LABEL=101
|
||||
IDENTIFIER=102
|
||||
NUMERIC_LITERAL=103
|
||||
DECIMAL=104
|
||||
OCTAL=105
|
||||
DECIMAL_MINUS=106
|
||||
STRING=107
|
||||
COMMENT=108
|
||||
EOL=109
|
||||
WS=110
|
||||
';'=1
|
||||
'='=2
|
||||
'>'=3
|
||||
'dac'=4
|
||||
'jms'=5
|
||||
'dzm'=6
|
||||
'lac'=7
|
||||
'xor'=8
|
||||
'add'=9
|
||||
'tad'=10
|
||||
'xct'=11
|
||||
'isz'=12
|
||||
'and'=13
|
||||
'sad'=14
|
||||
'jmp'=15
|
||||
'nop'=16
|
||||
'law'=17
|
||||
'cma'=18
|
||||
'las'=19
|
||||
'ral'=20
|
||||
'rar'=21
|
||||
'hlt'=22
|
||||
'sma'=23
|
||||
'sza'=24
|
||||
'snl'=25
|
||||
'skp'=26
|
||||
'sna'=27
|
||||
'szl'=28
|
||||
'rtl'=29
|
||||
'rtr'=30
|
||||
'cil'=31
|
||||
'rcl'=32
|
||||
'rcr'=33
|
||||
'cia'=34
|
||||
'lrs'=35
|
||||
'lrss'=36
|
||||
'lls'=37
|
||||
'llss'=38
|
||||
'als'=39
|
||||
'alss'=40
|
||||
'mul'=41
|
||||
'idiv'=42
|
||||
'lacq'=43
|
||||
'clq'=44
|
||||
'omq'=45
|
||||
'cmq'=46
|
||||
'lmq'=47
|
||||
'dscs'=48
|
||||
'dslw'=49
|
||||
'dslm'=50
|
||||
'dsld'=51
|
||||
'dsls'=52
|
||||
'dssf'=53
|
||||
'dsrs'=54
|
||||
'iof'=55
|
||||
'ion'=56
|
||||
'caf'=57
|
||||
'clon'=58
|
||||
'clsf'=59
|
||||
'clof'=60
|
||||
'ksf'=61
|
||||
'krb'=62
|
||||
'tsf'=63
|
||||
'tcf'=64
|
||||
'tls'=65
|
||||
'sck'=66
|
||||
'cck'=67
|
||||
'lck'=68
|
||||
'rsf'=69
|
||||
'rsa'=70
|
||||
'rrb'=71
|
||||
'psf'=72
|
||||
'pcf'=73
|
||||
'psa'=74
|
||||
'cdf'=75
|
||||
'rlpd'=76
|
||||
'lda'=77
|
||||
'wcga'=78
|
||||
'raef'=79
|
||||
'beg'=80
|
||||
'spb'=81
|
||||
'cpb'=82
|
||||
'lpb'=83
|
||||
'wbl'=84
|
||||
'dprs'=85
|
||||
'dpsf'=86
|
||||
'dpcf'=87
|
||||
'dprc'=88
|
||||
'crsf'=89
|
||||
'crrb'=90
|
||||
'sys'=91
|
||||
'czm'=92
|
||||
'irss'=93
|
||||
'dsm'=94
|
||||
'.'=95
|
||||
'..'=96
|
||||
'+'=97
|
||||
'-'=98
|
||||
'*'=99
|
||||
'/'=100
|
||||
Reference in New Issue
Block a user