Exception Fact Sheet for "avrora"

The goal of an Exception Fact Sheet is to reveal the design of exception handling in an application.

--Maxence, Martin

For feedback, please contact Martin

Table of contents

Basic Statistics

Number of Classes 1701
Number of Domain Exception Types (Thrown or Caught) 25
Number of Domain Checked Exception Types 3
Number of Domain Runtime Exception Types 22
Number of Domain Unknown Exception Types 0
nTh = Number of Throw 364
nTh = Number of Throw in Catch 45
Number of Catch-Rethrow (may not be correct) 4
nC = Number of Catch 158
nCTh = Number of Catch with Throw 45
Number of Empty Catch (really Empty) 5
Number of Empty Catch (with comments) 5
Number of Empty Catch 10
nM = Number of Methods 7575
nbFunctionWithCatch = Number of Methods with Catch 132 / 7575
nbFunctionWithThrow = Number of Methods with Throw 336 / 7575
nbFunctionWithThrowS = Number of Methods with ThrowS 492 / 7575
nbFunctionTransmitting = Number of Methods with "Throws" but NO catch, NO throw (only transmitting) 404 / 7575
P1 = nCTh / nC 28.5% (0.285)
P2 = nMC / nM 1.7% (0.017)
P3 = nbFunctionWithThrow / nbFunction 4.4% (0.044)
P4 = nbFunctionTransmitting / nbFunction 5.3% (0.053)
P5 = nbThrowInCatch / nbThrow 12.4% (0.124)
R2 = nCatch / nThrow 0.434
A1 = Number of Caught Exception Types From External Libraries 14
A2 = Number of Reused Exception Types From External Libraries (thrown from application code) 3

W1 is a rough estimation of the richness of the exception model. It does not take into account the inheritance relationships between domain exceptions.

Proportion P1 measures the overall exception flow. According to our experience, it varies from 5% to 70%. Early-catch design generally yields a low P1, libraries that must warn clients about errors (e.g. databases) generally have a high P1.

Proportion P2 measures the dispersion of catch blocks in the application. According to our experience, it varies from 2% to 15%. A small P2 indicates a rather centralized management of errors.

R1 shows how many exceptions types from libraries (incl. JDK) are thrown from application code. For instance, IllegalArgumentException comes from the JDK but is used in many applications.

A1 measures the awareness of the application to library exceptions. A high value of A1 means either that the application is polluted with checked exceptions or that it is able to apply specific recovery depending on the library exception.

Exception Hierachy

Exception Map

Each exception that is used at least once in the project is a dot. A orange dot represents a domain exception that is defined in the application. A blue dot exception is defined in the JDK or in a library. The x-axis represents the number of times an exception is caught, the y-axis the number of times an exception is thrown.

Exceptions With State

State means fields. Number of exceptions with state: 22
InvalidInstruction
              package avrora.arch.avr;public static class InvalidInstruction extends Exception {

        InvalidInstruction(int pc) {
            super("Invalid instruction at " + pc);
        }
    }
              package avrora.arch.legacy;public class InvalidInstruction extends Exception {
        public final int pc;
        public final int word1;

        InvalidInstruction(int word1, int pc) {
            super("Invalid Instruction at "+ StringUtil.addrToString(pc));
            this.pc = pc;
            this.word1 = word1;
        }
    }
              package avrora.arch.msp430;public static class InvalidInstruction extends Exception {
        InvalidInstruction(int pc)  {
            super("Invalid instruction at "+pc);
        }
    }
            
UnboundedStackException
              package avrora.stack;private class UnboundedStackException extends Exception {
        Path path;

        UnboundedStackException(Path p) {
            path = p;
        }
    }
            
ParseException
              package avrora.syntax.objdump;public class ParseException extends AbstractParseException {

    /**
     * This constructor is used by the method "generateParseException" in the generated parser.  Calling this
     * constructor generates a new object of this type with the fields "currentToken",
     * "expectedTokenSequences", and "tokenImage" set.  The boolean flag "specialConstructor" is also set to
     * true to indicate that this constructor was used to create this object. This constructor calls its super
     * class with the empty string to force the "toString" method of parent class "Throwable" to print the
     * error message in the form: ParseException: <result of getMessage>
     */
    public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal) {
        super("");
        specialConstructor = true;
        currentToken = currentTokenVal;
        expectedTokenSequences = expectedTokenSequencesVal;
        tokenImage = tokenImageVal;
    }

    /**
     * The following constructors are for use by you for whatever purpose you can think of.  Constructing the
     * exception in this manner makes the exception behave in the normal way - i.e., as documented in the
     * class "Throwable".  The fields "errorToken", "expectedTokenSequences", and "tokenImage" do not contain
     * relevant information.  The JavaCC generated code does not use these constructors.
     */

    public ParseException() {
        specialConstructor = false;
    }


    /**
     * This method has the standard behavior when this object has been created using the standard
     * constructors. Otherwise, it uses "currentToken" and "expectedTokenSequences" to generate a parse error
     * message and returns it. If this object has been created due to a parse error, and you do not catch it
     * (it gets thrown from the parser), then this method is called during the printing of the final stack
     * trace, and hence the correct error message gets displayed.
     */
    public String getMessage() {
        if (!specialConstructor) {
            return super.getMessage();
        }
        String expected = "";
        int maxSize = 0;
        for (int i = 0; i < expectedTokenSequences.length; i++) {
            if (maxSize < expectedTokenSequences[i].length) {
                maxSize = expectedTokenSequences[i].length;
            }
            for (int j = 0; j < expectedTokenSequences[i].length; j++) {
                expected += tokenImage[expectedTokenSequences[i][j]] + ' ';
            }
            if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
                expected += "...";
            }
            expected += eol + "    ";
        }
        String retval = "Encountered \"";
        Token tok = ((Token)currentToken).next;
        Token next = tok;
        for (int i = 0; i < maxSize; i++) {
            if (i != 0) retval += " ";
            if (tok.kind == 0) {
                retval += tokenImage[0];
                break;
            }
            retval += add_escapes(tok.image);
            tok = tok.next;
        }
        retval += "\" at line " + next.beginLine + ", column " + next.beginColumn;
        retval += '.' + eol;
        if (expectedTokenSequences.length == 1) {
            retval += "Was expecting:" + eol + "    ";
        } else {
            retval += "Was expecting one of:" + eol + "    ";
        }
        retval += expected;
        return retval;
    }

    /**
     * Used to convert raw characters to their escaped version when these raw version cannot be used as part
     * of an ASCII string literal.
     */
    protected String add_escapes(String str) {
        StringBuffer retval = new StringBuffer();
        char ch;
        for (int i = 0; i < str.length(); i++) {
            switch (str.charAt(i)) {
                case 0:
                    continue;
                case '\b':
                    retval.append("\\b");
                    continue;
                case '\t':
                    retval.append("\\t");
                    continue;
                case '\n':
                    retval.append("\\n");
                    continue;
                case '\f':
                    retval.append("\\f");
                    continue;
                case '\r':
                    retval.append("\\r");
                    continue;
                case '\"':
                    retval.append("\\\"");
                    continue;
                case '\'':
                    retval.append("\\\'");
                    continue;
                case '\\':
                    retval.append("\\\\");
                    continue;
                default:
                    if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
                        String s = "0000" + Integer.toString(ch, 16);
                        retval.append("\\u" + s.substring(s.length() - 4, s.length()));
                    } else {
                        retval.append(ch);
                    }
            }
        }
        return retval.toString();
    }

}
              package avrora.syntax.atmel;public class ParseException extends AbstractParseException {

    /**
     * This constructor is used by the method "generateParseException" in the generated parser.  Calling this
     * constructor generates a new object of this type with the fields "currentToken",
     * "expectedTokenSequences", and "tokenImage" set.  The boolean flag "specialConstructor" is also set to
     * true to indicate that this constructor was used to create this object. This constructor calls its super
     * class with the empty string to force the "toString" method of parent class "Throwable" to print the
     * error message in the form: ParseException: <result of getMessage>
     */
    public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal) {
        super(currentTokenVal, expectedTokenSequencesVal, tokenImageVal);
    }

    /**
     * The following constructors are for use by you for whatever purpose you can think of.  Constructing the
     * exception in this manner makes the exception behave in the normal way - i.e., as documented in the
     * class "Throwable".  The fields "errorToken", "expectedTokenSequences", and "tokenImage" do not contain
     * relevant information.  The JavaCC generated code does not use these constructors.
     */

    public ParseException() {
    }

    /**
     * This method has the standard behavior when this object has been created using the standard
     * constructors. Otherwise, it uses "currentToken" and "expectedTokenSequences" to generate a parse error
     * message and returns it. If this object has been created due to a parse error, and you do not catch it
     * (it gets thrown from the parser), then this method is called during the printing of the final stack
     * trace, and hence the correct error message gets displayed.
     */
    public String getMessage() {
        if (!specialConstructor) {
            return super.getMessage();
        }
        String expected = "";
        int maxSize = 0;
        for (int i = 0; i < expectedTokenSequences.length; i++) {
            if (maxSize < expectedTokenSequences[i].length) {
                maxSize = expectedTokenSequences[i].length;
            }
            for (int j = 0; j < expectedTokenSequences[i].length; j++) {
                expected += tokenImage[expectedTokenSequences[i][j]] + ' ';
            }
            if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
                expected += "...";
            }
            expected += eol + "    ";
        }
        String retval = "Encountered \"";
        Token tok = ((Token)currentToken).next;
        Token next = tok;
        for (int i = 0; i < maxSize; i++) {
            if (i != 0) retval += " ";
            if (tok.kind == 0) {
                retval += tokenImage[0];
                break;
            }
            retval += add_escapes(tok.image);
            tok = tok.next;
        }
        retval += "\" at line " + next.beginLine + ", column " + next.beginColumn;
        retval += '.' + eol;
        if (expectedTokenSequences.length == 1) {
            retval += "Was expecting:" + eol + "    ";
        } else {
            retval += "Was expecting one of:" + eol + "    ";
        }
        retval += expected;
        return retval;
    }

}
              package jintgen.isdl.parser;public class ParseException extends Exception {

    /**
     * This constructor is used by the method "generateParseException" in the generated parser.  Calling this
     * constructor generates a new object of this type with the fields "currentToken",
     * "expectedTokenSequences", and "tokenImage" set.  The boolean flag "specialConstructor" is also set to
     * true to indicate that this constructor was used to create this object. This constructor calls its super
     * class with the empty string to force the "toString" method of parent class "Throwable" to print the
     * error message in the form: ParseException: <result of getMessage>
     */
    public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal) {
        super("");
        specialConstructor = true;
        currentToken = currentTokenVal;
        expectedTokenSequences = expectedTokenSequencesVal;
        tokenImage = tokenImageVal;
    }

    /**
     * The following constructors are for use by you for whatever purpose you can think of.  Constructing the
     * exception in this manner makes the exception behave in the normal way - i.e., as documented in the
     * class "Throwable".  The fields "errorToken", "expectedTokenSequences", and "tokenImage" do not contain
     * relevant information.  The JavaCC generated code does not use these constructors.
     */

    public ParseException() {
        specialConstructor = false;
    }

    public ParseException(String message) {
        super(message);
        specialConstructor = false;
    }

    /**
     * This variable determines which constructor was used to create this object and thereby affects the
     * semantics of the "getMessage" method (see below).
     */
    protected boolean specialConstructor;

    /**
     * This is the last token that has been consumed successfully.  If this object has been created due to a
     * parse error, the token followng this token will (therefore) be the first error token.
     */
    public Token currentToken;

    /**
     * Each entry in this array is an array of integers.  Each array of integers represents a sequence of
     * tokens (by their ordinal values) that is expected at this point of the parse.
     */
    public int[][] expectedTokenSequences;

    /**
     * This is a reference to the "tokenImage" array of the generated parser within which the parse error
     * occurred. This array is defined in the generated ...Constants interface.
     */
    public String[] tokenImage;

    /**
     * This method has the standard behavior when this object has been created using the standard
     * constructors. Otherwise, it uses "currentToken" and "expectedTokenSequences" to generate a parse error
     * message and returns it. If this object has been created due to a parse error, and you do not catch it
     * (it gets thrown from the parser), then this method is called during the printing of the final stack
     * trace, and hence the correct error message gets displayed.
     */
    public String getMessage() {
        if (!specialConstructor) {
            return super.getMessage();
        }
        String expected = "";
        int maxSize = 0;
        for (int i = 0; i < expectedTokenSequences.length; i++) {
            if (maxSize < expectedTokenSequences[i].length) {
                maxSize = expectedTokenSequences[i].length;
            }
            for (int j = 0; j < expectedTokenSequences[i].length; j++) {
                expected += tokenImage[expectedTokenSequences[i][j]] + ' ';
            }
            if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
                expected += "...";
            }
            expected += eol + "    ";
        }
        String retval = "Encountered \"";
        Token tok = currentToken.next;
        for (int i = 0; i < maxSize; i++) {
            if (i != 0) retval += " ";
            if (tok.kind == 0) {
                retval += tokenImage[0];
                break;
            }
            retval += add_escapes(tok.image);
            tok = tok.next;
        }
        retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
        retval += '.' + eol;
        if (expectedTokenSequences.length == 1) {
            retval += "Was expecting:" + eol + "    ";
        } else {
            retval += "Was expecting one of:" + eol + "    ";
        }
        retval += expected;
        return retval;
    }

    /**
     * The end of line string for this machine.
     */
    protected String eol = System.getProperty("line.separator", "\n");

    /**
     * Used to convert raw characters to their escaped version when these raw version cannot be used as part
     * of an ASCII string literal.
     */
    protected String add_escapes(String str) {
        StringBuffer retval = new StringBuffer();
        char ch;
        for (int i = 0; i < str.length(); i++) {
            switch (str.charAt(i)) {
                case 0:
                    continue;
                case '\b':
                    retval.append("\\b");
                    continue;
                case '\t':
                    retval.append("\\t");
                    continue;
                case '\n':
                    retval.append("\\n");
                    continue;
                case '\f':
                    retval.append("\\f");
                    continue;
                case '\r':
                    retval.append("\\r");
                    continue;
                case '\"':
                    retval.append("\\\"");
                    continue;
                case '\'':
                    retval.append("\\\'");
                    continue;
                case '\\':
                    retval.append("\\\\");
                    continue;
                default:
                    if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
                        String s = "0000" + Integer.toString(ch, 16);
                        retval.append("\\u" + s.substring(s.length() - 4, s.length()));
                    } else {
                        retval.append(ch);
                    }
            }
        }
        return retval.toString();
    }

}
            
Error
              package cck.util;public static class Error extends java.lang.Error {

        protected final String message, param;
        public static boolean STACKTRACES;

        public Error(String p) {
            super(p);
            message = "Error";
            param = p;
        }

        public Error(String n, String p) {
            super(n);
            message = n;
            param = p;
        }

        public String getParam() {
            return param;
        }

        /**
         * The <code>report()</code> method generates a textual report that is printed
         * on the terminal for the user.
         */
        public void report() {
            Terminal.print(Terminal.ERROR_COLOR, message);
            Terminal.print(": " + param + '\n');
            if (STACKTRACES) {
                printStackTrace();
            }
        }
    }
            
AddressOutOfBoundsException
              package avrora.sim;public class AddressOutOfBoundsException extends Util.Error {
        public final int data_addr;

        protected AddressOutOfBoundsException(int da) {
            super("Segment access error", "illegal access of "+ StringUtil.quote(name) + " at " + StringUtil.addrToString(da));
            this.data_addr = da;
        }
    }
              package avrora.sim;public static class AddressOutOfBoundsException extends Util.Error {
        public final String segment;
        public final int data_addr;
        public final int badPc;

        protected AddressOutOfBoundsException(String s, int pc, int da) {
            super("Program error", "at pc = " + StringUtil.addrToString(pc) + ", illegal access of " + StringUtil.quote(s) + " at " + StringUtil.addrToString(da));
            this.data_addr = da;
            this.segment = s;
            this.badPc = pc;
        }
    }
            
NoSuchInstructionException
              package avrora.sim;public static class NoSuchInstructionException extends Util.Error {
        public final int badPc;

        protected NoSuchInstructionException(int pc) {
            super("Program error", "attempt to execute non-existant instruction at " + StringUtil.addrToString(pc));
            this.badPc = pc;
        }
    }
            
PCOutOfBoundsException
              package avrora.sim;public static class PCOutOfBoundsException extends Util.Error {
        public final int badPc;

        protected PCOutOfBoundsException(int pc) {
            super("Program error", "PC out of bounds at " + StringUtil.addrToString(pc));
            this.badPc = pc;
        }
    }
            
PCAlignmentException
              package avrora.sim;public static class PCAlignmentException extends Util.Error {
        public final int badPc;

        protected PCAlignmentException(int pc) {
            super("Program error", "PC misaligned at " + StringUtil.addrToString(pc));
            this.badPc = pc;
        }
    }
            
TokenMgrError
              package avrora.syntax.objdump;public class TokenMgrError extends Error {

    /*
    * Ordinals for various reasons why an Error of this type can be thrown.
    */

    /**
     * Lexical error occured.
     */
    static final int LEXICAL_ERROR = 0;

    /**
     * Tried to change to an invalid lexical state.
     */
    static final int INVALID_LEXICAL_STATE = 2;

    /**
     * Replaces unprintable characters by their espaced (or unicode escaped) equivalents in the given string
     */
    protected static String addEscapes(String str) {
        StringBuffer retval = new StringBuffer();
        char ch;
        for (int i = 0; i < str.length(); i++) {
            switch (str.charAt(i)) {
                case 0:
                    continue;
                case '\b':
                    retval.append("\\b");
                    continue;
                case '\t':
                    retval.append("\\t");
                    continue;
                case '\n':
                    retval.append("\\n");
                    continue;
                case '\f':
                    retval.append("\\f");
                    continue;
                case '\r':
                    retval.append("\\r");
                    continue;
                case '\"':
                    retval.append("\\\"");
                    continue;
                case '\'':
                    retval.append("\\\'");
                    continue;
                case '\\':
                    retval.append("\\\\");
                    continue;
                default:
                    if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
                        String s = "0000" + Integer.toString(ch, 16);
                        retval.append("\\u" + s.substring(s.length() - 4, s.length()));
                    } else {
                        retval.append(ch);
                    }
            }
        }
        return retval.toString();
    }

    /**
     * Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical
     * error. Parameters : EOFSeen     : indicates if EOF caused the lexicl error curLexState : lexical state
     * in which this error occured errorLine   : line number when the error occured errorColumn : column
     * number when the error occured errorAfter  : prefix that was seen before this error occured curchar :
     * the offending character Note: You can customize the lexical error message by modifying this method.
     */
    protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
        return "Lexical error at line " + errorLine + ", column " + errorColumn + ".  Encountered: " + (EOFSeen ? "<EOF> " : '\"' + addEscapes(String.valueOf(curChar)) + '\"' + " (" + (int) curChar + "), ") + "after : \"" + addEscapes(errorAfter) + '\"';
    }

    /*
     * Constructors of various flavors follow.
     */

    public TokenMgrError(String message, int reason) {
        super(message);
    }

    public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
        this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
    }
}
              package avrora.syntax.atmel;public class TokenMgrError extends Error {

    /*
    * Ordinals for various reasons why an Error of this type can be thrown.
    */

    /**
     * Lexical error occured.
     */
    static final int LEXICAL_ERROR = 0;

    /**
     * Tried to change to an invalid lexical state.
     */
    static final int INVALID_LEXICAL_STATE = 2;

    /**
     * Replaces unprintable characters by their espaced (or unicode escaped) equivalents in the given string
     */
    protected static String addEscapes(String str) {
        StringBuffer retval = new StringBuffer();
        char ch;
        for (int i = 0; i < str.length(); i++) {
            switch (str.charAt(i)) {
                case 0:
                    continue;
                case '\b':
                    retval.append("\\b");
                    continue;
                case '\t':
                    retval.append("\\t");
                    continue;
                case '\n':
                    retval.append("\\n");
                    continue;
                case '\f':
                    retval.append("\\f");
                    continue;
                case '\r':
                    retval.append("\\r");
                    continue;
                case '\"':
                    retval.append("\\\"");
                    continue;
                case '\'':
                    retval.append("\\\'");
                    continue;
                case '\\':
                    retval.append("\\\\");
                    continue;
                default:
                    if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
                        String s = "0000" + Integer.toString(ch, 16);
                        retval.append("\\u" + s.substring(s.length() - 4, s.length()));
                    } else {
                        retval.append(ch);
                    }
            }
        }
        return retval.toString();
    }

    /**
     * Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical
     * error. Parameters : EOFSeen     : indicates if EOF caused the lexicl error curLexState : lexical state
     * in which this error occured errorLine   : line number when the error occured errorColumn : column
     * number when the error occured errorAfter  : prefix that was seen before this error occured curchar :
     * the offending character Note: You can customize the lexical error message by modifying this method.
     */
    protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
        return "Lexical error at line " + errorLine + ", column " + errorColumn + ".  Encountered: " + (EOFSeen ? "<EOF> " : '\"' + addEscapes(String.valueOf(curChar)) + '\"' + " (" + (int) curChar + "), ") + "after : \"" + addEscapes(errorAfter) + '\"';
    }

    /*
     * Constructors of various flavors follow.
     */

    public TokenMgrError(String message, int reason) {
        super(message);
    }

    public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
        this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
    }
}
              package jintgen.isdl.parser;public class TokenMgrError extends Error {

    /*
     * Ordinals for various reasons why an Error of this type can be thrown.
     */

    /**
     * Lexical error occured.
     */
    static final int LEXICAL_ERROR = 0;

    /**
     * An attempt wass made to create a second instance of a static token manager.
     */
    static final int STATIC_LEXER_ERROR = 1;

    /**
     * Tried to change to an invalid lexical state.
     */
    static final int INVALID_LEXICAL_STATE = 2;

    /**
     * Detected (and bailed out of) an infinite loop in the token manager.
     */
    static final int LOOP_DETECTED = 3;

    /**
     * Indicates the reason why the exception is thrown. It will have one of the above 4 values.
     */
    int errorCode;

    /**
     * Replaces unprintable characters by their espaced (or unicode escaped) equivalents in the given string
     */
    protected static String addEscapes(String str) {
        StringBuffer retval = new StringBuffer();
        char ch;
        for (int i = 0; i < str.length(); i++) {
            switch (str.charAt(i)) {
                case 0:
                    continue;
                case '\b':
                    retval.append("\\b");
                    continue;
                case '\t':
                    retval.append("\\t");
                    continue;
                case '\n':
                    retval.append("\\n");
                    continue;
                case '\f':
                    retval.append("\\f");
                    continue;
                case '\r':
                    retval.append("\\r");
                    continue;
                case '\"':
                    retval.append("\\\"");
                    continue;
                case '\'':
                    retval.append("\\\'");
                    continue;
                case '\\':
                    retval.append("\\\\");
                    continue;
                default:
                    if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
                        String s = "0000" + Integer.toString(ch, 16);
                        retval.append("\\u" + s.substring(s.length() - 4, s.length()));
                    } else {
                        retval.append(ch);
                    }
            }
        }
        return retval.toString();
    }

    /**
     * Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical
     * error. Parameters : EOFSeen     : indicates if EOF caused the lexicl error curLexState : lexical state
     * in which this error occured errorLine   : line number when the error occured errorColumn : column
     * number when the error occured errorAfter  : prefix that was seen before this error occured curchar :
     * the offending character Note: You can customize the lexical error message by modifying this method.
     */
    protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
        return ("Lexical error at line " + errorLine + ", column " + errorColumn + ".  Encountered: " + (EOFSeen ? "<EOF> " : ('\"' + addEscapes(String.valueOf(curChar)) + '\"') + " (" + (int)curChar + "), ") + "after : \"" + addEscapes(errorAfter) + '\"');
    }

    /*
     * Constructors of various flavors follow.
     */

    public TokenMgrError() {
    }

    public TokenMgrError(String message, int reason) {
        super(message);
        errorCode = reason;
    }

    public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
        this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
    }
}
            
SourceError
              package cck.parser;public class SourceError extends Util.Error {

    /**
     * The <code>point</code> field stores a reference to the point in the file
     * where the error occured.
     */
    public final SourcePoint point;

    /**
     * The <code>errorType</code> field stores a string representing the type
     * of the error.
     */
    protected final String errorType;

    /**
     * The <code>errparams</code> field stores a list of parameters to the error
     * that might represent the name of the missing variable, expected types, etc.
     */
    protected final String[] errparams;

    public static boolean REPORT_TYPE = false;

    /**
     * The default constructor for a source error accepts an error type, a program
     * point which indicates the location in a file where the error occured, a message,
     * and a list of parameters to the error (such as the name of a class or method
     * where the error occurred).
     *
     * @param type a string that indicates the type of error that occured such as
     *             "Undefined Variable"
     * @param p    the point in the file where the error occurred
     * @param msg  a short message reported to the user that explains the error
     * @param ps   a list of parameters to the error such as the name of the variable
     *             that is undeclared, etc.
     */
    public SourceError(String type, SourcePoint p, String msg, String[] ps) {
        super(msg, null);
        errorType = type;
        point = p;
        errparams = ps;
    }

    /**
     * The <code>report()</code> method generates a textual report of this error
     * for the user. For source errors, this method will report the file, line number,
     * and column number where this error occurred.
     */
    public void report() {
        SourcePoint pt = point == null ? new SourcePoint("*unknown*", 0, 0, 0, 0) : point;
        pt.report();
        Terminal.print(" ");
        Terminal.printRed(errorType);
        Terminal.print(": ");
        Terminal.print(message);
        Terminal.print("\n");
        if (STACKTRACES) {
            printStackTrace();
        }
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        return o instanceof String && errorType.equals(o);
    }

    /**
     * The <code>getErrorType()</code> method returns a string representing the type of the
     * error.
     *
     * @return a string that represents the type of the error
     */
    public String getErrorType() {
        return errorType;
    }

    /**
     * The <code>getErrorParams()</code> method returns a reference to the parameters to
     * the error.
     *
     * @return a reference to an array that contains the parameters to the error, if any
     */
    public String[] getErrorParams() {
        return errparams;
    }
}
            
SourceException
              package cck.parser;public class SourceException extends SourceError {

    /**
     * The <code>trace</code> field stores a reference to the stack trace corresponding
     * to where the source exception ocurred.
     */
    public final StackTrace trace;

    /**
     * The default constructor for a source error accepts an error type, a program
     * point which indicates the location in a file where the error occured, a message,
     * and a list of parameters to the error (such as the name of a class or method
     * where the error occurred).
     *
     * @param type a string that indicates the type of error that occured such as
     *             "Undefined Variable"
     * @param p    the point in the file where the error occurred
     * @param msg  a short message reported to the user that explains the error
     * @param ps   a list of parameters to the error such as the name of the variable
     *             that is undeclared, etc.
     */
    public SourceException(String type, StackTrace p, String msg, String[] ps) {
        super(type, p == null ? null : p.getSourcePoint(), msg, null);
        trace = p;
    }

    /**
     * The <code>report()</code> method generates a textual report of this error
     * for the user. For source errors, this method will report the file, line number,
     * and column number where this error occurred.
     */
    public void report() {
        Terminal.print("");
        Terminal.printRed(errorType);
        Terminal.println(": " + message + ' ');
        for (StackTrace tr = trace; tr != null; tr = tr.prev) {
            Terminal.print("\t");
            Terminal.print("in ");
            Terminal.printGreen(tr.getMethod() + ' ');
            SourcePoint p = tr.getSourcePoint();
            if (p != null) p.report();
            Terminal.nextln();
        }
    }

}
            
InternalError
              package cck.util;public static class InternalError extends Error {
        private String category;

        public InternalError(String param) {
            super(param);
            category = "Internal Error";
        }

        public InternalError(String c, String param) {
            super(param);
            category = c;
        }

        public void report() {
            Terminal.print(Terminal.ERROR_COLOR, category);
            Terminal.print(": " + param + '\n');
            printStackTrace();
        }
    }
            
Unexpected
              package cck.util;public static class Unexpected extends Error {
        public final Throwable thrown;

        public Unexpected(Throwable t) {
            super(StringUtil.quote(t.getClass()));
            thrown = t;
        }

        public void report() {
            Terminal.print(Terminal.ERROR_COLOR, "Unexpected exception");
            Terminal.print(": " + param + '\n');
            thrown.printStackTrace();
        }

        public void rethrow() throws Throwable {
            throw thrown;
        }
    }
            
BreakPointException
              package avrora.actions;public static class BreakPointException extends RuntimeException {
        /**
         * The <code>address</code> field stores the address of the instruction that caused the breakpoint.
         */
        public final int address;

        /**
         * The <code>state</code> field stores a reference to the state of the simulator when the breakpoint
         * occurred, before executing the instruction.
         */
        public final State state;

        public BreakPointException(int a, State s) {
            super("breakpoint @ " + StringUtil.addrToString(a) + " reached");
            address = a;
            state = s;
        }
    }
            
TimeoutException
              package avrora.actions;public static class TimeoutException extends RuntimeException {

        /**
         * The <code>address</code> field stores the address of the next instruction to be executed after the
         * timeout.
         */
        public final int address;

        /**
         * The <code>state</code> field stores the state of the simulation at the point at which the timeout
         * occurred.
         */
        public final State state;

        /**
         * The <code>timeout</code> field stores the value (in clock cycles) of the timeout that occurred.
         */
        public final long timeout;

        public TimeoutException(int a, State s, long t, String l) {
            super("timeout @ " + StringUtil.addrToString(a) + " reached after " + t + ' ' + l);
            address = a;
            state = s;
            timeout = t;
        }
    }
            
InvalidImmediate
              package avrora.arch.legacy;public static class InvalidImmediate extends InvalidOperand {

        /**
         * The <code>low</code> field stores the lowest value that is allowed for this operand.
         */
        public final int low;

        /**
         * The <code>high</code> field stores the highest value that is allowed for this operand.
         */
        public final int high;

        /**
         * The <code>value</code> field stores the actual value that was passed during the attempeted
         * construction of this instruction.
         */
        public final int value;

        public InvalidImmediate(int num, int v, int l, int h) {
            super(num, "value out of required range [" + l + ", " + h + ']');
            low = l;
            high = h;
            value = v;
        }
    }
            
InvalidOperand
              package avrora.arch.legacy;public static class InvalidOperand extends RuntimeException {
        /**
         * The <code>number</code> field of the <code>InvalidOperand</code> instance records which operand
         * this error refers to. For example, if the first operand was the source of the problem, then this
         * field will be set to 1.
         */
        public final int number;

        InvalidOperand(int num, String msg) {
            super("invalid operand #" + num + ": " + msg);
            number = num;
        }
    }
            
InvalidRegister
              package avrora.arch.legacy;public static class InvalidRegister extends InvalidOperand {
        /**
         * The <code>set</code> field records the expected register set for the operand.
         */
        public final LegacyRegister.Set set;

        /**
         * The <code>register</code> field records the offending register that was found not to be in the
         * expected register set.
         */
        public final LegacyRegister register;

        public InvalidRegister(int num, LegacyRegister reg, LegacyRegister.Set s) {
            super(num, "must be one of " + s.contents);
            set = s;
            register = reg;
        }
    }
            
RegisterRequired
              package avrora.arch.legacy;public static class RegisterRequired extends RuntimeException {

        public final LegacyOperand operand;

        RegisterRequired(LegacyOperand o) {
            super("register required");
            operand = o;
        }
    }
            
ImmediateRequired
              package avrora.arch.legacy;public static class ImmediateRequired extends RuntimeException {

        public final LegacyOperand operand;

        ImmediateRequired(LegacyOperand o) {
            super("immediate required");
            operand = o;
        }
    }
            
WrongNumberOfOperands
              package avrora.arch.legacy;public static class WrongNumberOfOperands extends RuntimeException {
        public final int expected;
        public final int found;

        WrongNumberOfOperands(int f, int e) {
            super("wrong number of operands, expected " + e + " and found " + f);
            expected = e;
            found = f;
        }
    }
            
AbstractParseException
              package cck.parser;public class AbstractParseException extends RuntimeException {
    /**
     * This constructor is used by the method "generateParseException" in the generated parser.  Calling this
     * constructor generates a new object of this type with the fields "currentToken",
     * "expectedTokenSequences", and "tokenImage" set.  The boolean flag "specialConstructor" is also set to
     * true to indicate that this constructor was used to create this object. This constructor calls its super
     * class with the empty string to force the "toString" method of parent class "Throwable" to print the
     * error message in the form: ParseException: <result of getMessage>
     */
    public AbstractParseException(AbstractToken currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal) {
        super("");
        specialConstructor = true;
        currentToken = currentTokenVal;
        expectedTokenSequences = expectedTokenSequencesVal;
        tokenImage = tokenImageVal;
        AbstractToken tok = currentToken.getNextToken();
        sourcePoint = new SourcePoint(tok.file, tok.beginLine, tok.beginColumn, tok.endColumn);
    }

    /**
     * The following constructors are for use by you for whatever purpose you can think of.  Constructing the
     * exception in this manner makes the exception behave in the normal way - i.e., as documented in the
     * class "Throwable".  The fields "errorToken", "expectedTokenSequences", and "tokenImage" do not contain
     * relevant information.  The JavaCC generated code does not use these constructors.
     */

    public AbstractParseException() {
        specialConstructor = false;
    }

    public AbstractParseException(String message) {
        super(message);
        specialConstructor = false;
    }


    /**
     * This variable determines which constructor was used to create this object and thereby affects the
     * semantics of the "getMessage" method (see below).
     */
    protected boolean specialConstructor;
    /**
     * This is the last token that has been consumed successfully.  If this object has been created due to a
     * parse error, the token followng this token will (therefore) be the first error token.
     */
    public AbstractToken currentToken;
    /**
     * Each entry in this array is an array of integers.  Each array of integers represents a sequence of
     * tokens (by their ordinal values) that is expected at this point of the parse.
     */
    public int[][] expectedTokenSequences;
    /**
     * This is a reference to the "tokenImage" array of the generated parser within which the parse error
     * occurred. This array is defined in the generated ...Constants interface.
     */
    public String[] tokenImage;
    /**
     * The end of line string for this machine.
     */
    protected String eol = System.getProperty("line.separator", "\n");

    public SourcePoint sourcePoint;

    /**
     * Used to convert raw characters to their escaped version when these raw version cannot be used as part
     * of an ASCII string literal.
     */
    protected String add_escapes(String str) {
        StringBuffer retval = new StringBuffer();
        char ch;
        for (int i = 0; i < str.length(); i++) {
            switch (str.charAt(i)) {
                case 0:
                    continue;
                case '\b':
                    retval.append("\\b");
                    continue;
                case '\t':
                    retval.append("\\t");
                    continue;
                case '\n':
                    retval.append("\\n");
                    continue;
                case '\f':
                    retval.append("\\f");
                    continue;
                case '\r':
                    retval.append("\\r");
                    continue;
                case '\"':
                    retval.append("\\\"");
                    continue;
                case '\'':
                    retval.append("\\\'");
                    continue;
                case '\\':
                    retval.append("\\\\");
                    continue;
                default:
                    if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
                        String s = "0000" + Integer.toString(ch, 16);
                        retval.append("\\u");
                        retval.append(s.substring(s.length() - 4, s.length()));
                    } else {
                        retval.append(ch);
                    }
            }
        }
        return retval.toString();
    }
}
            

Thrown Exceptions Summary

A (Domain) exception is defined in the application. A (Lib) exception is defined in the JDK or in a library. An exception can be thrown, thrown from within a catch, or declared in the signature of a method (usually for checked exceptions). Hovering over a number triggers showing code snippets from the application code.

Type Exception Thrown Thrown
from Catch
Declared
- Unknown 239
              
//in src/avrora/monitors/GDBServer.java
throw Util.failure("Unexpected IOException: "+e);

              
//in src/avrora/monitors/GDBServer.java
throw Util.failure("Unexpected IOException: "+e);

              
//in src/avrora/monitors/GDBServer.java
throw Util.failure("Unexpected IOException: "+e);

              
//in src/avrora/monitors/TraceMonitor.java
throw Util.failure("invalid address format: " + StringUtil.quote(str));

              
//in src/avrora/monitors/EnergyMonitor.java
throw Util.unexpected(e);

              
//in src/avrora/monitors/EnergyMonitor.java
throw Util.unexpected(e);

              
//in src/avrora/monitors/EnergyMonitor.java
throw Util.unexpected(e);

              
//in src/avrora/monitors/EnergyMonitor.java
throw Util.unexpected(e);

              
//in src/avrora/monitors/TripTimeMonitor.java
throw Util.failure("invalid address format: " + StringUtil.quote(str));

              
//in src/avrora/monitors/SimpleBatteryMonitor.java
throw Util.unimplemented();

              
//in src/avrora/monitors/CallStack.java
throw Util.failure("Stack overflow: more than "+maxDepth+" calls nested");

              
//in src/avrora/gui/TimeScale.java
throw Util.failure("Zoom level not supported: "+scale);

              
//in src/avrora/gui/MonitorPanel.java
throw Util.unimplemented();

              
//in src/avrora/gui/AvroraGui.java
throw Util.failure("Resource not found: " + path);

              
//in src/avrora/gui/ManageSimInput.java
throw Util.failure(e.toString());

              
//in src/avrora/actions/SimAction.java
throw thrown;

              
//in src/avrora/sim/mcu/RegisterSet.java
throw Util.unimplemented();

              
//in src/avrora/sim/mcu/RegisterSet.java
throw Util.failure("Field not found in RegisterSet: "+ StringUtil.quote(fname));

              
//in src/avrora/sim/mcu/AtmelInternalDevice.java
throw Util.unimplemented();

              
//in src/avrora/sim/mcu/ATMegaTimer.java
throw Util.failure("Fixed top value flushed");

              
//in src/avrora/sim/mcu/ReprogrammableCodeSegment.java
throw Util.failure("invalid instruction at "+ StringUtil.addrToString(address));

              
//in src/avrora/sim/mcu/ReprogrammableCodeSegment.java
throw Util.failure("DisassembleLegacyInstr should be confined to BaseInterpreter");

              
//in src/avrora/sim/mcu/ReprogrammableCodeSegment.java
throw Util.failure("DisassembleLegacyInstr has no operands");

              
//in src/avrora/sim/CodeSegment.java
throw Util.failure("Update of flash memory not supported for this segment");

              
//in src/avrora/sim/CodeSegment.java
throw Util.failure("ProbedLegacyInstr should be confined to BaseInterpreter");

              
//in src/avrora/sim/CodeSegment.java
throw Util.failure("no instruction here");

              
//in src/avrora/sim/CodeSegment.java
throw Util.failure("no instruction here");

              
//in src/avrora/sim/types/SensorSimulation.java
throw Util.unexpected(e);

              
//in src/avrora/sim/platform/sensors/ReplaySensorData.java
throw Util.failure("sensor data format error: expected number as sensor reading");

              
//in src/avrora/sim/platform/sensors/ReplaySensorData.java
throw Util.unexpected(e);

              
//in src/avrora/sim/platform/sensors/ReplaySensorData.java
throw Util.failure("sensor data format error: expected number as time value");

              
//in src/avrora/sim/platform/SerialForwarder.java
throw Util.unexpected(e);

              
//in src/avrora/sim/platform/SerialForwarder.java
throw Util.unexpected(e);

              
//in src/avrora/sim/platform/SerialForwarder.java
throw Util.unexpected(e);

              
//in src/avrora/sim/platform/SerialForwarder.java
throw Util.unexpected(e);

              
//in src/avrora/sim/platform/SerialForwarder.java
throw Util.unexpected(e);

              
//in src/avrora/sim/platform/SerialForwarder.java
throw Util.unexpected(e);

              
//in src/avrora/sim/platform/SerialLogger.java
throw Util.failure("transmitFrame should not be called in SerialLogger");

              
//in src/avrora/sim/platform/SPIForwarder.java
throw Util.unexpected(e);

              
//in src/avrora/sim/platform/SPIForwarder.java
throw Util.unexpected(e);

              
//in src/avrora/sim/platform/SPIForwarder.java
throw Util.unexpected(e);

              
//in src/avrora/sim/platform/SPIForwarder.java
throw Util.unexpected(e);

              
//in src/avrora/sim/clock/RippleSynchronizer.java
throw Util.unimplemented();

              
//in src/avrora/sim/clock/RippleSynchronizer.java
throw Util.unimplemented();

              
//in src/avrora/sim/clock/RippleSynchronizer.java
throw Util.unimplemented();

              
//in src/avrora/sim/clock/DerivedClock.java
throw Util.failure("cannot derive faster clock from slower clock");

              
//in src/avrora/sim/clock/Synchronizer.java
throw Util.failure("Only one node supported at a time");

              
//in src/avrora/sim/clock/Synchronizer.java
throw Util.failure("No nodes in simulation");

              
//in src/avrora/sim/clock/Synchronizer.java
throw Util.unimplemented();

              
//in src/avrora/sim/clock/Synchronizer.java
throw Util.unimplemented();

              
//in src/avrora/sim/clock/Synchronizer.java
throw Util.unimplemented();

              
//in src/avrora/sim/clock/SystemClock.java
throw Util.unimplemented();

              
//in src/avrora/sim/clock/SystemClock.java
throw Util.unimplemented();

              
//in src/avrora/sim/clock/SystemClock.java
throw Util.unimplemented();

              
//in src/avrora/sim/clock/BarrierSynchronizer.java
throw Util.unexpected(e);

              
//in src/avrora/sim/clock/BarrierSynchronizer.java
throw Util.unimplemented();

              
//in src/avrora/sim/clock/BarrierSynchronizer.java
throw Util.unimplemented();

              
//in src/avrora/sim/clock/BarrierSynchronizer.java
throw Util.unexpected(e);

              
//in src/avrora/sim/clock/StepSynchronizer.java
throw Util.unimplemented();

              
//in src/avrora/sim/clock/StepSynchronizer.java
throw Util.unimplemented();

              
//in src/avrora/sim/clock/StepSynchronizer.java
throw Util.unimplemented();

              
//in src/avrora/sim/clock/StepSynchronizer.java
throw Util.unimplemented();

              
//in src/avrora/sim/clock/StepSynchronizer.java
throw Util.unimplemented();

              
//in src/avrora/sim/Simulation.java
throw Util.unexpected(e);

              
//in src/avrora/sim/Simulation.java
throw Util.unimplemented();

              
//in src/avrora/sim/Simulation.java
throw Util.unimplemented();

              
//in src/avrora/sim/Simulation.java
throw Util.unimplemented();

              
//in src/avrora/sim/FiniteStateMachine.java
throw Util.failure("cannot transition to state "
                    +newState+" while in transition: "
                    +transEvent.oldState+" -> "+transEvent.newState);

              
//in src/avrora/sim/FiniteStateMachine.java
throw Util.failure("cannot transition from state "
                    +curState+" -> "+newState);

              
//in src/avrora/sim/AtmelInterpreter.java
throw Util.unimplemented();

              
//in src/avrora/sim/AtmelInterpreter.java
throw Util.failure("program will not fit into " + pr.flash_size + " bytes");

              
//in src/avrora/sim/util/InterruptScheduler.java
throw Util.unexpected(e);

              
//in src/avrora/sim/util/InterruptScheduler.java
throw Util.failure("interrupt schedule format expected integer in field 1, line " +
                            currentLine + " of " + schedFile);

              
//in src/avrora/sim/util/InterruptScheduler.java
throw Util.failure("interrupt schedule contains out-of-bounds interrupt vector " +
                            vec + " in line " + currentLine + " of " + schedFile);

              
//in src/avrora/sim/util/InterruptScheduler.java
throw Util.failure("interrupt schedule format expected integer in field 2, line " +
                            currentLine + " of " + schedFile);

              
//in src/avrora/sim/util/InterruptScheduler.java
throw Util.unexpected(e);

              
//in src/avrora/sim/util/InterruptScheduler.java
throw Util.failure("tried to schedule an interrupt in the past; schedule not sorted?");

              
//in src/avrora/sim/util/Mem16.java
throw Util.failure("bug in Mem16!");

              
//in src/avrora/sim/util/Mem16.java
throw Util.failure("bug in Mem16!");

              
//in src/avrora/sim/radio/CC2420Radio.java
throw Util.unimplemented();

              
//in src/avrora/sim/radio/CC2420Radio.java
throw Util.unimplemented();

              
//in src/avrora/sim/radio/CC2420Radio.java
throw Util.unimplemented();

              
//in src/avrora/sim/radio/CC2420Radio.java
throw Util.unimplemented();

              
//in src/avrora/sim/radio/CC2420Radio.java
throw Util.unimplemented();

              
//in src/avrora/sim/radio/CC2420Radio.java
throw Util.unimplemented();

              
//in src/avrora/sim/radio/TopologyStatic.java
throw Util.unexpected(e);

              
//in src/avrora/sim/radio/TopologyStatic.java
throw Util.failure("Error reading topology tokens");

              
//in src/avrora/sim/radio/noise.java
throw Util.failure("Error reading Noise file");

              
//in src/avrora/arch/avr/AVRInterpreter.java
throw Util.failure("program will not fit into " + pr.flash_size + " bytes");

              
//in src/avrora/arch/avr/AVRInterpreter.java
throw Util.unimplemented();

              
//in src/avrora/arch/avr/AVRInstrInterpreter.java
throw Util.failure("invalid operand type in read");

              
//in src/avrora/arch/avr/AVRInstrInterpreter.java
throw Util.failure("invalid operand type in read");

              
//in src/avrora/arch/avr/AVRInstrInterpreter.java
throw Util.failure("invalid operand type in write");

              
//in src/avrora/arch/avr/AVRArchitecture.java
throw Util.unimplemented();

              
//in src/avrora/arch/avr/AVRArchitecture.java
throw Util.unimplemented();

              
//in src/avrora/arch/legacy/LegacyArchitecture.java
throw Util.unimplemented();

              
//in src/avrora/arch/legacy/LegacyArchitecture.java
throw Util.unimplemented();

              
//in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.failure("program will not fit into " + MSP430DataSegment.DATA_SIZE + " bytes");

              
//in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.unimplemented();

              
//in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.unimplemented();

              
//in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.unimplemented();

              
//in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.unimplemented();

              
//in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.unimplemented();

              
//in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.unimplemented();

              
//in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.unimplemented();

              
//in src/avrora/arch/msp430/MSP430InstrInterpreter.java
throw Util.failure("invalid operand type in read");

              
//in src/avrora/arch/msp430/MSP430InstrInterpreter.java
throw Util.failure("invalid operand type in read");

              
//in src/avrora/arch/msp430/MSP430InstrInterpreter.java
throw Util.failure("invalid operand type in write");

              
//in src/avrora/arch/msp430/MSP430InstrInterpreter.java
throw Util.failure("invalid operand type in write");

              
//in src/avrora/arch/msp430/MSP430State.java
throw Util.unimplemented();

              
//in src/avrora/arch/msp430/MSP430Architecture.java
throw Util.unimplemented();

              
//in src/avrora/arch/msp430/MSP430Architecture.java
throw Util.unimplemented();

              
//in src/avrora/core/Program.java
throw Util.failure("address out of range: " + StringUtil.addrToString(addr));

              
//in src/avrora/core/Program.java
throw Util.failure("no next PC after: " + StringUtil.addrToString(pc));

              
//in src/avrora/core/ControlFlowGraph.java
throw Util.unimplemented();

              
//in src/avrora/core/ProgramReader.java
throw Util.failure("invalid indirect edge format: " + StringUtil.quote(s));

              
//in src/avrora/core/LoadableProgram.java
throw Util.failure("Program "+file+" must be loaded before use");

              
//in src/avrora/syntax/objdump/ObjDumpReformatter.java
throw e;

              
//in src/avrora/syntax/objdump/ObjDumpReformatter.java
throw Util.unexpected(e);

              
//in src/avrora/syntax/objdump/ObjDumpParser.java
throw generateParseException();

              
//in src/avrora/syntax/objdump/ObjDumpParser.java
throw jj_ls;

              
//in src/avrora/syntax/Expr.java
throw Util.failure("unknown binary operator: " + op);

              
//in src/avrora/syntax/Expr.java
throw Util.failure("unknown unary operator: " + op);

              
//in src/avrora/syntax/Expr.java
throw Util.failure("unknown function: " + func);

              
//in src/avrora/syntax/Expr.java
throw Util.unexpected(e);

              
//in src/avrora/syntax/Expr.java
throw Util.unexpected(e);

              
//in src/avrora/syntax/Expr.java
throw Util.failure("cannot evaluate a string to an integer");

              
//in src/avrora/syntax/Expr.java
throw Util.failure("unknown operation in relative computation: " + op.image);

              
//in src/avrora/syntax/atmel/AtmelParser.java
throw generateParseException();

              
//in src/avrora/syntax/Item.java
throw Util.failure("misaligned instruction");

              
//in src/avrora/syntax/SyntacticOperand.java
throw Util.failure("register operand not yet simplified: " + name);

              
//in src/avrora/syntax/SyntacticOperand.java
throw Util.failure("expression operand not yet simplified: " + expr);

              
//in src/avrora/syntax/SyntacticOperand.java
throw Util.failure("expression operand not yet simplified: " + expr);

              
//in src/avrora/stack/StateCache.java
throw Util.unimplemented();

              
//in src/avrora/stack/MutableState.java
throw Util.failure("cannot merge abstract states with different program counters");

              
//in src/avrora/stack/MutableState.java
throw Util.failure("cannot compute hash code of MutableState");

              
//in src/avrora/stack/MutableState.java
throw Util.failure("cannot perform .equals() on MutableState");

              
//in src/avrora/stack/isea/ISEInterpreter.java
throw Util.unimplemented();

              
//in src/avrora/stack/isea/ISEInterpreter.java
throw Util.unimplemented();

              
//in src/avrora/stack/isea/ISEInterpreter.java
throw Util.failure("No control flow information for indirect call at: " +
                    StringUtil.addrToString(pc));

              
//in src/avrora/stack/isea/ISEInterpreter.java
throw Util.failure("No control flow information for indirect call at: " +
                    StringUtil.addrToString(pc));

              
//in src/avrora/stack/isea/ISEAnalyzer.java
throw Util.failure("cannot get procedure summary for address: "+StringUtil.addrToString(start));

              
//in src/avrora/stack/isea/ISEAnalyzer.java
throw Util.failure("program contains recursion");

              
//in src/avrora/stack/isea/ISEAbstractState.java
throw Util.failure("stack height mismatch");

              
//in src/avrora/stack/isea/ISEState.java
throw Util.failure("return with nonzero stack height");

              
//in src/avrora/stack/Analyzer.java
throw Util.unexpected(e);

              
//in src/avrora/stack/Analyzer.java
throw e;

              
//in src/avrora/stack/Analyzer.java
throw Util.failure("No control flow information for indirect call at: " +
                        StringUtil.addrToString(callsite));

              
//in src/avrora/stack/Analyzer.java
throw Util.failure("No control flow information for indirect jump at: " +
                        StringUtil.addrToString(callsite));

              
//in src/avrora/stack/StateTransitionGraph.java
throw Util.failure("No edge info for: " + s.getUniqueName());

              
//in src/avrora/stack/StateTransitionGraph.java
throw Util.failure("No edge info for: " + t.getUniqueName());

              
//in src/avrora/stack/StateTransitionGraph.java
throw Util.failure("LegacyState on frontier has no edge info: " + state.getUniqueName());

              
//in src/avrora/stack/StateTransitionGraph.java
throw Util.failure("Attempt to re-add state to frontier: " + s.getUniqueName());

              
//in src/avrora/stack/StateTransitionGraph.java
throw Util.failure("state cannot be on frontier and explored: " + s.getUniqueName());

              
//in src/avrora/stack/AbstractInterpreter.java
throw Util.failure("PC beyond end of program: " + StringUtil.addrToString(pc));

              
//in src/avrora/stack/AbstractInterpreter.java
throw Util.failure("Misaligned instruction access at PC: " + StringUtil.addrToString(pc));

              
//in src/cck/stat/Distribution.java
throw Util.unimplemented();

              
//in src/cck/help/HelpCategory.java
throw Util.unimplemented();

              
//in src/cck/parser/mini/CharStream.java
throw Util.unimplemented();

              
//in src/cck/parser/mini/CharStream.java
throw Util.unimplemented();

              
//in src/cck/parser/mini/CharStream.java
throw Util.unimplemented();

              
//in src/cck/parser/mini/CharStream.java
throw Util.unimplemented();

              
//in src/cck/parser/mini/CharStream.java
throw Util.unimplemented();

              
//in src/cck/parser/mini/CharStream.java
throw Util.unimplemented();

              
//in src/cck/parser/mini/CharStream.java
throw Util.unimplemented();

              
//in src/cck/parser/SimpleCharStream.java
throw e;

              
//in src/cck/elf/ELFProgramHeaderTable.java
throw Util.failure("Only 32 bit ELF files are supported.");

              
//in src/cck/util/Util.java
throw thrown;

              
//in src/cck/util/ClassMap.java
throw Util.failure("Object of class " + StringUtil.quote(cz) + " is not an instance of " + clazz.getName());

              
//in src/cck/util/ClassMap.java
throw Util.unreachable();

              
//in src/cck/text/StringUtil.java
throw Util.failure("stringReplace(): unknown variable " + quote(varname));

              
//in src/jintgen/types/TypeRef.java
throw Util.failure("Unresolved type reference at "+tcName.getSourcePoint());

              
//in src/jintgen/types/SizeDimension.java
throw Util.failure("size type dimension expects 1 parameter");

              
//in src/jintgen/types/SizeDimension.java
throw Util.failure("size type dimension expects AbstractToken, String or Integer");

              
//in src/jintgen/types/SignDimension.java
throw Util.failure("sign type dimension expects 0 or 1 parameters");

              
//in src/jintgen/types/SignDimension.java
throw Util.failure("sign type dimension expects AbstractToken, String or Boolean");

              
//in src/jintgen/types/SignDimension.java
throw Util.failure("sign type dimension expects \"+\" or \"-\"");

              
//in src/jintgen/isdl/InstrDecl.java
throw Util.failure("size for instruction "+name+" has not been computed");

              
//in src/jintgen/isdl/OperandTypeDecl.java
throw Util.failure("Suboperands are not allowed to Simple operands");

              
//in src/jintgen/isdl/parser/SimpleCharStream.java
throw e;

              
//in src/jintgen/isdl/parser/ISDLParser.java
throw generateParseException();

              
//in src/jintgen/isdl/parser/ISDLParser.java
throw jj_ls;

              
//in src/jintgen/isdl/AddrModeUse.java
throw Util.failure("cannot add encoding to addressing mode directly");

              
//in src/jintgen/isdl/OperandTypeRef.java
throw Util.failure("Cannot create operand type reference to type "+t);

              
//in src/jintgen/isdl/OperandTypeRef.java
throw Util.failure("Operand type reference not resolved at "+tcName.getSourcePoint());

              
//in src/jintgen/isdl/verifier/TypeChecker.java
throw Util.unimplemented();

              
//in src/jintgen/isdl/verifier/TypeChecker.java
throw Util.unimplemented();

              
//in src/jintgen/isdl/verifier/TypeChecker.java
throw Util.unimplemented();

              
//in src/jintgen/isdl/verifier/TypeChecker.java
throw Util.unimplemented();

              
//in src/jintgen/isdl/verifier/TypeChecker.java
throw Util.unimplemented();

              
//in src/jintgen/isdl/verifier/TypeChecker.java
throw Util.failure("null type at "+e.getSourcePoint());

              
//in src/jintgen/isdl/verifier/EncodingVerifier.java
throw Util.failure("encoding not word aligned: " + ed.name + " is " + encodingSize + " bits, at:  "
                    +ed.name.beginLine+ ':' +ed.name.beginColumn);

              
//in src/jintgen/isdl/FormatDecl.java
throw Util.failure("negative bit width");

              
//in src/jintgen/isdl/EnumTypeRef.java
throw Util.failure("Cannot create enum type reference to type "+t);

              
//in src/jintgen/isdl/EnumTypeRef.java
throw Util.failure("Enum type reference not resolved at "+tcName.getSourcePoint());

              
//in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
//in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
//in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
//in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
//in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
//in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
//in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
//in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
//in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
//in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
//in src/jintgen/jigir/Arith.java
throw Util.unimplemented();

              
//in src/jintgen/jigir/Literal.java
throw Util.failure("Unresolved member "+ StringUtil.quote(m.image)+" of enum "+d.name);

              
//in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("should not rebuild expr list directly");

              
//in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("cannot convert enum to type other than int");

              
//in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("cannot convert complex operand to any other type");

              
//in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("invalid expected shift of boolean at "+e.getSourcePoint());

              
//in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("unexpected promotion type for boolean literal at "+e.getSourcePoint());

              
//in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("unexpected promotion type for int literal at "+e.getSourcePoint());

              
//in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("cannot convert boolean to other type");

              
//in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("cannot convert from "+ft+" to "+tt);

              
//in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("Unresolved write at "+s.method.getSourcePoint());

              
//in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("Assignment statement not canonicalized");

              
//in src/jintgen/gen/DeadCodeEliminator.java
throw Util.unimplemented();

              
//in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
//in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
//in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
//in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
//in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
//in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
//in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
//in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
//in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
//in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
//in src/jintgen/gen/Inliner.java
throw Util.unimplemented();

              
//in src/jintgen/gen/Inliner.java
throw Util.failure("return not within subroutine!");

              
//in src/jintgen/gen/Canonicalizer.java
throw Util.failure("cannot canonicalize assign to "+s.dest.getClass());

              
//in src/jintgen/gen/Canonicalizer.java
throw Util.failure("cannot canonicalize fixed-range assign to bit access");

              
//in src/jintgen/gen/Canonicalizer.java
throw Util.failure("cannot canonicalize fixed-range assign to "+fre.expr.getClass());

              
//in src/jintgen/gen/Generator.java
throw Util.failure("unknown class template: "+n);

              
//in src/jintgen/gen/disassembler/DTBuilder.java
throw Util.failure("invalid bit state at "+cntr+" in "+ei);

              
//in src/jintgen/gen/disassembler/ReaderImplementation.java
throw Util.failure("bit "+cntr+" of operand "+StringUtil.quote(name)+" in encoding "+
                            decl.name+" at "+DGUtil.pos(decl.name)+" is not present in the encoding");

              
//in src/jintgen/gen/disassembler/DisassemblerGenerator.java
throw Util.failure("Enumeration "+StringUtil.quote(d.name)+" too sparse");

              
//in src/jintgen/gen/disassembler/DGUtil.java
throw Util.failure("Disassembler generator cannot continue");

              
//in src/jintgen/gen/ConstantPropagator.java
throw Util.unimplemented();

            
- -
- Builder 231
              
// in src/avrora/monitors/GDBServer.java
throw Util.failure("Unexpected IOException: "+e);

              
// in src/avrora/monitors/GDBServer.java
throw Util.failure("Unexpected IOException: "+e);

              
// in src/avrora/monitors/GDBServer.java
throw Util.failure("Unexpected IOException: "+e);

              
// in src/avrora/monitors/TraceMonitor.java
throw Util.failure("invalid address format: " + StringUtil.quote(str));

              
// in src/avrora/monitors/EnergyMonitor.java
throw Util.unexpected(e);

              
// in src/avrora/monitors/EnergyMonitor.java
throw Util.unexpected(e);

              
// in src/avrora/monitors/EnergyMonitor.java
throw Util.unexpected(e);

              
// in src/avrora/monitors/EnergyMonitor.java
throw Util.unexpected(e);

              
// in src/avrora/monitors/TripTimeMonitor.java
throw Util.failure("invalid address format: " + StringUtil.quote(str));

              
// in src/avrora/monitors/SimpleBatteryMonitor.java
throw Util.unimplemented();

              
// in src/avrora/monitors/CallStack.java
throw Util.failure("Stack overflow: more than "+maxDepth+" calls nested");

              
// in src/avrora/gui/TimeScale.java
throw Util.failure("Zoom level not supported: "+scale);

              
// in src/avrora/gui/MonitorPanel.java
throw Util.unimplemented();

              
// in src/avrora/gui/AvroraGui.java
throw Util.failure("Resource not found: " + path);

              
// in src/avrora/gui/ManageSimInput.java
throw Util.failure(e.toString());

              
// in src/avrora/sim/mcu/RegisterSet.java
throw Util.unimplemented();

              
// in src/avrora/sim/mcu/RegisterSet.java
throw Util.failure("Field not found in RegisterSet: "+ StringUtil.quote(fname));

              
// in src/avrora/sim/mcu/AtmelInternalDevice.java
throw Util.unimplemented();

              
// in src/avrora/sim/mcu/ATMegaTimer.java
throw Util.failure("Fixed top value flushed");

              
// in src/avrora/sim/mcu/ReprogrammableCodeSegment.java
throw Util.failure("invalid instruction at "+ StringUtil.addrToString(address));

              
// in src/avrora/sim/mcu/ReprogrammableCodeSegment.java
throw Util.failure("DisassembleLegacyInstr should be confined to BaseInterpreter");

              
// in src/avrora/sim/mcu/ReprogrammableCodeSegment.java
throw Util.failure("DisassembleLegacyInstr has no operands");

              
// in src/avrora/sim/CodeSegment.java
throw Util.failure("Update of flash memory not supported for this segment");

              
// in src/avrora/sim/CodeSegment.java
throw Util.failure("ProbedLegacyInstr should be confined to BaseInterpreter");

              
// in src/avrora/sim/CodeSegment.java
throw Util.failure("no instruction here");

              
// in src/avrora/sim/CodeSegment.java
throw Util.failure("no instruction here");

              
// in src/avrora/sim/types/SensorSimulation.java
throw Util.unexpected(e);

              
// in src/avrora/sim/platform/sensors/ReplaySensorData.java
throw Util.failure("sensor data format error: expected number as sensor reading");

              
// in src/avrora/sim/platform/sensors/ReplaySensorData.java
throw Util.unexpected(e);

              
// in src/avrora/sim/platform/sensors/ReplaySensorData.java
throw Util.failure("sensor data format error: expected number as time value");

              
// in src/avrora/sim/platform/SerialForwarder.java
throw Util.unexpected(e);

              
// in src/avrora/sim/platform/SerialForwarder.java
throw Util.unexpected(e);

              
// in src/avrora/sim/platform/SerialForwarder.java
throw Util.unexpected(e);

              
// in src/avrora/sim/platform/SerialForwarder.java
throw Util.unexpected(e);

              
// in src/avrora/sim/platform/SerialForwarder.java
throw Util.unexpected(e);

              
// in src/avrora/sim/platform/SerialForwarder.java
throw Util.unexpected(e);

              
// in src/avrora/sim/platform/SerialLogger.java
throw Util.failure("transmitFrame should not be called in SerialLogger");

              
// in src/avrora/sim/platform/SPIForwarder.java
throw Util.unexpected(e);

              
// in src/avrora/sim/platform/SPIForwarder.java
throw Util.unexpected(e);

              
// in src/avrora/sim/platform/SPIForwarder.java
throw Util.unexpected(e);

              
// in src/avrora/sim/platform/SPIForwarder.java
throw Util.unexpected(e);

              
// in src/avrora/sim/clock/RippleSynchronizer.java
throw Util.unimplemented();

              
// in src/avrora/sim/clock/RippleSynchronizer.java
throw Util.unimplemented();

              
// in src/avrora/sim/clock/RippleSynchronizer.java
throw Util.unimplemented();

              
// in src/avrora/sim/clock/DerivedClock.java
throw Util.failure("cannot derive faster clock from slower clock");

              
// in src/avrora/sim/clock/Synchronizer.java
throw Util.failure("Only one node supported at a time");

              
// in src/avrora/sim/clock/Synchronizer.java
throw Util.failure("No nodes in simulation");

              
// in src/avrora/sim/clock/Synchronizer.java
throw Util.unimplemented();

              
// in src/avrora/sim/clock/Synchronizer.java
throw Util.unimplemented();

              
// in src/avrora/sim/clock/Synchronizer.java
throw Util.unimplemented();

              
// in src/avrora/sim/clock/SystemClock.java
throw Util.unimplemented();

              
// in src/avrora/sim/clock/SystemClock.java
throw Util.unimplemented();

              
// in src/avrora/sim/clock/SystemClock.java
throw Util.unimplemented();

              
// in src/avrora/sim/clock/BarrierSynchronizer.java
throw Util.unexpected(e);

              
// in src/avrora/sim/clock/BarrierSynchronizer.java
throw Util.unimplemented();

              
// in src/avrora/sim/clock/BarrierSynchronizer.java
throw Util.unimplemented();

              
// in src/avrora/sim/clock/BarrierSynchronizer.java
throw Util.unexpected(e);

              
// in src/avrora/sim/clock/StepSynchronizer.java
throw Util.unimplemented();

              
// in src/avrora/sim/clock/StepSynchronizer.java
throw Util.unimplemented();

              
// in src/avrora/sim/clock/StepSynchronizer.java
throw Util.unimplemented();

              
// in src/avrora/sim/clock/StepSynchronizer.java
throw Util.unimplemented();

              
// in src/avrora/sim/clock/StepSynchronizer.java
throw Util.unimplemented();

              
// in src/avrora/sim/Simulation.java
throw Util.unexpected(e);

              
// in src/avrora/sim/Simulation.java
throw Util.unimplemented();

              
// in src/avrora/sim/Simulation.java
throw Util.unimplemented();

              
// in src/avrora/sim/Simulation.java
throw Util.unimplemented();

              
// in src/avrora/sim/FiniteStateMachine.java
throw Util.failure("cannot transition to state "
                    +newState+" while in transition: "
                    +transEvent.oldState+" -> "+transEvent.newState);

              
// in src/avrora/sim/FiniteStateMachine.java
throw Util.failure("cannot transition from state "
                    +curState+" -> "+newState);

              
// in src/avrora/sim/AtmelInterpreter.java
throw Util.unimplemented();

              
// in src/avrora/sim/AtmelInterpreter.java
throw Util.failure("program will not fit into " + pr.flash_size + " bytes");

              
// in src/avrora/sim/util/InterruptScheduler.java
throw Util.unexpected(e);

              
// in src/avrora/sim/util/InterruptScheduler.java
throw Util.failure("interrupt schedule format expected integer in field 1, line " +
                            currentLine + " of " + schedFile);

              
// in src/avrora/sim/util/InterruptScheduler.java
throw Util.failure("interrupt schedule contains out-of-bounds interrupt vector " +
                            vec + " in line " + currentLine + " of " + schedFile);

              
// in src/avrora/sim/util/InterruptScheduler.java
throw Util.failure("interrupt schedule format expected integer in field 2, line " +
                            currentLine + " of " + schedFile);

              
// in src/avrora/sim/util/InterruptScheduler.java
throw Util.unexpected(e);

              
// in src/avrora/sim/util/InterruptScheduler.java
throw Util.failure("tried to schedule an interrupt in the past; schedule not sorted?");

              
// in src/avrora/sim/util/Mem16.java
throw Util.failure("bug in Mem16!");

              
// in src/avrora/sim/util/Mem16.java
throw Util.failure("bug in Mem16!");

              
// in src/avrora/sim/radio/CC2420Radio.java
throw Util.unimplemented();

              
// in src/avrora/sim/radio/CC2420Radio.java
throw Util.unimplemented();

              
// in src/avrora/sim/radio/CC2420Radio.java
throw Util.unimplemented();

              
// in src/avrora/sim/radio/CC2420Radio.java
throw Util.unimplemented();

              
// in src/avrora/sim/radio/CC2420Radio.java
throw Util.unimplemented();

              
// in src/avrora/sim/radio/CC2420Radio.java
throw Util.unimplemented();

              
// in src/avrora/sim/radio/TopologyStatic.java
throw Util.unexpected(e);

              
// in src/avrora/sim/radio/TopologyStatic.java
throw Util.failure("Error reading topology tokens");

              
// in src/avrora/sim/radio/noise.java
throw Util.failure("Error reading Noise file");

              
// in src/avrora/arch/avr/AVRInterpreter.java
throw Util.failure("program will not fit into " + pr.flash_size + " bytes");

              
// in src/avrora/arch/avr/AVRInterpreter.java
throw Util.unimplemented();

              
// in src/avrora/arch/avr/AVRInstrInterpreter.java
throw Util.failure("invalid operand type in read");

              
// in src/avrora/arch/avr/AVRInstrInterpreter.java
throw Util.failure("invalid operand type in read");

              
// in src/avrora/arch/avr/AVRInstrInterpreter.java
throw Util.failure("invalid operand type in write");

              
// in src/avrora/arch/avr/AVRArchitecture.java
throw Util.unimplemented();

              
// in src/avrora/arch/avr/AVRArchitecture.java
throw Util.unimplemented();

              
// in src/avrora/arch/legacy/LegacyArchitecture.java
throw Util.unimplemented();

              
// in src/avrora/arch/legacy/LegacyArchitecture.java
throw Util.unimplemented();

              
// in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.failure("program will not fit into " + MSP430DataSegment.DATA_SIZE + " bytes");

              
// in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.unimplemented();

              
// in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.unimplemented();

              
// in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.unimplemented();

              
// in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.unimplemented();

              
// in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.unimplemented();

              
// in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.unimplemented();

              
// in src/avrora/arch/msp430/MSP430Interpreter.java
throw Util.unimplemented();

              
// in src/avrora/arch/msp430/MSP430InstrInterpreter.java
throw Util.failure("invalid operand type in read");

              
// in src/avrora/arch/msp430/MSP430InstrInterpreter.java
throw Util.failure("invalid operand type in read");

              
// in src/avrora/arch/msp430/MSP430InstrInterpreter.java
throw Util.failure("invalid operand type in write");

              
// in src/avrora/arch/msp430/MSP430InstrInterpreter.java
throw Util.failure("invalid operand type in write");

              
// in src/avrora/arch/msp430/MSP430State.java
throw Util.unimplemented();

              
// in src/avrora/arch/msp430/MSP430Architecture.java
throw Util.unimplemented();

              
// in src/avrora/arch/msp430/MSP430Architecture.java
throw Util.unimplemented();

              
// in src/avrora/core/Program.java
throw Util.failure("address out of range: " + StringUtil.addrToString(addr));

              
// in src/avrora/core/Program.java
throw Util.failure("no next PC after: " + StringUtil.addrToString(pc));

              
// in src/avrora/core/ControlFlowGraph.java
throw Util.unimplemented();

              
// in src/avrora/core/ProgramReader.java
throw Util.failure("invalid indirect edge format: " + StringUtil.quote(s));

              
// in src/avrora/core/LoadableProgram.java
throw Util.failure("Program "+file+" must be loaded before use");

              
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
throw Util.unexpected(e);

              
// in src/avrora/syntax/objdump/ObjDumpParser.java
throw generateParseException();

              
// in src/avrora/syntax/Expr.java
throw Util.failure("unknown binary operator: " + op);

              
// in src/avrora/syntax/Expr.java
throw Util.failure("unknown unary operator: " + op);

              
// in src/avrora/syntax/Expr.java
throw Util.failure("unknown function: " + func);

              
// in src/avrora/syntax/Expr.java
throw Util.unexpected(e);

              
// in src/avrora/syntax/Expr.java
throw Util.unexpected(e);

              
// in src/avrora/syntax/Expr.java
throw Util.failure("cannot evaluate a string to an integer");

              
// in src/avrora/syntax/Expr.java
throw Util.failure("unknown operation in relative computation: " + op.image);

              
// in src/avrora/syntax/atmel/AtmelParser.java
throw generateParseException();

              
// in src/avrora/syntax/Item.java
throw Util.failure("misaligned instruction");

              
// in src/avrora/syntax/SyntacticOperand.java
throw Util.failure("register operand not yet simplified: " + name);

              
// in src/avrora/syntax/SyntacticOperand.java
throw Util.failure("expression operand not yet simplified: " + expr);

              
// in src/avrora/syntax/SyntacticOperand.java
throw Util.failure("expression operand not yet simplified: " + expr);

              
// in src/avrora/stack/StateCache.java
throw Util.unimplemented();

              
// in src/avrora/stack/MutableState.java
throw Util.failure("cannot merge abstract states with different program counters");

              
// in src/avrora/stack/MutableState.java
throw Util.failure("cannot compute hash code of MutableState");

              
// in src/avrora/stack/MutableState.java
throw Util.failure("cannot perform .equals() on MutableState");

              
// in src/avrora/stack/isea/ISEInterpreter.java
throw Util.unimplemented();

              
// in src/avrora/stack/isea/ISEInterpreter.java
throw Util.unimplemented();

              
// in src/avrora/stack/isea/ISEInterpreter.java
throw Util.failure("No control flow information for indirect call at: " +
                    StringUtil.addrToString(pc));

              
// in src/avrora/stack/isea/ISEInterpreter.java
throw Util.failure("No control flow information for indirect call at: " +
                    StringUtil.addrToString(pc));

              
// in src/avrora/stack/isea/ISEAnalyzer.java
throw Util.failure("cannot get procedure summary for address: "+StringUtil.addrToString(start));

              
// in src/avrora/stack/isea/ISEAnalyzer.java
throw Util.failure("program contains recursion");

              
// in src/avrora/stack/isea/ISEAbstractState.java
throw Util.failure("stack height mismatch");

              
// in src/avrora/stack/isea/ISEState.java
throw Util.failure("return with nonzero stack height");

              
// in src/avrora/stack/Analyzer.java
throw Util.unexpected(e);

              
// in src/avrora/stack/Analyzer.java
throw Util.failure("No control flow information for indirect call at: " +
                        StringUtil.addrToString(callsite));

              
// in src/avrora/stack/Analyzer.java
throw Util.failure("No control flow information for indirect jump at: " +
                        StringUtil.addrToString(callsite));

              
// in src/avrora/stack/StateTransitionGraph.java
throw Util.failure("No edge info for: " + s.getUniqueName());

              
// in src/avrora/stack/StateTransitionGraph.java
throw Util.failure("No edge info for: " + t.getUniqueName());

              
// in src/avrora/stack/StateTransitionGraph.java
throw Util.failure("LegacyState on frontier has no edge info: " + state.getUniqueName());

              
// in src/avrora/stack/StateTransitionGraph.java
throw Util.failure("Attempt to re-add state to frontier: " + s.getUniqueName());

              
// in src/avrora/stack/StateTransitionGraph.java
throw Util.failure("state cannot be on frontier and explored: " + s.getUniqueName());

              
// in src/avrora/stack/AbstractInterpreter.java
throw Util.failure("PC beyond end of program: " + StringUtil.addrToString(pc));

              
// in src/avrora/stack/AbstractInterpreter.java
throw Util.failure("Misaligned instruction access at PC: " + StringUtil.addrToString(pc));

              
// in src/cck/stat/Distribution.java
throw Util.unimplemented();

              
// in src/cck/help/HelpCategory.java
throw Util.unimplemented();

              
// in src/cck/parser/mini/CharStream.java
throw Util.unimplemented();

              
// in src/cck/parser/mini/CharStream.java
throw Util.unimplemented();

              
// in src/cck/parser/mini/CharStream.java
throw Util.unimplemented();

              
// in src/cck/parser/mini/CharStream.java
throw Util.unimplemented();

              
// in src/cck/parser/mini/CharStream.java
throw Util.unimplemented();

              
// in src/cck/parser/mini/CharStream.java
throw Util.unimplemented();

              
// in src/cck/parser/mini/CharStream.java
throw Util.unimplemented();

              
// in src/cck/elf/ELFProgramHeaderTable.java
throw Util.failure("Only 32 bit ELF files are supported.");

              
// in src/cck/util/ClassMap.java
throw Util.failure("Object of class " + StringUtil.quote(cz) + " is not an instance of " + clazz.getName());

              
// in src/cck/util/ClassMap.java
throw Util.unreachable();

              
// in src/cck/text/StringUtil.java
throw Util.failure("stringReplace(): unknown variable " + quote(varname));

              
// in src/jintgen/types/TypeRef.java
throw Util.failure("Unresolved type reference at "+tcName.getSourcePoint());

              
// in src/jintgen/types/SizeDimension.java
throw Util.failure("size type dimension expects 1 parameter");

              
// in src/jintgen/types/SizeDimension.java
throw Util.failure("size type dimension expects AbstractToken, String or Integer");

              
// in src/jintgen/types/SignDimension.java
throw Util.failure("sign type dimension expects 0 or 1 parameters");

              
// in src/jintgen/types/SignDimension.java
throw Util.failure("sign type dimension expects AbstractToken, String or Boolean");

              
// in src/jintgen/types/SignDimension.java
throw Util.failure("sign type dimension expects \"+\" or \"-\"");

              
// in src/jintgen/isdl/InstrDecl.java
throw Util.failure("size for instruction "+name+" has not been computed");

              
// in src/jintgen/isdl/OperandTypeDecl.java
throw Util.failure("Suboperands are not allowed to Simple operands");

              
// in src/jintgen/isdl/parser/ISDLParser.java
throw generateParseException();

              
// in src/jintgen/isdl/AddrModeUse.java
throw Util.failure("cannot add encoding to addressing mode directly");

              
// in src/jintgen/isdl/OperandTypeRef.java
throw Util.failure("Cannot create operand type reference to type "+t);

              
// in src/jintgen/isdl/OperandTypeRef.java
throw Util.failure("Operand type reference not resolved at "+tcName.getSourcePoint());

              
// in src/jintgen/isdl/verifier/TypeChecker.java
throw Util.unimplemented();

              
// in src/jintgen/isdl/verifier/TypeChecker.java
throw Util.unimplemented();

              
// in src/jintgen/isdl/verifier/TypeChecker.java
throw Util.unimplemented();

              
// in src/jintgen/isdl/verifier/TypeChecker.java
throw Util.unimplemented();

              
// in src/jintgen/isdl/verifier/TypeChecker.java
throw Util.unimplemented();

              
// in src/jintgen/isdl/verifier/TypeChecker.java
throw Util.failure("null type at "+e.getSourcePoint());

              
// in src/jintgen/isdl/verifier/EncodingVerifier.java
throw Util.failure("encoding not word aligned: " + ed.name + " is " + encodingSize + " bits, at:  "
                    +ed.name.beginLine+ ':' +ed.name.beginColumn);

              
// in src/jintgen/isdl/FormatDecl.java
throw Util.failure("negative bit width");

              
// in src/jintgen/isdl/EnumTypeRef.java
throw Util.failure("Cannot create enum type reference to type "+t);

              
// in src/jintgen/isdl/EnumTypeRef.java
throw Util.failure("Enum type reference not resolved at "+tcName.getSourcePoint());

              
// in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
// in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
// in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
// in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
// in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
// in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
// in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
// in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
// in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
// in src/jintgen/jigir/Logical.java
throw Util.unimplemented();

              
// in src/jintgen/jigir/Arith.java
throw Util.unimplemented();

              
// in src/jintgen/jigir/Literal.java
throw Util.failure("Unresolved member "+ StringUtil.quote(m.image)+" of enum "+d.name);

              
// in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("should not rebuild expr list directly");

              
// in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("cannot convert enum to type other than int");

              
// in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("cannot convert complex operand to any other type");

              
// in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("invalid expected shift of boolean at "+e.getSourcePoint());

              
// in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("unexpected promotion type for boolean literal at "+e.getSourcePoint());

              
// in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("unexpected promotion type for int literal at "+e.getSourcePoint());

              
// in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("cannot convert boolean to other type");

              
// in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("cannot convert from "+ft+" to "+tt);

              
// in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("Unresolved write at "+s.method.getSourcePoint());

              
// in src/jintgen/gen/CodeSimplifier.java
throw Util.failure("Assignment statement not canonicalized");

              
// in src/jintgen/gen/DeadCodeEliminator.java
throw Util.unimplemented();

              
// in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
// in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
// in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
// in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
// in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
// in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
// in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
// in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
// in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
// in src/jintgen/gen/CodemapGenerator.java
throw Util.unimplemented();

              
// in src/jintgen/gen/Inliner.java
throw Util.unimplemented();

              
// in src/jintgen/gen/Inliner.java
throw Util.failure("return not within subroutine!");

              
// in src/jintgen/gen/Canonicalizer.java
throw Util.failure("cannot canonicalize assign to "+s.dest.getClass());

              
// in src/jintgen/gen/Canonicalizer.java
throw Util.failure("cannot canonicalize fixed-range assign to bit access");

              
// in src/jintgen/gen/Canonicalizer.java
throw Util.failure("cannot canonicalize fixed-range assign to "+fre.expr.getClass());

              
// in src/jintgen/gen/Generator.java
throw Util.failure("unknown class template: "+n);

              
// in src/jintgen/gen/disassembler/DTBuilder.java
throw Util.failure("invalid bit state at "+cntr+" in "+ei);

              
// in src/jintgen/gen/disassembler/ReaderImplementation.java
throw Util.failure("bit "+cntr+" of operand "+StringUtil.quote(name)+" in encoding "+
                            decl.name+" at "+DGUtil.pos(decl.name)+" is not present in the encoding");

              
// in src/jintgen/gen/disassembler/DisassemblerGenerator.java
throw Util.failure("Enumeration "+StringUtil.quote(d.name)+" too sparse");

              
// in src/jintgen/gen/disassembler/DGUtil.java
throw Util.failure("Disassembler generator cannot continue");

              
// in src/jintgen/gen/ConstantPropagator.java
throw Util.unimplemented();

            
- -
- Variable 8
              
// in src/avrora/actions/SimAction.java
throw thrown;

              
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
throw e;

              
// in src/avrora/syntax/objdump/ObjDumpParser.java
throw jj_ls;

              
// in src/avrora/stack/Analyzer.java
throw e;

              
// in src/cck/parser/SimpleCharStream.java
throw e;

              
// in src/cck/util/Util.java
throw thrown;

              
// in src/jintgen/isdl/parser/SimpleCharStream.java
throw e;

              
// in src/jintgen/isdl/parser/ISDLParser.java
throw jj_ls;

            
- -
(Domain) ParseException 69
              
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Statement() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LABEL: Label(); break; case INTEGER_LITERAL: Item(); break; default: jj_la1[4] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Item() throws ParseException { Token addr; addr = jj_consume_token(INTEGER_LITERAL); jj_consume_token(154); rawModule.setAddress(addr); RawData(); rawModule.setAddress(addr); switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case ADIW: case AND: case ANDI: case ASR: case BCLR: case BLD: case BRBC: case BRBS: case BRCC: case BRCS: case BREAK: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case BST: case CALL: case CBI: case CBR: case CLC: case CLH: case CLI: case CLN: case CLR: case CLS: case CLT: case CLV: case CLZ: case COM: case CP: case CPC: case CPI: case CPSE: case DEC: case EICALL: case EIJMP: case ELPM: case EOR: case FMUL: case FMULS: case FMULSU: case ICALL: case IJMP: case IN: case INC: case JMP: case LD: case LDD: case LDI: case LDS: case LPM: case LSL: case LSR: case MOV: case MOVW: case MUL: case MULS: case MULSU: case NEG: case NOP: case OR: case ORI: case OUT: case POP: case PUSH: case RCALL: case RET: case RETI: case RJMP: case ROL: case ROR: case SBC: case SBCI: case SBI: case SBIC: case SBIS: case SBIW: case SBR: case SBRC: case SBRS: case SEC: case SEH: case SEI: case SEN: case SER: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case ST: case STD: case STS: case SUB: case SUBI: case SWAP: case TST: case WDR: Instruction(); break; case WORD: Data(); break; default: jj_la1[5] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void RawData() throws ParseException { if (jj_2_1(3)) { Raw4(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: Raw2(); break; default: jj_la1[6] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Instruction() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case AND: case CP: case CPC: case CPSE: case EOR: case FMUL: case FMULS: case FMULSU: case MOV: case MOVW: case MUL: case MULS: case MULSU: case OR: case SBC: case SUB: InstrGPRGPR(); break; case ASR: case CLR: case COM: case DEC: case INC: case LSL: case LSR: case NEG: case POP: case PUSH: case ROL: case ROR: case SER: case SWAP: case TST: InstrGPR(); break; case ADIW: case ANDI: case BLD: case BST: case CBR: case CPI: case ORI: case SBCI: case SBIW: case SBR: case SBRC: case SBRS: case SUBI: InstrGPRIMM(); break; case IN: InstrInput(); break; case OUT: InstrOutput(); break; case BCLR: case BRCC: case BRCS: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case CALL: case JMP: case RCALL: case RJMP: InstrIMM(); break; case BRBC: case BRBS: case CBI: case SBI: case SBIC: case SBIS: InstrIMMIMM(); break; case BREAK: case CLC: case CLH: case CLI: case CLN: case CLS: case CLT: case CLV: case CLZ: case EICALL: case EIJMP: case ICALL: case IJMP: case NOP: case RET: case RETI: case SEC: case SEH: case SEI: case SEN: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case WDR: InstrBARE(); break; case ELPM: case LD: case LDD: case LDI: case LDS: case LPM: InstrLoad(); break; case ST: case STD: case STS: InstrStore(); break; default: jj_la1[7] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeGPRGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: t = jj_consume_token(ADD); break; case ADC: t = jj_consume_token(ADC); break; case SUB: t = jj_consume_token(SUB); break; case SBC: t = jj_consume_token(SBC); break; case AND: t = jj_consume_token(AND); break; case OR: t = jj_consume_token(OR); break; case EOR: t = jj_consume_token(EOR); break; case MUL: t = jj_consume_token(MUL); break; case MULS: t = jj_consume_token(MULS); break; case MULSU: t = jj_consume_token(MULSU); break; case FMUL: t = jj_consume_token(FMUL); break; case FMULS: t = jj_consume_token(FMULS); break; case FMULSU: t = jj_consume_token(FMULSU); break; case CPSE: t = jj_consume_token(CPSE); break; case CP: t = jj_consume_token(CP); break; case CPC: t = jj_consume_token(CPC); break; case MOV: t = jj_consume_token(MOV); break; case MOVW: t = jj_consume_token(MOVW); break; default: jj_la1[8] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case COM: t = jj_consume_token(COM); break; case NEG: t = jj_consume_token(NEG); break; case INC: t = jj_consume_token(INC); break; case DEC: t = jj_consume_token(DEC); break; case TST: t = jj_consume_token(TST); break; case CLR: t = jj_consume_token(CLR); break; case SER: t = jj_consume_token(SER); break; case PUSH: t = jj_consume_token(PUSH); break; case POP: t = jj_consume_token(POP); break; case LSL: t = jj_consume_token(LSL); break; case LSR: t = jj_consume_token(LSR); break; case ROL: t = jj_consume_token(ROL); break; case ROR: t = jj_consume_token(ROR); break; case ASR: t = jj_consume_token(ASR); break; case SWAP: t = jj_consume_token(SWAP); break; default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeGPRIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADIW: t = jj_consume_token(ADIW); break; case SUBI: t = jj_consume_token(SUBI); break; case SBCI: t = jj_consume_token(SBCI); break; case SBIW: t = jj_consume_token(SBIW); break; case ANDI: t = jj_consume_token(ANDI); break; case ORI: t = jj_consume_token(ORI); break; case SBR: t = jj_consume_token(SBR); break; case CBR: t = jj_consume_token(CBR); break; case CPI: t = jj_consume_token(CPI); break; case SBRC: t = jj_consume_token(SBRC); break; case SBRS: t = jj_consume_token(SBRS); break; case BST: t = jj_consume_token(BST); break; case BLD: t = jj_consume_token(BLD); break; default: jj_la1[10] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case RJMP: t = jj_consume_token(RJMP); break; case JMP: t = jj_consume_token(JMP); break; case RCALL: t = jj_consume_token(RCALL); break; case CALL: t = jj_consume_token(CALL); break; case BREQ: t = jj_consume_token(BREQ); break; case BRNE: t = jj_consume_token(BRNE); break; case BRCS: t = jj_consume_token(BRCS); break; case BRCC: t = jj_consume_token(BRCC); break; case BRSH: t = jj_consume_token(BRSH); break; case BRLO: t = jj_consume_token(BRLO); break; case BRMI: t = jj_consume_token(BRMI); break; case BRPL: t = jj_consume_token(BRPL); break; case BRGE: t = jj_consume_token(BRGE); break; case BRLT: t = jj_consume_token(BRLT); break; case BRHS: t = jj_consume_token(BRHS); break; case BRHC: t = jj_consume_token(BRHC); break; case BRTS: t = jj_consume_token(BRTS); break; case BRTC: t = jj_consume_token(BRTC); break; case BRVS: t = jj_consume_token(BRVS); break; case BRVC: t = jj_consume_token(BRVC); break; case BRIE: t = jj_consume_token(BRIE); break; case BRID: t = jj_consume_token(BRID); break; case BSET: t = jj_consume_token(BSET); break; case BCLR: t = jj_consume_token(BCLR); break; default: jj_la1[11] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeIMMIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case SBIC: t = jj_consume_token(SBIC); break; case SBIS: t = jj_consume_token(SBIS); break; case BRBS: t = jj_consume_token(BRBS); break; case BRBC: t = jj_consume_token(BRBC); break; case SBI: t = jj_consume_token(SBI); break; case CBI: t = jj_consume_token(CBI); break; default: jj_la1[12] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLoad() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LDI: InstrLDI(); break; case LD: InstrLD_variant(); break; case LDD: InstrLDD(); break; case LDS: InstrLDS(); break; case ELPM: case LPM: InstrLPM_variant(); break; default: jj_la1[13] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLD_variant() throws ParseException { if (jj_2_2(5)) { InstrLDPI(); } else if (jj_2_3(4)) { InstrLDPD(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LD: InstrLD(); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLPM_variant() throws ParseException { if (jj_2_4(5)) { InstrLPMGPRGPRP(); } else if (jj_2_5(3)) { InstrLPMGPRGPR(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ELPM: case LPM: InstrLPMBARE(); break; default: jj_la1[15] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeLPM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LPM: t = jj_consume_token(LPM); break; case ELPM: t = jj_consume_token(ELPM); break; default: jj_la1[16] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrStore() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrST_variant(); break; case STD: InstrSTD(); break; case STS: InstrSTS(); break; default: jj_la1[17] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrST_variant() throws ParseException { if (jj_2_6(3)) { InstrST(); } else if (jj_2_7(3)) { InstrSTPI(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrSTPD(); break; default: jj_la1[18] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrBARE() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IJMP: t = jj_consume_token(IJMP); break; case ICALL: t = jj_consume_token(ICALL); break; case RET: t = jj_consume_token(RET); break; case RETI: t = jj_consume_token(RETI); break; case SEC: t = jj_consume_token(SEC); break; case CLC: t = jj_consume_token(CLC); break; case SEN: t = jj_consume_token(SEN); break; case CLN: t = jj_consume_token(CLN); break; case SEZ: t = jj_consume_token(SEZ); break; case CLZ: t = jj_consume_token(CLZ); break; case SEI: t = jj_consume_token(SEI); break; case CLI: t = jj_consume_token(CLI); break; case SES: t = jj_consume_token(SES); break; case CLS: t = jj_consume_token(CLS); break; case SEV: t = jj_consume_token(SEV); break; case CLV: t = jj_consume_token(CLV); break; case SET: t = jj_consume_token(SET); break; case CLT: t = jj_consume_token(CLT); break; case SEH: t = jj_consume_token(SEH); break; case CLH: t = jj_consume_token(CLH); break; case NOP: t = jj_consume_token(NOP); break; case SLEEP: t = jj_consume_token(SLEEP); break; case WDR: t = jj_consume_token(WDR); break; case BREAK: t = jj_consume_token(BREAK); break; case SPM: t = jj_consume_token(SPM); break; case EIJMP: t = jj_consume_token(EIJMP); break; case EICALL: t = jj_consume_token(EICALL); break; default: jj_la1[19] = jj_gen; jj_consume_token(-1); throw new ParseException(); } module.addInstruction(t.image, t); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public SyntacticOperand.Expr Const() throws ParseException { Expr e; if (jj_2_8(2147483647)) { e = RelExpr(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case IDENTIFIER: e = Term(); break; default: jj_la1[20] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } return module.newOperand(e); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Expr Term() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IDENTIFIER: tok = jj_consume_token(IDENTIFIER); e = new Expr.Variable(tok); break; case INTEGER_LITERAL: tok = jj_consume_token(INTEGER_LITERAL); e = new Expr.Constant(tok); break; default: jj_la1[21] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token BinOp() throws ParseException { Token tok; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 157: tok = jj_consume_token(157); break; case 158: tok = jj_consume_token(158); break; default: jj_la1[22] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return tok; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Module() throws ParseException { label_1: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case ADIW: case AND: case ANDI: case ASR: case BCLR: case BLD: case BRBC: case BRBS: case BRCC: case BRCS: case BREAK: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case BST: case CALL: case CBI: case CBR: case CLC: case CLH: case CLI: case CLN: case CLR: case CLS: case CLT: case CLV: case CLZ: case COM: case CP: case CPC: case CPI: case CPSE: case DEC: case EICALL: case EIJMP: case ELPM: case EOR: case FMUL: case FMULS: case FMULSU: case ICALL: case IJMP: case IN: case INC: case JMP: case LD: case LDD: case LDI: case LDS: case LPM: case LSL: case LSR: case MOV: case MOVW: case MUL: case MULS: case MULSU: case NEG: case NOP: case OR: case ORI: case OUT: case POP: case PUSH: case RCALL: case RET: case RETI: case RJMP: case ROL: case ROR: case SBC: case SBCI: case SBI: case SBIC: case SBIS: case SBIW: case SBR: case SBRC: case SBRS: case SEC: case SEH: case SEI: case SEN: case SER: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case ST: case STD: case STS: case SUB: case SUBI: case SWAP: case TST: case WDR: case IDENTIFIER: case 149: case 151: case 152: case 153: case 154: case 155: case 156: case 157: case 159: case 160: case 161: case 162: case 163: break; default: jj_la1[0] = jj_gen; break label_1; } Statement(); } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 0: jj_consume_token(0); break; case 158: ExitDirective(); break; default: jj_la1[1] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Statement() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 149: case 151: case 152: case 153: case 154: case 155: case 156: case 157: case 159: case 160: case 161: case 162: case 163: Directive(); break; case ADD: case ADC: case ADIW: case AND: case ANDI: case ASR: case BCLR: case BLD: case BRBC: case BRBS: case BRCC: case BRCS: case BREAK: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case BST: case CALL: case CBI: case CBR: case CLC: case CLH: case CLI: case CLN: case CLR: case CLS: case CLT: case CLV: case CLZ: case COM: case CP: case CPC: case CPI: case CPSE: case DEC: case EICALL: case EIJMP: case ELPM: case EOR: case FMUL: case FMULS: case FMULSU: case ICALL: case IJMP: case IN: case INC: case JMP: case LD: case LDD: case LDI: case LDS: case LPM: case LSL: case LSR: case MOV: case MOVW: case MUL: case MULS: case MULSU: case NEG: case NOP: case OR: case ORI: case OUT: case POP: case PUSH: case RCALL: case RET: case RETI: case RJMP: case ROL: case ROR: case SBC: case SBCI: case SBI: case SBIC: case SBIS: case SBIW: case SBR: case SBRC: case SBRS: case SEC: case SEH: case SEI: case SEN: case SER: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case ST: case STD: case STS: case SUB: case SUBI: case SWAP: case TST: case WDR: Instruction(); break; case IDENTIFIER: Label(); break; default: jj_la1[2] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Directive() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 149: EquDirective(); break; case 151: OrgDirective(); break; case 152: ReserveDirective(); break; case 153: case 154: case 155: DataDirective(); break; case 156: DefDirective(); break; case 157: IncludeDirective(); break; case 159: NoListDirective(); break; case 160: ListDirective(); break; case 161: case 162: case 163: SegDirective(); break; default: jj_la1[3] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Instruction() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case AND: case CP: case CPC: case CPSE: case EOR: case FMUL: case FMULS: case FMULSU: case MOV: case MOVW: case MUL: case MULS: case MULSU: case OR: case SBC: case SUB: InstrGPRGPR(); break; case ASR: case CLR: case COM: case DEC: case INC: case LSL: case LSR: case NEG: case POP: case PUSH: case ROL: case ROR: case SER: case SWAP: case TST: InstrGPR(); break; case ADIW: case ANDI: case BLD: case BST: case CBR: case CPI: case ORI: case SBCI: case SBIW: case SBR: case SBRC: case SBRS: case SUBI: InstrGPRIMM(); break; case BCLR: case BRCC: case BRCS: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case CALL: case JMP: case RCALL: case RJMP: InstrIMM(); break; case BRBC: case BRBS: case CBI: case SBI: case SBIC: case SBIS: InstrIMMIMM(); break; case BREAK: case CLC: case CLH: case CLI: case CLN: case CLS: case CLT: case CLV: case CLZ: case EICALL: case EIJMP: case ICALL: case IJMP: case NOP: case RET: case RETI: case SEC: case SEH: case SEI: case SEN: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case WDR: InstrBARE(); break; case ELPM: case LD: case LDD: case LDI: case LDS: case LPM: InstrLoad(); break; case ST: case STD: case STS: InstrStore(); break; case IN: InstrInput(); break; case OUT: InstrOutput(); break; default: jj_la1[4] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeGPRGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: t = jj_consume_token(ADD); break; case ADC: t = jj_consume_token(ADC); break; case SUB: t = jj_consume_token(SUB); break; case SBC: t = jj_consume_token(SBC); break; case AND: t = jj_consume_token(AND); break; case OR: t = jj_consume_token(OR); break; case EOR: t = jj_consume_token(EOR); break; case MUL: t = jj_consume_token(MUL); break; case MULS: t = jj_consume_token(MULS); break; case MULSU: t = jj_consume_token(MULSU); break; case FMUL: t = jj_consume_token(FMUL); break; case FMULS: t = jj_consume_token(FMULS); break; case FMULSU: t = jj_consume_token(FMULSU); break; case CPSE: t = jj_consume_token(CPSE); break; case CP: t = jj_consume_token(CP); break; case CPC: t = jj_consume_token(CPC); break; case MOV: t = jj_consume_token(MOV); break; case MOVW: t = jj_consume_token(MOVW); break; default: jj_la1[5] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case COM: t = jj_consume_token(COM); break; case NEG: t = jj_consume_token(NEG); break; case INC: t = jj_consume_token(INC); break; case DEC: t = jj_consume_token(DEC); break; case TST: t = jj_consume_token(TST); break; case CLR: t = jj_consume_token(CLR); break; case SER: t = jj_consume_token(SER); break; case PUSH: t = jj_consume_token(PUSH); break; case POP: t = jj_consume_token(POP); break; case LSL: t = jj_consume_token(LSL); break; case LSR: t = jj_consume_token(LSR); break; case ROL: t = jj_consume_token(ROL); break; case ROR: t = jj_consume_token(ROR); break; case ASR: t = jj_consume_token(ASR); break; case SWAP: t = jj_consume_token(SWAP); break; default: jj_la1[6] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeGPRIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADIW: t = jj_consume_token(ADIW); break; case SUBI: t = jj_consume_token(SUBI); break; case SBCI: t = jj_consume_token(SBCI); break; case SBIW: t = jj_consume_token(SBIW); break; case ANDI: t = jj_consume_token(ANDI); break; case ORI: t = jj_consume_token(ORI); break; case SBR: t = jj_consume_token(SBR); break; case CBR: t = jj_consume_token(CBR); break; case CPI: t = jj_consume_token(CPI); break; case SBRC: t = jj_consume_token(SBRC); break; case SBRS: t = jj_consume_token(SBRS); break; case BST: t = jj_consume_token(BST); break; case BLD: t = jj_consume_token(BLD); break; default: jj_la1[7] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case RJMP: t = jj_consume_token(RJMP); break; case JMP: t = jj_consume_token(JMP); break; case RCALL: t = jj_consume_token(RCALL); break; case CALL: t = jj_consume_token(CALL); break; case BREQ: t = jj_consume_token(BREQ); break; case BRNE: t = jj_consume_token(BRNE); break; case BRCS: t = jj_consume_token(BRCS); break; case BRCC: t = jj_consume_token(BRCC); break; case BRSH: t = jj_consume_token(BRSH); break; case BRLO: t = jj_consume_token(BRLO); break; case BRMI: t = jj_consume_token(BRMI); break; case BRPL: t = jj_consume_token(BRPL); break; case BRGE: t = jj_consume_token(BRGE); break; case BRLT: t = jj_consume_token(BRLT); break; case BRHS: t = jj_consume_token(BRHS); break; case BRHC: t = jj_consume_token(BRHC); break; case BRTS: t = jj_consume_token(BRTS); break; case BRTC: t = jj_consume_token(BRTC); break; case BRVS: t = jj_consume_token(BRVS); break; case BRVC: t = jj_consume_token(BRVC); break; case BRIE: t = jj_consume_token(BRIE); break; case BRID: t = jj_consume_token(BRID); break; case BSET: t = jj_consume_token(BSET); break; case BCLR: t = jj_consume_token(BCLR); break; default: jj_la1[8] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeIMMIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case SBIC: t = jj_consume_token(SBIC); break; case SBIS: t = jj_consume_token(SBIS); break; case BRBS: t = jj_consume_token(BRBS); break; case BRBC: t = jj_consume_token(BRBC); break; case SBI: t = jj_consume_token(SBI); break; case CBI: t = jj_consume_token(CBI); break; default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLoad() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LDI: InstrLDI(); break; case LD: InstrLD_variant(); break; case LDD: InstrLDD(); break; case LDS: InstrLDS(); break; case ELPM: case LPM: InstrLPM_variant(); break; default: jj_la1[10] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLD_variant() throws ParseException { if (jj_2_1(5)) { InstrLDPI(); } else if (jj_2_2(4)) { InstrLDPD(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LD: InstrLD(); break; default: jj_la1[11] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLPM_variant() throws ParseException { if (jj_2_3(5)) { InstrLPMGPRGPRP(); } else if (jj_2_4(3)) { InstrLPMGPRGPR(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ELPM: case LPM: InstrLPMBARE(); break; default: jj_la1[12] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeLPM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LPM: t = jj_consume_token(LPM); break; case ELPM: t = jj_consume_token(ELPM); break; default: jj_la1[13] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrStore() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrST_variant(); break; case STD: InstrSTD(); break; case STS: InstrSTS(); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrST_variant() throws ParseException { if (jj_2_5(3)) { InstrST(); } else if (jj_2_6(3)) { InstrSTPI(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrSTPD(); break; default: jj_la1[15] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrBARE() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IJMP: t = jj_consume_token(IJMP); break; case ICALL: t = jj_consume_token(ICALL); break; case RET: t = jj_consume_token(RET); break; case RETI: t = jj_consume_token(RETI); break; case SEC: t = jj_consume_token(SEC); break; case CLC: t = jj_consume_token(CLC); break; case SEN: t = jj_consume_token(SEN); break; case CLN: t = jj_consume_token(CLN); break; case SEZ: t = jj_consume_token(SEZ); break; case CLZ: t = jj_consume_token(CLZ); break; case SEI: t = jj_consume_token(SEI); break; case CLI: t = jj_consume_token(CLI); break; case SES: t = jj_consume_token(SES); break; case CLS: t = jj_consume_token(CLS); break; case SEV: t = jj_consume_token(SEV); break; case CLV: t = jj_consume_token(CLV); break; case SET: t = jj_consume_token(SET); break; case CLT: t = jj_consume_token(CLT); break; case SEH: t = jj_consume_token(SEH); break; case CLH: t = jj_consume_token(CLH); break; case NOP: t = jj_consume_token(NOP); break; case SLEEP: t = jj_consume_token(SLEEP); break; case WDR: t = jj_consume_token(WDR); break; case BREAK: t = jj_consume_token(BREAK); break; case SPM: t = jj_consume_token(SPM); break; case EIJMP: t = jj_consume_token(EIJMP); break; case EICALL: t = jj_consume_token(EICALL); break; default: jj_la1[16] = jj_gen; jj_consume_token(-1); throw new ParseException(); } module.addInstruction(t.image, t); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void DataDirective() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 153: ByteDirective(); break; case 154: WordDirective(); break; case 155: DoubleWordDirective(); break; default: jj_la1[17] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void SegDirective() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 161: jj_consume_token(161); module.enterDataSegment(); break; case 162: jj_consume_token(162); module.enterProgramSegment(); break; case 163: jj_consume_token(163); module.enterEEPROMSegment(); break; default: jj_la1[18] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr Data() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case LOW: case HIGH: case LO8: case HI8: case BYTE2: case BYTE3: case BYTE4: case LWRD: case HWRD: case PAGE: case EXP2: case LOG2: case IDENTIFIER: case 147: case 179: case 180: case 181: e = Expr(); break; case STRING_LITERAL: tok = jj_consume_token(STRING_LITERAL); e = new Expr.StringLiteral(tok); break; default: jj_la1[20] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr EqExpr() throws ParseException { Token tok; Expr e, er; e = RelExpr(); label_8: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 169: case 170: break; default: jj_la1[26] = jj_gen; break label_8; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 169: tok = jj_consume_token(169); break; case 170: tok = jj_consume_token(170); break; default: jj_la1[27] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = RelExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr RelExpr() throws ParseException { Token tok; Expr e, er; e = ShiftExpr(); label_9: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 171: case 172: case 173: case 174: break; default: jj_la1[28] = jj_gen; break label_9; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 171: tok = jj_consume_token(171); break; case 172: tok = jj_consume_token(172); break; case 173: tok = jj_consume_token(173); break; case 174: tok = jj_consume_token(174); break; default: jj_la1[29] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = ShiftExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr ShiftExpr() throws ParseException { Token tok; Expr e, er; e = AddExpr(); label_10: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 175: case 176: break; default: jj_la1[30] = jj_gen; break label_10; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 175: tok = jj_consume_token(175); break; case 176: tok = jj_consume_token(176); break; default: jj_la1[31] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = AddExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr AddExpr() throws ParseException { Token tok; Expr e, er; e = MulExpr(); label_11: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 146: case 147: break; default: jj_la1[32] = jj_gen; break label_11; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 146: tok = jj_consume_token(146); break; case 147: tok = jj_consume_token(147); break; default: jj_la1[33] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = MulExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr MulExpr() throws ParseException { Token tok; Expr e, er; e = UnaryExpr(); label_12: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 177: case 178: break; default: jj_la1[34] = jj_gen; break label_12; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 177: tok = jj_consume_token(177); break; case 178: tok = jj_consume_token(178); break; default: jj_la1[35] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = UnaryExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr UnaryExpr() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 147: case 179: case 180: switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 179: tok = jj_consume_token(179); break; case 180: tok = jj_consume_token(180); break; case 147: tok = jj_consume_token(147); break; default: jj_la1[36] = jj_gen; jj_consume_token(-1); throw new ParseException(); } e = UnaryExpr(); e = new Expr.UnOp(tok, e); break; case INTEGER_LITERAL: case LOW: case HIGH: case LO8: case HI8: case BYTE2: case BYTE3: case BYTE4: case LWRD: case HWRD: case PAGE: case EXP2: case LOG2: case IDENTIFIER: case 181: e = Term(); break; default: jj_la1[37] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr Term() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IDENTIFIER: tok = jj_consume_token(IDENTIFIER); e = new Expr.Variable(tok); break; case LOW: case HIGH: case LO8: case HI8: case BYTE2: case BYTE3: case BYTE4: case LWRD: case HWRD: case PAGE: case EXP2: case LOG2: e = Func(); break; case INTEGER_LITERAL: tok = jj_consume_token(INTEGER_LITERAL); e = new Expr.Constant(tok); break; case 181: jj_consume_token(181); e = Expr(); jj_consume_token(182); break; default: jj_la1[38] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token FuncName() throws ParseException { Token tok; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LOW: tok = jj_consume_token(LOW); break; case HIGH: tok = jj_consume_token(HIGH); break; case LO8: tok = jj_consume_token(LO8); break; case HI8: tok = jj_consume_token(HI8); break; case BYTE2: tok = jj_consume_token(BYTE2); break; case BYTE3: tok = jj_consume_token(BYTE3); break; case BYTE4: tok = jj_consume_token(BYTE4); break; case LWRD: tok = jj_consume_token(LWRD); break; case HWRD: tok = jj_consume_token(HWRD); break; case PAGE: tok = jj_consume_token(PAGE); break; case EXP2: tok = jj_consume_token(EXP2); break; case LOG2: tok = jj_consume_token(LOG2); break; default: jj_la1[39] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return tok; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void Item() throws ParseException { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INSTRUCTION: case PSEUDO: Instruction(); break; case ENUM: Enum(); break; case ENUM_SUB: EnumSubset(); break; case FORMAT: FormatDecl(); break; case OPERAND_TYPE: OperandTypeDecl(); break; case SUBROUTINE: case INLINE: case EXTERNAL: Subroutine(); break; case ADDR_MODE: AddrModeDecl(); break; case ADDR_SET: AddrSetDecl(); break; case GLOBAL: Global(); break; default: jj_la1[1] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public Token Value() throws ParseException { Token t; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case STRING_LITERAL: t = jj_consume_token(STRING_LITERAL); break; case IDENTIFIER: t = jj_consume_token(IDENTIFIER); break; case BOOLEAN_LITERAL: t = jj_consume_token(BOOLEAN_LITERAL); break; case INTEGER_LITERAL: t = jj_consume_token(INTEGER_LITERAL); break; default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void AddrModeDecl() throws ParseException { Token n; AddrModeDecl amd; Property p; List<AddrModeDecl.Operand> o; FormatDecl e; jj_consume_token(ADDR_MODE); n = jj_consume_token(IDENTIFIER); o = Operands(); amd = new AddrModeDecl(n, o); jj_consume_token(LBRACKET); label_6: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ENCODING: case PROPERTY: break; default: jj_la1[10] = jj_gen; break label_6; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PROPERTY: p = Property(null); amd.addProperty(p); break; case ENCODING: e = Encoding(n); amd.addEncoding(e); break; default: jj_la1[11] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACKET); arch.addAddressingMode(amd); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void OperandTypeDecl() throws ParseException { Token n; OperandTypeDecl d; jj_consume_token(OPERAND_TYPE); n = jj_consume_token(IDENTIFIER); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 79: d = SimpleOperandType(n); break; case LBRACKET: d = CompoundOperandType(n); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } arch.addOperand(d); }
// in src/jintgen/isdl/parser/ISDLParser.java
public OperandTypeDecl SimpleOperandType(Token n) throws ParseException { TypeRef t; Token b, l = null, h = null; OperandTypeDecl d; jj_consume_token(79); b = jj_consume_token(INTEGER_LITERAL); jj_consume_token(80); jj_consume_token(78); t = Type(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 79: jj_consume_token(79); l = jj_consume_token(INTEGER_LITERAL); jj_consume_token(COMMA); h = jj_consume_token(INTEGER_LITERAL); jj_consume_token(80); break; default: jj_la1[15] = jj_gen; } d = new OperandTypeDecl.Value(n, b, t, l, h); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LBRACKET: OperandBody(d); break; case SEMI: jj_consume_token(SEMI); break; default: jj_la1[16] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return d; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void OperandBody(OperandTypeDecl td) throws ParseException { jj_consume_token(LBRACKET); label_8: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case READ: case WRITE: case 81: break; default: jj_la1[17] = jj_gen; break label_8; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case READ: ReadMethod(td); break; case WRITE: WriteMethod(td); break; case 81: SubOperand(td); break; default: jj_la1[18] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACKET); }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl Format(Token n) throws ParseException { Token pr = null; FormatDecl d; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PRIORITY: jj_consume_token(PRIORITY); pr = jj_consume_token(INTEGER_LITERAL); break; default: jj_la1[19] = jj_gen; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: d = DerivedFormat(pr, n); break; case LBRACKET: d = NewFormat(pr, n); break; default: jj_la1[20] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return d; }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl DerivedFormat(Token pr, Token n) throws ParseException { Token p; List<FormatDecl.Substitution> l = new LinkedList<FormatDecl.Substitution>(); p = jj_consume_token(IDENTIFIER); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case WHERE: jj_consume_token(WHERE); l = SubstitutionList(); break; case SEMI: jj_consume_token(SEMI); break; default: jj_la1[21] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return new FormatDecl.Derived(n, pr, p, l); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void Subroutine() throws ParseException { boolean i = false; Token m; TypeRef r; List<SubroutineDecl.Parameter> f; List<Stmt> l = new LinkedList<Stmt>(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case SUBROUTINE: case INLINE: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INLINE: jj_consume_token(INLINE); i = true; break; default: jj_la1[25] = jj_gen; } jj_consume_token(SUBROUTINE); m = jj_consume_token(IDENTIFIER); jj_consume_token(LPAREN); f = Params(); jj_consume_token(RPAREN); jj_consume_token(78); r = Type(); Block(l); arch.addSubroutine(new SubroutineDecl(i, m, f, r, l)); break; case EXTERNAL: jj_consume_token(EXTERNAL); jj_consume_token(SUBROUTINE); m = jj_consume_token(IDENTIFIER); jj_consume_token(LPAREN); f = Params(); jj_consume_token(RPAREN); jj_consume_token(78); r = Type(); jj_consume_token(SEMI); arch.addSubroutine(new SubroutineDecl(i, m, f, r, null)); break; default: jj_la1[26] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Term() throws ParseException { Expr e; if (jj_2_1(2)) { e = CallExpr(); } else if (jj_2_2(2)) { e = DotExpr(); } else { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: e = VarUse(); break; case INTEGER_LITERAL: case BOOLEAN_LITERAL: e = Literal(); break; case READ: e = ReadExpr(); break; case LPAREN: jj_consume_token(LPAREN); e = Expr(); jj_consume_token(RPAREN); break; default: jj_la1[30] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } label_13: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 79: break; default: jj_la1[31] = jj_gen; break label_13; } e = Index(e); } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 78: e = Conversion(e); break; default: jj_la1[32] = jj_gen; } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Literal() throws ParseException { Token t; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: t = jj_consume_token(INTEGER_LITERAL); return new Literal.IntExpr(t); case BOOLEAN_LITERAL: t = jj_consume_token(BOOLEAN_LITERAL); return new Literal.BoolExpr(t); default: jj_la1[33] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public Stmt Statement() throws ParseException { Stmt s; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LOCAL: s = LocalDecl(); break; case IF: s = IfStatement(); break; default: jj_la1[36] = jj_gen; if (jj_2_3(2147483647)) { s = Assignment(); } else { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: s = CallStmt(); break; case RETURN: s = ReturnStmt(); break; case WRITE: s = WriteStmt(); break; default: jj_la1[37] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } return s; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void SingleStatement(List<Stmt> l) throws ParseException { Stmt s; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case READ: case WRITE: case LOCAL: case IF: case RETURN: case BOOLEAN_LITERAL: case LPAREN: case ADD: case SUB: case NOT: case B_COMP: case IDENTIFIER: s = Statement(); l.add(s); break; case LBRACKET: Block(l); break; default: jj_la1[40] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Index(Expr e) throws ParseException { Expr et; Token t1, t2; jj_consume_token(79); if (jj_2_4(2)) { t1 = jj_consume_token(INTEGER_LITERAL); jj_consume_token(78); t2 = jj_consume_token(INTEGER_LITERAL); e = new FixedRangeExpr(e, t1, t2); } else { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case READ: case BOOLEAN_LITERAL: case LPAREN: case ADD: case SUB: case NOT: case B_COMP: case IDENTIFIER: et = Expr(); e = new IndexExpr(e, et); break; default: jj_la1[42] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(80); return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Equ_Expr() throws ParseException { Expr e, et; Token tok; e = Rel_Expr(); label_21: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case EQUAL: case NOTEQUAL: break; default: jj_la1[49] = jj_gen; break label_21; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case EQUAL: tok = jj_consume_token(EQUAL); break; case NOTEQUAL: tok = jj_consume_token(NOTEQUAL); break; default: jj_la1[50] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Rel_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Rel_Expr() throws ParseException { Expr e, et; Token tok; e = Shift_Expr(); label_22: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LESS: case LESSEQ: case GREATER: case GREATEREQ: break; default: jj_la1[51] = jj_gen; break label_22; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LESS: tok = jj_consume_token(LESS); break; case GREATER: tok = jj_consume_token(GREATER); break; case LESSEQ: tok = jj_consume_token(LESSEQ); break; case GREATEREQ: tok = jj_consume_token(GREATEREQ); break; default: jj_la1[52] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Shift_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Shift_Expr() throws ParseException { Expr e, et; Token tok; e = Add_Expr(); label_23: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case SHIFTLEFT: case SHIFTRIGHT: break; default: jj_la1[53] = jj_gen; break label_23; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case SHIFTLEFT: tok = jj_consume_token(SHIFTLEFT); break; case SHIFTRIGHT: tok = jj_consume_token(SHIFTRIGHT); break; default: jj_la1[54] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Add_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Add_Expr() throws ParseException { Expr e, et; Token tok; e = Mul_Expr(); label_24: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: case SUB: break; default: jj_la1[55] = jj_gen; break label_24; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: tok = jj_consume_token(ADD); break; case SUB: tok = jj_consume_token(SUB); break; default: jj_la1[56] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Mul_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Mul_Expr() throws ParseException { Expr e, et; Token tok; e = Un_Expr(); label_25: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case MUL: case DIV: case MOD: break; default: jj_la1[57] = jj_gen; break label_25; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case MUL: tok = jj_consume_token(MUL); break; case DIV: tok = jj_consume_token(DIV); break; case MOD: tok = jj_consume_token(MOD); break; default: jj_la1[58] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Un_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Un_Expr() throws ParseException { Expr e; Token tok; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: case SUB: case NOT: case B_COMP: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case B_COMP: tok = jj_consume_token(B_COMP); break; case NOT: tok = jj_consume_token(NOT); break; case SUB: tok = jj_consume_token(SUB); break; case ADD: tok = jj_consume_token(ADD); break; default: jj_la1[59] = jj_gen; jj_consume_token(-1); throw new ParseException(); } e = Term(); e = new UnOpExpr(tok, e); break; case INTEGER_LITERAL: case READ: case BOOLEAN_LITERAL: case LPAREN: case IDENTIFIER: e = Term(); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void SignDimension(HashMap<String, List> dims) throws ParseException { Token s; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: s = jj_consume_token(ADD); break; case SUB: s = jj_consume_token(SUB); break; default: jj_la1[63] = jj_gen; jj_consume_token(-1); throw new ParseException(); } List l = new LinkedList(); l.add(s); dims.put("sign", l); }
0 195
              
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Module() throws ParseException { Header(); label_1: while (true) { Section(); switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case START: break; default: jj_la1[0] = jj_gen; break label_1; } } jj_consume_token(0); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Header() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case PROGRAM: jj_consume_token(PROGRAM); jj_consume_token(STRING_LITERAL); jj_consume_token(154); break; default: jj_la1[1] = jj_gen; } label_2: while (true) { SectionDecl(); switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case SECTION: break; default: jj_la1[2] = jj_gen; break label_2; } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void SectionDecl() throws ParseException { Token name, vma, lma; jj_consume_token(SECTION); name = jj_consume_token(DOT_IDENTIFIER); jj_consume_token(SIZE); jj_consume_token(155); jj_consume_token(INTEGER_LITERAL); jj_consume_token(VMA); jj_consume_token(155); vma = jj_consume_token(INTEGER_LITERAL); jj_consume_token(LMA); jj_consume_token(155); lma = jj_consume_token(INTEGER_LITERAL); jj_consume_token(OFFSET); jj_consume_token(155); jj_consume_token(INTEGER_LITERAL); rawModule.newSection(name, vma, lma); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Section() throws ParseException { Token sect; jj_consume_token(START); sect = jj_consume_token(DOT_IDENTIFIER); jj_consume_token(154); rawModule.enterSection(sect); label_3: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case LABEL: break; default: jj_la1[3] = jj_gen; break label_3; } Statement(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Statement() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LABEL: Label(); break; case INTEGER_LITERAL: Item(); break; default: jj_la1[4] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Item() throws ParseException { Token addr; addr = jj_consume_token(INTEGER_LITERAL); jj_consume_token(154); rawModule.setAddress(addr); RawData(); rawModule.setAddress(addr); switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case ADIW: case AND: case ANDI: case ASR: case BCLR: case BLD: case BRBC: case BRBS: case BRCC: case BRCS: case BREAK: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case BST: case CALL: case CBI: case CBR: case CLC: case CLH: case CLI: case CLN: case CLR: case CLS: case CLT: case CLV: case CLZ: case COM: case CP: case CPC: case CPI: case CPSE: case DEC: case EICALL: case EIJMP: case ELPM: case EOR: case FMUL: case FMULS: case FMULSU: case ICALL: case IJMP: case IN: case INC: case JMP: case LD: case LDD: case LDI: case LDS: case LPM: case LSL: case LSR: case MOV: case MOVW: case MUL: case MULS: case MULSU: case NEG: case NOP: case OR: case ORI: case OUT: case POP: case PUSH: case RCALL: case RET: case RETI: case RJMP: case ROL: case ROR: case SBC: case SBCI: case SBI: case SBIC: case SBIS: case SBIW: case SBR: case SBRC: case SBRS: case SEC: case SEH: case SEI: case SEN: case SER: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case ST: case STD: case STS: case SUB: case SUBI: case SWAP: case TST: case WDR: Instruction(); break; case WORD: Data(); break; default: jj_la1[5] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void RawData() throws ParseException { if (jj_2_1(3)) { Raw4(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: Raw2(); break; default: jj_la1[6] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Raw2() throws ParseException { Token b1, b2; b1 = jj_consume_token(INTEGER_LITERAL); b2 = jj_consume_token(INTEGER_LITERAL); rawModule.addBytes(b1, b2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Raw4() throws ParseException { Token b1, b2, b3, b4; b1 = jj_consume_token(INTEGER_LITERAL); b2 = jj_consume_token(INTEGER_LITERAL); b3 = jj_consume_token(INTEGER_LITERAL); b4 = jj_consume_token(INTEGER_LITERAL); rawModule.addBytes(b1, b2, b3, b4); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Instruction() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case AND: case CP: case CPC: case CPSE: case EOR: case FMUL: case FMULS: case FMULSU: case MOV: case MOVW: case MUL: case MULS: case MULSU: case OR: case SBC: case SUB: InstrGPRGPR(); break; case ASR: case CLR: case COM: case DEC: case INC: case LSL: case LSR: case NEG: case POP: case PUSH: case ROL: case ROR: case SER: case SWAP: case TST: InstrGPR(); break; case ADIW: case ANDI: case BLD: case BST: case CBR: case CPI: case ORI: case SBCI: case SBIW: case SBR: case SBRC: case SBRS: case SUBI: InstrGPRIMM(); break; case IN: InstrInput(); break; case OUT: InstrOutput(); break; case BCLR: case BRCC: case BRCS: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case CALL: case JMP: case RCALL: case RJMP: InstrIMM(); break; case BRBC: case BRBS: case CBI: case SBI: case SBIC: case SBIS: InstrIMMIMM(); break; case BREAK: case CLC: case CLH: case CLI: case CLN: case CLS: case CLT: case CLV: case CLZ: case EICALL: case EIJMP: case ICALL: case IJMP: case NOP: case RET: case RETI: case SEC: case SEH: case SEI: case SEN: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case WDR: InstrBARE(); break; case ELPM: case LD: case LDD: case LDI: case LDS: case LPM: InstrLoad(); break; case ST: case STD: case STS: InstrStore(); break; default: jj_la1[7] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Data() throws ParseException { jj_consume_token(WORD); jj_consume_token(INTEGER_LITERAL); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrGPRGPR() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = OpcodeGPRGPR(); r1 = Register(); jj_consume_token(156); r2 = Register(); module.addInstruction(t.image, t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeGPRGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: t = jj_consume_token(ADD); break; case ADC: t = jj_consume_token(ADC); break; case SUB: t = jj_consume_token(SUB); break; case SBC: t = jj_consume_token(SBC); break; case AND: t = jj_consume_token(AND); break; case OR: t = jj_consume_token(OR); break; case EOR: t = jj_consume_token(EOR); break; case MUL: t = jj_consume_token(MUL); break; case MULS: t = jj_consume_token(MULS); break; case MULSU: t = jj_consume_token(MULSU); break; case FMUL: t = jj_consume_token(FMUL); break; case FMULS: t = jj_consume_token(FMULS); break; case FMULSU: t = jj_consume_token(FMULSU); break; case CPSE: t = jj_consume_token(CPSE); break; case CP: t = jj_consume_token(CP); break; case CPC: t = jj_consume_token(CPC); break; case MOV: t = jj_consume_token(MOV); break; case MOVW: t = jj_consume_token(MOVW); break; default: jj_la1[8] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrGPR() throws ParseException { Token t; SyntacticOperand.Register r1; t = OpcodeGPR(); r1 = Register(); module.addInstruction(t.image, t, r1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case COM: t = jj_consume_token(COM); break; case NEG: t = jj_consume_token(NEG); break; case INC: t = jj_consume_token(INC); break; case DEC: t = jj_consume_token(DEC); break; case TST: t = jj_consume_token(TST); break; case CLR: t = jj_consume_token(CLR); break; case SER: t = jj_consume_token(SER); break; case PUSH: t = jj_consume_token(PUSH); break; case POP: t = jj_consume_token(POP); break; case LSL: t = jj_consume_token(LSL); break; case LSR: t = jj_consume_token(LSR); break; case ROL: t = jj_consume_token(ROL); break; case ROR: t = jj_consume_token(ROR); break; case ASR: t = jj_consume_token(ASR); break; case SWAP: t = jj_consume_token(SWAP); break; default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrGPRIMM() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = OpcodeGPRIMM(); r1 = Register(); jj_consume_token(156); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeGPRIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADIW: t = jj_consume_token(ADIW); break; case SUBI: t = jj_consume_token(SUBI); break; case SBCI: t = jj_consume_token(SBCI); break; case SBIW: t = jj_consume_token(SBIW); break; case ANDI: t = jj_consume_token(ANDI); break; case ORI: t = jj_consume_token(ORI); break; case SBR: t = jj_consume_token(SBR); break; case CBR: t = jj_consume_token(CBR); break; case CPI: t = jj_consume_token(CPI); break; case SBRC: t = jj_consume_token(SBRC); break; case SBRS: t = jj_consume_token(SBRS); break; case BST: t = jj_consume_token(BST); break; case BLD: t = jj_consume_token(BLD); break; default: jj_la1[10] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrIMM() throws ParseException { Token t; SyntacticOperand.Expr c1; t = OpcodeIMM(); c1 = Const(); module.addInstruction(t.image, t, c1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case RJMP: t = jj_consume_token(RJMP); break; case JMP: t = jj_consume_token(JMP); break; case RCALL: t = jj_consume_token(RCALL); break; case CALL: t = jj_consume_token(CALL); break; case BREQ: t = jj_consume_token(BREQ); break; case BRNE: t = jj_consume_token(BRNE); break; case BRCS: t = jj_consume_token(BRCS); break; case BRCC: t = jj_consume_token(BRCC); break; case BRSH: t = jj_consume_token(BRSH); break; case BRLO: t = jj_consume_token(BRLO); break; case BRMI: t = jj_consume_token(BRMI); break; case BRPL: t = jj_consume_token(BRPL); break; case BRGE: t = jj_consume_token(BRGE); break; case BRLT: t = jj_consume_token(BRLT); break; case BRHS: t = jj_consume_token(BRHS); break; case BRHC: t = jj_consume_token(BRHC); break; case BRTS: t = jj_consume_token(BRTS); break; case BRTC: t = jj_consume_token(BRTC); break; case BRVS: t = jj_consume_token(BRVS); break; case BRVC: t = jj_consume_token(BRVC); break; case BRIE: t = jj_consume_token(BRIE); break; case BRID: t = jj_consume_token(BRID); break; case BSET: t = jj_consume_token(BSET); break; case BCLR: t = jj_consume_token(BCLR); break; default: jj_la1[11] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrIMMIMM() throws ParseException { Token t; SyntacticOperand.Expr c1, c2; t = OpcodeIMMIMM(); c1 = Const(); jj_consume_token(156); c2 = Const(); module.addInstruction(t.image, t, c1, c2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeIMMIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case SBIC: t = jj_consume_token(SBIC); break; case SBIS: t = jj_consume_token(SBIS); break; case BRBS: t = jj_consume_token(BRBS); break; case BRBC: t = jj_consume_token(BRBC); break; case SBI: t = jj_consume_token(SBI); break; case CBI: t = jj_consume_token(CBI); break; default: jj_la1[12] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLoad() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LDI: InstrLDI(); break; case LD: InstrLD_variant(); break; case LDD: InstrLDD(); break; case LDS: InstrLDS(); break; case ELPM: case LPM: InstrLPM_variant(); break; default: jj_la1[13] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLDI() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(LDI); r1 = Register(); jj_consume_token(156); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLD_variant() throws ParseException { if (jj_2_2(5)) { InstrLDPI(); } else if (jj_2_3(4)) { InstrLDPD(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LD: InstrLD(); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(LD); r1 = Register(); jj_consume_token(156); r2 = Register(); module.addInstruction("ld", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLDPI() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(LD); r1 = Register(); jj_consume_token(156); r2 = Register(); jj_consume_token(157); module.addInstruction("ldpi", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLDPD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(LD); r1 = Register(); jj_consume_token(156); jj_consume_token(158); r2 = Register(); module.addInstruction("ldpd", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLDD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; SyntacticOperand.Expr c1; t = jj_consume_token(LDD); r1 = Register(); jj_consume_token(156); r2 = Register(); jj_consume_token(157); c1 = Const(); module.addInstruction(t.image, t, r1, r2, c1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLDS() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(LDS); r1 = Register(); jj_consume_token(156); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLPM_variant() throws ParseException { if (jj_2_4(5)) { InstrLPMGPRGPRP(); } else if (jj_2_5(3)) { InstrLPMGPRGPR(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ELPM: case LPM: InstrLPMBARE(); break; default: jj_la1[15] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLPMGPRGPR() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = OpcodeLPM(); r1 = Register(); jj_consume_token(156); r2 = Register(); module.addInstruction(t.image + "d", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLPMGPRGPRP() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = OpcodeLPM(); r1 = Register(); jj_consume_token(156); r2 = Register(); jj_consume_token(157); module.addInstruction(t.image + "pi", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLPMBARE() throws ParseException { Token t; t = OpcodeLPM(); module.addInstruction(t.image, t); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeLPM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LPM: t = jj_consume_token(LPM); break; case ELPM: t = jj_consume_token(ELPM); break; default: jj_la1[16] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrStore() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrST_variant(); break; case STD: InstrSTD(); break; case STS: InstrSTS(); break; default: jj_la1[17] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrST_variant() throws ParseException { if (jj_2_6(3)) { InstrST(); } else if (jj_2_7(3)) { InstrSTPI(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrSTPD(); break; default: jj_la1[18] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrST() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(ST); r1 = Register(); jj_consume_token(156); r2 = Register(); module.addInstruction("st", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrSTPI() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(ST); r1 = Register(); jj_consume_token(157); jj_consume_token(156); r2 = Register(); module.addInstruction("stpi", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrSTPD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(ST); jj_consume_token(158); r1 = Register(); jj_consume_token(156); r2 = Register(); module.addInstruction("stpd", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrSTD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; SyntacticOperand.Expr c1; t = jj_consume_token(STD); r1 = Register(); jj_consume_token(157); c1 = Const(); jj_consume_token(156); r2 = Register(); module.addInstruction(t.image, t, r1, c1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrSTS() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(STS); c1 = Const(); jj_consume_token(156); r1 = Register(); module.addInstruction(t.image, t, c1, r1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrBARE() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IJMP: t = jj_consume_token(IJMP); break; case ICALL: t = jj_consume_token(ICALL); break; case RET: t = jj_consume_token(RET); break; case RETI: t = jj_consume_token(RETI); break; case SEC: t = jj_consume_token(SEC); break; case CLC: t = jj_consume_token(CLC); break; case SEN: t = jj_consume_token(SEN); break; case CLN: t = jj_consume_token(CLN); break; case SEZ: t = jj_consume_token(SEZ); break; case CLZ: t = jj_consume_token(CLZ); break; case SEI: t = jj_consume_token(SEI); break; case CLI: t = jj_consume_token(CLI); break; case SES: t = jj_consume_token(SES); break; case CLS: t = jj_consume_token(CLS); break; case SEV: t = jj_consume_token(SEV); break; case CLV: t = jj_consume_token(CLV); break; case SET: t = jj_consume_token(SET); break; case CLT: t = jj_consume_token(CLT); break; case SEH: t = jj_consume_token(SEH); break; case CLH: t = jj_consume_token(CLH); break; case NOP: t = jj_consume_token(NOP); break; case SLEEP: t = jj_consume_token(SLEEP); break; case WDR: t = jj_consume_token(WDR); break; case BREAK: t = jj_consume_token(BREAK); break; case SPM: t = jj_consume_token(SPM); break; case EIJMP: t = jj_consume_token(EIJMP); break; case EICALL: t = jj_consume_token(EICALL); break; default: jj_la1[19] = jj_gen; jj_consume_token(-1); throw new ParseException(); } module.addInstruction(t.image, t); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrInput() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(IN); r1 = Register(); jj_consume_token(156); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrOutput() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(OUT); c1 = Const(); jj_consume_token(156); r1 = Register(); module.addInstruction(t.image, t, c1, r1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public SyntacticOperand.Register Register() throws ParseException { Token tok; tok = jj_consume_token(IDENTIFIER); return module.newOperand(tok); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Label() throws ParseException { Token tok; Token v; jj_consume_token(LABEL); v = jj_consume_token(INTEGER_LITERAL); tok = jj_consume_token(STRING_LITERAL); jj_consume_token(154); rawModule.addQuotedLabelAt(v, tok); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public SyntacticOperand.Expr Const() throws ParseException { Expr e; if (jj_2_8(2147483647)) { e = RelExpr(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case IDENTIFIER: e = Term(); break; default: jj_la1[20] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } return module.newOperand(e); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Expr Term() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IDENTIFIER: tok = jj_consume_token(IDENTIFIER); e = new Expr.Variable(tok); break; case INTEGER_LITERAL: tok = jj_consume_token(INTEGER_LITERAL); e = new Expr.Constant(tok); break; default: jj_la1[21] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Expr RelExpr() throws ParseException { Token ltok; Token op; Token rtok; ltok = jj_consume_token(159); op = BinOp(); rtok = jj_consume_token(INTEGER_LITERAL); return new Expr.RelativeAddress(ltok, op, rtok); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token BinOp() throws ParseException { Token tok; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 157: tok = jj_consume_token(157); break; case 158: tok = jj_consume_token(158); break; default: jj_la1[22] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return tok; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
private Token jj_consume_token(int kind) throws ParseException { Token oldToken; if ((oldToken = token).next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; if (token.kind == kind) { jj_gen++; if (++jj_gc > 100) { jj_gc = 0; for (int i = 0; i < jj_2_rtns.length; i++) { JJCalls c = jj_2_rtns[i]; while (c != null) { if (c.gen < jj_gen) c.first = null; c = c.next; } } } return token; } token = oldToken; jj_kind = kind; throw generateParseException(); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Module() throws ParseException { label_1: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case ADIW: case AND: case ANDI: case ASR: case BCLR: case BLD: case BRBC: case BRBS: case BRCC: case BRCS: case BREAK: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case BST: case CALL: case CBI: case CBR: case CLC: case CLH: case CLI: case CLN: case CLR: case CLS: case CLT: case CLV: case CLZ: case COM: case CP: case CPC: case CPI: case CPSE: case DEC: case EICALL: case EIJMP: case ELPM: case EOR: case FMUL: case FMULS: case FMULSU: case ICALL: case IJMP: case IN: case INC: case JMP: case LD: case LDD: case LDI: case LDS: case LPM: case LSL: case LSR: case MOV: case MOVW: case MUL: case MULS: case MULSU: case NEG: case NOP: case OR: case ORI: case OUT: case POP: case PUSH: case RCALL: case RET: case RETI: case RJMP: case ROL: case ROR: case SBC: case SBCI: case SBI: case SBIC: case SBIS: case SBIW: case SBR: case SBRC: case SBRS: case SEC: case SEH: case SEI: case SEN: case SER: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case ST: case STD: case STS: case SUB: case SUBI: case SWAP: case TST: case WDR: case IDENTIFIER: case 149: case 151: case 152: case 153: case 154: case 155: case 156: case 157: case 159: case 160: case 161: case 162: case 163: break; default: jj_la1[0] = jj_gen; break label_1; } Statement(); } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 0: jj_consume_token(0); break; case 158: ExitDirective(); break; default: jj_la1[1] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Statement() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 149: case 151: case 152: case 153: case 154: case 155: case 156: case 157: case 159: case 160: case 161: case 162: case 163: Directive(); break; case ADD: case ADC: case ADIW: case AND: case ANDI: case ASR: case BCLR: case BLD: case BRBC: case BRBS: case BRCC: case BRCS: case BREAK: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case BST: case CALL: case CBI: case CBR: case CLC: case CLH: case CLI: case CLN: case CLR: case CLS: case CLT: case CLV: case CLZ: case COM: case CP: case CPC: case CPI: case CPSE: case DEC: case EICALL: case EIJMP: case ELPM: case EOR: case FMUL: case FMULS: case FMULSU: case ICALL: case IJMP: case IN: case INC: case JMP: case LD: case LDD: case LDI: case LDS: case LPM: case LSL: case LSR: case MOV: case MOVW: case MUL: case MULS: case MULSU: case NEG: case NOP: case OR: case ORI: case OUT: case POP: case PUSH: case RCALL: case RET: case RETI: case RJMP: case ROL: case ROR: case SBC: case SBCI: case SBI: case SBIC: case SBIS: case SBIW: case SBR: case SBRC: case SBRS: case SEC: case SEH: case SEI: case SEN: case SER: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case ST: case STD: case STS: case SUB: case SUBI: case SWAP: case TST: case WDR: Instruction(); break; case IDENTIFIER: Label(); break; default: jj_la1[2] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Directive() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 149: EquDirective(); break; case 151: OrgDirective(); break; case 152: ReserveDirective(); break; case 153: case 154: case 155: DataDirective(); break; case 156: DefDirective(); break; case 157: IncludeDirective(); break; case 159: NoListDirective(); break; case 160: ListDirective(); break; case 161: case 162: case 163: SegDirective(); break; default: jj_la1[3] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Instruction() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case AND: case CP: case CPC: case CPSE: case EOR: case FMUL: case FMULS: case FMULSU: case MOV: case MOVW: case MUL: case MULS: case MULSU: case OR: case SBC: case SUB: InstrGPRGPR(); break; case ASR: case CLR: case COM: case DEC: case INC: case LSL: case LSR: case NEG: case POP: case PUSH: case ROL: case ROR: case SER: case SWAP: case TST: InstrGPR(); break; case ADIW: case ANDI: case BLD: case BST: case CBR: case CPI: case ORI: case SBCI: case SBIW: case SBR: case SBRC: case SBRS: case SUBI: InstrGPRIMM(); break; case BCLR: case BRCC: case BRCS: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case CALL: case JMP: case RCALL: case RJMP: InstrIMM(); break; case BRBC: case BRBS: case CBI: case SBI: case SBIC: case SBIS: InstrIMMIMM(); break; case BREAK: case CLC: case CLH: case CLI: case CLN: case CLS: case CLT: case CLV: case CLZ: case EICALL: case EIJMP: case ICALL: case IJMP: case NOP: case RET: case RETI: case SEC: case SEH: case SEI: case SEN: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case WDR: InstrBARE(); break; case ELPM: case LD: case LDD: case LDI: case LDS: case LPM: InstrLoad(); break; case ST: case STD: case STS: InstrStore(); break; case IN: InstrInput(); break; case OUT: InstrOutput(); break; default: jj_la1[4] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrGPRGPR() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = OpcodeGPRGPR(); r1 = Register(); jj_consume_token(145); r2 = Register(); module.addInstruction(t.image, t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeGPRGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: t = jj_consume_token(ADD); break; case ADC: t = jj_consume_token(ADC); break; case SUB: t = jj_consume_token(SUB); break; case SBC: t = jj_consume_token(SBC); break; case AND: t = jj_consume_token(AND); break; case OR: t = jj_consume_token(OR); break; case EOR: t = jj_consume_token(EOR); break; case MUL: t = jj_consume_token(MUL); break; case MULS: t = jj_consume_token(MULS); break; case MULSU: t = jj_consume_token(MULSU); break; case FMUL: t = jj_consume_token(FMUL); break; case FMULS: t = jj_consume_token(FMULS); break; case FMULSU: t = jj_consume_token(FMULSU); break; case CPSE: t = jj_consume_token(CPSE); break; case CP: t = jj_consume_token(CP); break; case CPC: t = jj_consume_token(CPC); break; case MOV: t = jj_consume_token(MOV); break; case MOVW: t = jj_consume_token(MOVW); break; default: jj_la1[5] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrGPR() throws ParseException { Token t; SyntacticOperand.Register r1; t = OpcodeGPR(); r1 = Register(); module.addInstruction(t.image, t, r1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case COM: t = jj_consume_token(COM); break; case NEG: t = jj_consume_token(NEG); break; case INC: t = jj_consume_token(INC); break; case DEC: t = jj_consume_token(DEC); break; case TST: t = jj_consume_token(TST); break; case CLR: t = jj_consume_token(CLR); break; case SER: t = jj_consume_token(SER); break; case PUSH: t = jj_consume_token(PUSH); break; case POP: t = jj_consume_token(POP); break; case LSL: t = jj_consume_token(LSL); break; case LSR: t = jj_consume_token(LSR); break; case ROL: t = jj_consume_token(ROL); break; case ROR: t = jj_consume_token(ROR); break; case ASR: t = jj_consume_token(ASR); break; case SWAP: t = jj_consume_token(SWAP); break; default: jj_la1[6] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrGPRIMM() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = OpcodeGPRIMM(); r1 = Register(); jj_consume_token(145); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeGPRIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADIW: t = jj_consume_token(ADIW); break; case SUBI: t = jj_consume_token(SUBI); break; case SBCI: t = jj_consume_token(SBCI); break; case SBIW: t = jj_consume_token(SBIW); break; case ANDI: t = jj_consume_token(ANDI); break; case ORI: t = jj_consume_token(ORI); break; case SBR: t = jj_consume_token(SBR); break; case CBR: t = jj_consume_token(CBR); break; case CPI: t = jj_consume_token(CPI); break; case SBRC: t = jj_consume_token(SBRC); break; case SBRS: t = jj_consume_token(SBRS); break; case BST: t = jj_consume_token(BST); break; case BLD: t = jj_consume_token(BLD); break; default: jj_la1[7] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrIMM() throws ParseException { Token t; SyntacticOperand.Expr c1; t = OpcodeIMM(); c1 = Const(); module.addInstruction(t.image, t, c1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case RJMP: t = jj_consume_token(RJMP); break; case JMP: t = jj_consume_token(JMP); break; case RCALL: t = jj_consume_token(RCALL); break; case CALL: t = jj_consume_token(CALL); break; case BREQ: t = jj_consume_token(BREQ); break; case BRNE: t = jj_consume_token(BRNE); break; case BRCS: t = jj_consume_token(BRCS); break; case BRCC: t = jj_consume_token(BRCC); break; case BRSH: t = jj_consume_token(BRSH); break; case BRLO: t = jj_consume_token(BRLO); break; case BRMI: t = jj_consume_token(BRMI); break; case BRPL: t = jj_consume_token(BRPL); break; case BRGE: t = jj_consume_token(BRGE); break; case BRLT: t = jj_consume_token(BRLT); break; case BRHS: t = jj_consume_token(BRHS); break; case BRHC: t = jj_consume_token(BRHC); break; case BRTS: t = jj_consume_token(BRTS); break; case BRTC: t = jj_consume_token(BRTC); break; case BRVS: t = jj_consume_token(BRVS); break; case BRVC: t = jj_consume_token(BRVC); break; case BRIE: t = jj_consume_token(BRIE); break; case BRID: t = jj_consume_token(BRID); break; case BSET: t = jj_consume_token(BSET); break; case BCLR: t = jj_consume_token(BCLR); break; default: jj_la1[8] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrIMMIMM() throws ParseException { Token t; SyntacticOperand.Expr c1, c2; t = OpcodeIMMIMM(); c1 = Const(); jj_consume_token(145); c2 = Const(); module.addInstruction(t.image, t, c1, c2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeIMMIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case SBIC: t = jj_consume_token(SBIC); break; case SBIS: t = jj_consume_token(SBIS); break; case BRBS: t = jj_consume_token(BRBS); break; case BRBC: t = jj_consume_token(BRBC); break; case SBI: t = jj_consume_token(SBI); break; case CBI: t = jj_consume_token(CBI); break; default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLoad() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LDI: InstrLDI(); break; case LD: InstrLD_variant(); break; case LDD: InstrLDD(); break; case LDS: InstrLDS(); break; case ELPM: case LPM: InstrLPM_variant(); break; default: jj_la1[10] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLDI() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(LDI); r1 = Register(); jj_consume_token(145); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLD_variant() throws ParseException { if (jj_2_1(5)) { InstrLDPI(); } else if (jj_2_2(4)) { InstrLDPD(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LD: InstrLD(); break; default: jj_la1[11] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(LD); r1 = Register(); jj_consume_token(145); r2 = Register(); module.addInstruction("ld", t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLDPI() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(LD); r1 = Register(); jj_consume_token(145); r2 = Register(); jj_consume_token(146); module.addInstruction("ldpi", t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLDPD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(LD); r1 = Register(); jj_consume_token(145); jj_consume_token(147); r2 = Register(); module.addInstruction("ldpd", t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLDD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; SyntacticOperand.Expr c1; t = jj_consume_token(LDD); r1 = Register(); jj_consume_token(145); r2 = Register(); jj_consume_token(146); c1 = Const(); module.addInstruction(t.image, t, r1, r2, c1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLDS() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(LDS); r1 = Register(); jj_consume_token(145); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLPM_variant() throws ParseException { if (jj_2_3(5)) { InstrLPMGPRGPRP(); } else if (jj_2_4(3)) { InstrLPMGPRGPR(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ELPM: case LPM: InstrLPMBARE(); break; default: jj_la1[12] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLPMGPRGPR() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = OpcodeLPM(); r1 = Register(); jj_consume_token(145); r2 = Register(); module.addInstruction(t.image + 'd', t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLPMGPRGPRP() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = OpcodeLPM(); r1 = Register(); jj_consume_token(145); r2 = Register(); jj_consume_token(146); module.addInstruction(t.image + "pi", t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLPMBARE() throws ParseException { Token t; t = OpcodeLPM(); module.addInstruction(t.image, t); }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeLPM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LPM: t = jj_consume_token(LPM); break; case ELPM: t = jj_consume_token(ELPM); break; default: jj_la1[13] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrStore() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrST_variant(); break; case STD: InstrSTD(); break; case STS: InstrSTS(); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrST_variant() throws ParseException { if (jj_2_5(3)) { InstrST(); } else if (jj_2_6(3)) { InstrSTPI(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrSTPD(); break; default: jj_la1[15] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrST() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(ST); r1 = Register(); jj_consume_token(145); r2 = Register(); module.addInstruction("st", t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrSTPI() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(ST); r1 = Register(); jj_consume_token(146); jj_consume_token(145); r2 = Register(); module.addInstruction("stpi", t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrSTPD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(ST); jj_consume_token(147); r1 = Register(); jj_consume_token(145); r2 = Register(); module.addInstruction("stpd", t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrSTD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; SyntacticOperand.Expr c1; t = jj_consume_token(STD); r1 = Register(); jj_consume_token(146); c1 = Const(); jj_consume_token(145); r2 = Register(); module.addInstruction(t.image, t, r1, c1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrSTS() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(STS); c1 = Const(); jj_consume_token(145); r1 = Register(); module.addInstruction(t.image, t, c1, r1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrBARE() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IJMP: t = jj_consume_token(IJMP); break; case ICALL: t = jj_consume_token(ICALL); break; case RET: t = jj_consume_token(RET); break; case RETI: t = jj_consume_token(RETI); break; case SEC: t = jj_consume_token(SEC); break; case CLC: t = jj_consume_token(CLC); break; case SEN: t = jj_consume_token(SEN); break; case CLN: t = jj_consume_token(CLN); break; case SEZ: t = jj_consume_token(SEZ); break; case CLZ: t = jj_consume_token(CLZ); break; case SEI: t = jj_consume_token(SEI); break; case CLI: t = jj_consume_token(CLI); break; case SES: t = jj_consume_token(SES); break; case CLS: t = jj_consume_token(CLS); break; case SEV: t = jj_consume_token(SEV); break; case CLV: t = jj_consume_token(CLV); break; case SET: t = jj_consume_token(SET); break; case CLT: t = jj_consume_token(CLT); break; case SEH: t = jj_consume_token(SEH); break; case CLH: t = jj_consume_token(CLH); break; case NOP: t = jj_consume_token(NOP); break; case SLEEP: t = jj_consume_token(SLEEP); break; case WDR: t = jj_consume_token(WDR); break; case BREAK: t = jj_consume_token(BREAK); break; case SPM: t = jj_consume_token(SPM); break; case EIJMP: t = jj_consume_token(EIJMP); break; case EICALL: t = jj_consume_token(EICALL); break; default: jj_la1[16] = jj_gen; jj_consume_token(-1); throw new ParseException(); } module.addInstruction(t.image, t); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrInput() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(IN); r1 = Register(); jj_consume_token(145); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrOutput() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(OUT); c1 = Const(); jj_consume_token(145); r1 = Register(); module.addInstruction(t.image, t, c1, r1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public SyntacticOperand.Register Register() throws ParseException { Token tok; tok = jj_consume_token(IDENTIFIER); return module.newOperand(tok); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Label() throws ParseException { Token tok; tok = jj_consume_token(IDENTIFIER); jj_consume_token(148); module.addLabel(tok); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void EquDirective() throws ParseException { Token tok; Expr e; jj_consume_token(149); tok = jj_consume_token(IDENTIFIER); jj_consume_token(150); e = Expr(); module.addConstant(tok, e); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void OrgDirective() throws ParseException { Token tok; jj_consume_token(151); tok = jj_consume_token(INTEGER_LITERAL); module.setOrigin(new Expr.Constant(tok)); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void ReserveDirective() throws ParseException { Expr e; jj_consume_token(152); e = Expr(); module.reserveBytes(e, null); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void DataDirective() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 153: ByteDirective(); break; case 154: WordDirective(); break; case 155: DoubleWordDirective(); break; default: jj_la1[17] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void ByteDirective() throws ParseException { ExprList l; jj_consume_token(153); l = DataList(); module.addDataBytes(l); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void WordDirective() throws ParseException { ExprList l; jj_consume_token(154); l = DataList(); module.addDataWords(l); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void DoubleWordDirective() throws ParseException { ExprList l; jj_consume_token(155); l = DataList(); module.addDataDoubleWords(l); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void DefDirective() throws ParseException { Token name; SyntacticOperand.Register reg; jj_consume_token(156); name = jj_consume_token(IDENTIFIER); jj_consume_token(150); reg = Register(); module.addDefinition(name, reg.name); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void IncludeDirective() throws ParseException { Token file; jj_consume_token(157); file = jj_consume_token(STRING_LITERAL); module.includeFile(file); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void ExitDirective() throws ParseException { jj_consume_token(158); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void NoListDirective() throws ParseException { jj_consume_token(159); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void ListDirective() throws ParseException { jj_consume_token(160); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void SegDirective() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 161: jj_consume_token(161); module.enterDataSegment(); break; case 162: jj_consume_token(162); module.enterProgramSegment(); break; case 163: jj_consume_token(163); module.enterEEPROMSegment(); break; default: jj_la1[18] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public SyntacticOperand.Expr Const() throws ParseException { Expr e; e = Expr(); return module.newOperand(e); }
// in src/avrora/syntax/atmel/AtmelParser.java
public ExprList DataList() throws ParseException { ExprList list = new ExprList(); Expr e; e = Data(); list.add(e); label_2: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 145: break; default: jj_la1[19] = jj_gen; break label_2; } jj_consume_token(145); e = Data(); list.add(e); } return list; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr Data() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case LOW: case HIGH: case LO8: case HI8: case BYTE2: case BYTE3: case BYTE4: case LWRD: case HWRD: case PAGE: case EXP2: case LOG2: case IDENTIFIER: case 147: case 179: case 180: case 181: e = Expr(); break; case STRING_LITERAL: tok = jj_consume_token(STRING_LITERAL); e = new Expr.StringLiteral(tok); break; default: jj_la1[20] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr Expr() throws ParseException { Expr e; e = LorExpr(); return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr LorExpr() throws ParseException { Token tok; Expr e, er; e = LandExpr(); label_3: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 164: break; default: jj_la1[21] = jj_gen; break label_3; } tok = jj_consume_token(164); er = LandExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr LandExpr() throws ParseException { Token tok; Expr e, er; e = OrExpr(); label_4: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 165: break; default: jj_la1[22] = jj_gen; break label_4; } tok = jj_consume_token(165); er = OrExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr OrExpr() throws ParseException { Token tok; Expr e, er; e = XorExpr(); label_5: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 166: break; default: jj_la1[23] = jj_gen; break label_5; } tok = jj_consume_token(166); er = XorExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr XorExpr() throws ParseException { Token tok; Expr e, er; e = AndExpr(); label_6: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 167: break; default: jj_la1[24] = jj_gen; break label_6; } tok = jj_consume_token(167); er = AndExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr AndExpr() throws ParseException { Token tok; Expr e, er; e = EqExpr(); label_7: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 168: break; default: jj_la1[25] = jj_gen; break label_7; } tok = jj_consume_token(168); er = EqExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr EqExpr() throws ParseException { Token tok; Expr e, er; e = RelExpr(); label_8: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 169: case 170: break; default: jj_la1[26] = jj_gen; break label_8; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 169: tok = jj_consume_token(169); break; case 170: tok = jj_consume_token(170); break; default: jj_la1[27] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = RelExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr RelExpr() throws ParseException { Token tok; Expr e, er; e = ShiftExpr(); label_9: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 171: case 172: case 173: case 174: break; default: jj_la1[28] = jj_gen; break label_9; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 171: tok = jj_consume_token(171); break; case 172: tok = jj_consume_token(172); break; case 173: tok = jj_consume_token(173); break; case 174: tok = jj_consume_token(174); break; default: jj_la1[29] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = ShiftExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr ShiftExpr() throws ParseException { Token tok; Expr e, er; e = AddExpr(); label_10: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 175: case 176: break; default: jj_la1[30] = jj_gen; break label_10; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 175: tok = jj_consume_token(175); break; case 176: tok = jj_consume_token(176); break; default: jj_la1[31] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = AddExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr AddExpr() throws ParseException { Token tok; Expr e, er; e = MulExpr(); label_11: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 146: case 147: break; default: jj_la1[32] = jj_gen; break label_11; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 146: tok = jj_consume_token(146); break; case 147: tok = jj_consume_token(147); break; default: jj_la1[33] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = MulExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr MulExpr() throws ParseException { Token tok; Expr e, er; e = UnaryExpr(); label_12: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 177: case 178: break; default: jj_la1[34] = jj_gen; break label_12; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 177: tok = jj_consume_token(177); break; case 178: tok = jj_consume_token(178); break; default: jj_la1[35] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = UnaryExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr UnaryExpr() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 147: case 179: case 180: switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 179: tok = jj_consume_token(179); break; case 180: tok = jj_consume_token(180); break; case 147: tok = jj_consume_token(147); break; default: jj_la1[36] = jj_gen; jj_consume_token(-1); throw new ParseException(); } e = UnaryExpr(); e = new Expr.UnOp(tok, e); break; case INTEGER_LITERAL: case LOW: case HIGH: case LO8: case HI8: case BYTE2: case BYTE3: case BYTE4: case LWRD: case HWRD: case PAGE: case EXP2: case LOG2: case IDENTIFIER: case 181: e = Term(); break; default: jj_la1[37] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr Term() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IDENTIFIER: tok = jj_consume_token(IDENTIFIER); e = new Expr.Variable(tok); break; case LOW: case HIGH: case LO8: case HI8: case BYTE2: case BYTE3: case BYTE4: case LWRD: case HWRD: case PAGE: case EXP2: case LOG2: e = Func(); break; case INTEGER_LITERAL: tok = jj_consume_token(INTEGER_LITERAL); e = new Expr.Constant(tok); break; case 181: jj_consume_token(181); e = Expr(); jj_consume_token(182); break; default: jj_la1[38] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr Func() throws ParseException { Token tok; Token l; Expr e; tok = FuncName(); jj_consume_token(181); e = Expr(); l = jj_consume_token(182); return new Expr.Func(tok, e, l); }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token FuncName() throws ParseException { Token tok; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LOW: tok = jj_consume_token(LOW); break; case HIGH: tok = jj_consume_token(HIGH); break; case LO8: tok = jj_consume_token(LO8); break; case HI8: tok = jj_consume_token(HI8); break; case BYTE2: tok = jj_consume_token(BYTE2); break; case BYTE3: tok = jj_consume_token(BYTE3); break; case BYTE4: tok = jj_consume_token(BYTE4); break; case LWRD: tok = jj_consume_token(LWRD); break; case HWRD: tok = jj_consume_token(HWRD); break; case PAGE: tok = jj_consume_token(PAGE); break; case EXP2: tok = jj_consume_token(EXP2); break; case LOG2: tok = jj_consume_token(LOG2); break; default: jj_la1[39] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return tok; }
// in src/avrora/syntax/atmel/AtmelParser.java
private Token jj_consume_token(int kind) throws ParseException { Token oldToken; if ((oldToken = token).next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; if (token.kind == kind) { jj_gen++; if (++jj_gc > 100) { jj_gc = 0; for (int i = 0; i < jj_2_rtns.length; i++) { JJCalls c = jj_2_rtns[i]; while (c != null) { if (c.gen < jj_gen) c.first = null; c = c.next; } } } return token; } token = oldToken; jj_kind = kind; throw generateParseException(); }
// in src/jintgen/isdl/parser/ISDLParser.java
public ArchDecl ArchDecl() throws ParseException { Token n; jj_consume_token(ARCHITECTURE); n = jj_consume_token(IDENTIFIER); arch = new ArchDecl(n); jj_consume_token(LBRACKET); label_1: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INSTRUCTION: case FORMAT: case ENUM: case ENUM_SUB: case OPERAND_TYPE: case ADDR_MODE: case ADDR_SET: case GLOBAL: case SUBROUTINE: case INLINE: case EXTERNAL: case PSEUDO: break; default: jj_la1[0] = jj_gen; break label_1; } Item(); } jj_consume_token(RBRACKET); return arch; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void Item() throws ParseException { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INSTRUCTION: case PSEUDO: Instruction(); break; case ENUM: Enum(); break; case ENUM_SUB: EnumSubset(); break; case FORMAT: FormatDecl(); break; case OPERAND_TYPE: OperandTypeDecl(); break; case SUBROUTINE: case INLINE: case EXTERNAL: Subroutine(); break; case ADDR_MODE: AddrModeDecl(); break; case ADDR_SET: AddrSetDecl(); break; case GLOBAL: Global(); break; default: jj_la1[1] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public void Instruction() throws ParseException { Token n; AddrModeUse am; List<Stmt> s = new LinkedList<Stmt>(); List<Property> p = new LinkedList<Property>(); FormatDecl e; boolean pseudo = false; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PSEUDO: jj_consume_token(PSEUDO); pseudo = true; break; default: jj_la1[2] = jj_gen; } jj_consume_token(INSTRUCTION); n = jj_consume_token(STRING_LITERAL); am = AddrModeUse(n); jj_consume_token(LBRACKET); label_2: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ENCODING: break; default: jj_la1[3] = jj_gen; break label_2; } e = Encoding(n); am.addEncoding(e); } label_3: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PROPERTY: break; default: jj_la1[4] = jj_gen; break label_3; } Property(p); } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case EXECUTE: s = Execute(s); break; default: jj_la1[5] = jj_gen; } jj_consume_token(RBRACKET); arch.addInstruction(new InstrDecl(pseudo, n, am, p, s)); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void Enum() throws ParseException { Token n; SymbolMapping m; jj_consume_token(ENUM); n = jj_consume_token(IDENTIFIER); m = new SymbolMapping(n); jj_consume_token(LBRACKET); MappingSetElem(m); label_4: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[6] = jj_gen; break label_4; } jj_consume_token(COMMA); MappingSetElem(m); } jj_consume_token(RBRACKET); arch.addEnum(new EnumDecl(n, m)); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void EnumSubset() throws ParseException { Token n; EnumTypeRef t; SymbolMapping m; jj_consume_token(ENUM_SUB); n = jj_consume_token(IDENTIFIER); jj_consume_token(78); t = EnumType(); m = new SymbolMapping(n); jj_consume_token(LBRACKET); MappingSetElem(m); label_5: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[7] = jj_gen; break label_5; } jj_consume_token(COMMA); MappingSetElem(m); } jj_consume_token(RBRACKET); arch.addEnum(new EnumDecl.Subset(n, t, m)); }
// in src/jintgen/isdl/parser/ISDLParser.java
public AddrModeUse AddrModeUse(Token n) throws ParseException { List<AddrModeDecl.Operand> o; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 78: jj_consume_token(78); n = jj_consume_token(IDENTIFIER); return new AddrModeUse(n, null); default: jj_la1[8] = jj_gen; o = Operands(); return new AddrModeUse(null, new AddrModeDecl(n, o)); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public Property Property(List<Property> pl) throws ParseException { Property p; Token name, v; TypeRef t; jj_consume_token(PROPERTY); name = jj_consume_token(IDENTIFIER); jj_consume_token(78); t = Type(); jj_consume_token(EQUALS); v = Value(); jj_consume_token(SEMI); p = new Property(name, t, v); if (pl != null) pl.add(p); return p; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Token Value() throws ParseException { Token t; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case STRING_LITERAL: t = jj_consume_token(STRING_LITERAL); break; case IDENTIFIER: t = jj_consume_token(IDENTIFIER); break; case BOOLEAN_LITERAL: t = jj_consume_token(BOOLEAN_LITERAL); break; case INTEGER_LITERAL: t = jj_consume_token(INTEGER_LITERAL); break; default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void Global() throws ParseException { Token n; TypeRef t; jj_consume_token(GLOBAL); n = jj_consume_token(IDENTIFIER); jj_consume_token(78); t = Type(); jj_consume_token(SEMI); arch.addGlobal(n, t); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void AddrModeDecl() throws ParseException { Token n; AddrModeDecl amd; Property p; List<AddrModeDecl.Operand> o; FormatDecl e; jj_consume_token(ADDR_MODE); n = jj_consume_token(IDENTIFIER); o = Operands(); amd = new AddrModeDecl(n, o); jj_consume_token(LBRACKET); label_6: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ENCODING: case PROPERTY: break; default: jj_la1[10] = jj_gen; break label_6; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PROPERTY: p = Property(null); amd.addProperty(p); break; case ENCODING: e = Encoding(n); amd.addEncoding(e); break; default: jj_la1[11] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACKET); arch.addAddressingMode(amd); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void AddrSetDecl() throws ParseException { Token n; List<Token> l = new LinkedList<Token>(); Token e; jj_consume_token(ADDR_SET); n = jj_consume_token(IDENTIFIER); jj_consume_token(LBRACKET); e = jj_consume_token(IDENTIFIER); l.add(e); label_7: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[12] = jj_gen; break label_7; } jj_consume_token(COMMA); e = jj_consume_token(IDENTIFIER); l.add(e); } jj_consume_token(RBRACKET); arch.addAddressingModeSet(new AddrModeSetDecl(n, l)); }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl Encoding(Token n) throws ParseException { FormatDecl d; FormatDecl.Cond ec; jj_consume_token(ENCODING); jj_consume_token(EQUALS); d = Format(n); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case WHEN: ec = EncodingCond(); d.setCond(ec); break; default: jj_la1[13] = jj_gen; } return d; }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl.Cond EncodingCond() throws ParseException { Token n; Expr e; jj_consume_token(WHEN); n = jj_consume_token(IDENTIFIER); jj_consume_token(EQUAL); e = Expr(); return new FormatDecl.Cond(n, e); }
// in src/jintgen/isdl/parser/ISDLParser.java
public List<Stmt> Execute(List<Stmt> s) throws ParseException { jj_consume_token(EXECUTE); Block(s); return s; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void FormatDecl() throws ParseException { Token n; FormatDecl d; jj_consume_token(FORMAT); n = jj_consume_token(IDENTIFIER); jj_consume_token(EQUALS); d = Format(n); arch.addEncoding(d); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void OperandTypeDecl() throws ParseException { Token n; OperandTypeDecl d; jj_consume_token(OPERAND_TYPE); n = jj_consume_token(IDENTIFIER); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 79: d = SimpleOperandType(n); break; case LBRACKET: d = CompoundOperandType(n); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } arch.addOperand(d); }
// in src/jintgen/isdl/parser/ISDLParser.java
public OperandTypeDecl SimpleOperandType(Token n) throws ParseException { TypeRef t; Token b, l = null, h = null; OperandTypeDecl d; jj_consume_token(79); b = jj_consume_token(INTEGER_LITERAL); jj_consume_token(80); jj_consume_token(78); t = Type(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 79: jj_consume_token(79); l = jj_consume_token(INTEGER_LITERAL); jj_consume_token(COMMA); h = jj_consume_token(INTEGER_LITERAL); jj_consume_token(80); break; default: jj_la1[15] = jj_gen; } d = new OperandTypeDecl.Value(n, b, t, l, h); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LBRACKET: OperandBody(d); break; case SEMI: jj_consume_token(SEMI); break; default: jj_la1[16] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return d; }
// in src/jintgen/isdl/parser/ISDLParser.java
public OperandTypeDecl CompoundOperandType(Token n) throws ParseException { OperandTypeDecl.Compound cd = new OperandTypeDecl.Compound(n); OperandBody(cd); return cd; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void OperandBody(OperandTypeDecl td) throws ParseException { jj_consume_token(LBRACKET); label_8: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case READ: case WRITE: case 81: break; default: jj_la1[17] = jj_gen; break label_8; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case READ: ReadMethod(td); break; case WRITE: WriteMethod(td); break; case 81: SubOperand(td); break; default: jj_la1[18] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACKET); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void SubOperand(OperandTypeDecl td) throws ParseException { AddrModeDecl.Operand o; jj_consume_token(81); o = Operand(); td.addSubOperand(o); jj_consume_token(SEMI); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void ReadMethod(OperandTypeDecl td) throws ParseException { Token r; TypeRef tr; List<Stmt> s = new LinkedList<Stmt>(); r = jj_consume_token(READ); jj_consume_token(78); tr = Type(); Block(s); td.addReadDecl(r, tr, new CodeRegion(s)); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void WriteMethod(OperandTypeDecl td) throws ParseException { Token r; TypeRef tr; List<Stmt> s = new LinkedList<Stmt>(); r = jj_consume_token(WRITE); jj_consume_token(78); tr = Type(); Block(s); td.addWriteDecl(r, tr, new CodeRegion(s)); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void MappingSetElem(SymbolMapping m) throws ParseException { Token n, i; n = jj_consume_token(IDENTIFIER); jj_consume_token(EQUALS); i = jj_consume_token(INTEGER_LITERAL); m.add(n, i); }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl Format(Token n) throws ParseException { Token pr = null; FormatDecl d; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PRIORITY: jj_consume_token(PRIORITY); pr = jj_consume_token(INTEGER_LITERAL); break; default: jj_la1[19] = jj_gen; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: d = DerivedFormat(pr, n); break; case LBRACKET: d = NewFormat(pr, n); break; default: jj_la1[20] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return d; }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl DerivedFormat(Token pr, Token n) throws ParseException { Token p; List<FormatDecl.Substitution> l = new LinkedList<FormatDecl.Substitution>(); p = jj_consume_token(IDENTIFIER); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case WHERE: jj_consume_token(WHERE); l = SubstitutionList(); break; case SEMI: jj_consume_token(SEMI); break; default: jj_la1[21] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return new FormatDecl.Derived(n, pr, p, l); }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl NewFormat(Token pr, Token n) throws ParseException { List<Expr> l; jj_consume_token(LBRACKET); l = ExprList(); jj_consume_token(RBRACKET); return new FormatDecl(n, pr, l); }
// in src/jintgen/isdl/parser/ISDLParser.java
public List<FormatDecl.Substitution> SubstitutionList() throws ParseException { List<FormatDecl.Substitution> l = new LinkedList<FormatDecl.Substitution>(); FormatDecl.Substitution s; jj_consume_token(LBRACKET); s = Substitution(); l.add(s); label_9: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[22] = jj_gen; break label_9; } jj_consume_token(COMMA); s = Substitution(); l.add(s); } jj_consume_token(RBRACKET); return l; }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl.Substitution Substitution() throws ParseException { Token n; Expr e; n = jj_consume_token(IDENTIFIER); jj_consume_token(EQUALS); e = Expr(); return new FormatDecl.Substitution(n, e); }
// in src/jintgen/isdl/parser/ISDLParser.java
public List<AddrModeDecl.Operand> Operands() throws ParseException { AddrModeDecl.Operand o; List<AddrModeDecl.Operand> l = new LinkedList<AddrModeDecl.Operand>(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: o = Operand(); l.add(o); label_10: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[23] = jj_gen; break label_10; } jj_consume_token(COMMA); o = Operand(); l.add(o); } break; default: jj_la1[24] = jj_gen; } return l; }
// in src/jintgen/isdl/parser/ISDLParser.java
public AddrModeDecl.Operand Operand() throws ParseException { Token n; OperandTypeRef t; n = jj_consume_token(IDENTIFIER); jj_consume_token(78); t = OperandType(); return new AddrModeDecl.Operand(n, t); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void Subroutine() throws ParseException { boolean i = false; Token m; TypeRef r; List<SubroutineDecl.Parameter> f; List<Stmt> l = new LinkedList<Stmt>(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case SUBROUTINE: case INLINE: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INLINE: jj_consume_token(INLINE); i = true; break; default: jj_la1[25] = jj_gen; } jj_consume_token(SUBROUTINE); m = jj_consume_token(IDENTIFIER); jj_consume_token(LPAREN); f = Params(); jj_consume_token(RPAREN); jj_consume_token(78); r = Type(); Block(l); arch.addSubroutine(new SubroutineDecl(i, m, f, r, l)); break; case EXTERNAL: jj_consume_token(EXTERNAL); jj_consume_token(SUBROUTINE); m = jj_consume_token(IDENTIFIER); jj_consume_token(LPAREN); f = Params(); jj_consume_token(RPAREN); jj_consume_token(78); r = Type(); jj_consume_token(SEMI); arch.addSubroutine(new SubroutineDecl(i, m, f, r, null)); break; default: jj_la1[26] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public List<SubroutineDecl.Parameter> Params() throws ParseException { SubroutineDecl.Parameter p; List<SubroutineDecl.Parameter> l = new LinkedList<SubroutineDecl.Parameter>(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: p = Param(); l.add(p); label_11: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[27] = jj_gen; break label_11; } jj_consume_token(COMMA); p = Param(); l.add(p); } break; default: jj_la1[28] = jj_gen; } return l; }
// in src/jintgen/isdl/parser/ISDLParser.java
public SubroutineDecl.Parameter Param() throws ParseException { Token n; TypeRef t; n = jj_consume_token(IDENTIFIER); jj_consume_token(78); t = Type(); return new SubroutineDecl.Parameter(n, t); }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Expr() throws ParseException { Expr e; e = Cond_Or_Expr(); return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public List<Expr> ExprList() throws ParseException { List<Expr> l = new LinkedList<Expr>(); Expr e; e = Expr(); l.add(e); label_12: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[29] = jj_gen; break label_12; } jj_consume_token(COMMA); e = Expr(); l.add(e); } return l; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Term() throws ParseException { Expr e; if (jj_2_1(2)) { e = CallExpr(); } else if (jj_2_2(2)) { e = DotExpr(); } else { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: e = VarUse(); break; case INTEGER_LITERAL: case BOOLEAN_LITERAL: e = Literal(); break; case READ: e = ReadExpr(); break; case LPAREN: jj_consume_token(LPAREN); e = Expr(); jj_consume_token(RPAREN); break; default: jj_la1[30] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } label_13: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 79: break; default: jj_la1[31] = jj_gen; break label_13; } e = Index(e); } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 78: e = Conversion(e); break; default: jj_la1[32] = jj_gen; } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Conversion(Expr e) throws ParseException { TypeRef t; jj_consume_token(78); t = Type(); return new ConversionExpr(e, t); }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr VarUse() throws ParseException { Token t; t = jj_consume_token(IDENTIFIER); return new VarExpr(t); }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr DotExpr() throws ParseException { Token o, f; o = jj_consume_token(IDENTIFIER); jj_consume_token(82); f = jj_consume_token(IDENTIFIER); return new DotExpr(new VarExpr(o), f); }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Literal() throws ParseException { Token t; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: t = jj_consume_token(INTEGER_LITERAL); return new Literal.IntExpr(t); case BOOLEAN_LITERAL: t = jj_consume_token(BOOLEAN_LITERAL); return new Literal.BoolExpr(t); default: jj_la1[33] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr ReadExpr() throws ParseException { Token r, o; TypeRef t = null; r = jj_consume_token(READ); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 78: jj_consume_token(78); t = Type(); break; default: jj_la1[34] = jj_gen; } jj_consume_token(LPAREN); o = jj_consume_token(IDENTIFIER); jj_consume_token(RPAREN); return new ReadExpr(r, t, o); }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr CallExpr() throws ParseException { Token t; List<Expr> l; t = jj_consume_token(IDENTIFIER); l = Parameters(); return new CallExpr(t, l); }
// in src/jintgen/isdl/parser/ISDLParser.java
public List<Expr> Parameters() throws ParseException { List<Expr> l = new LinkedList<Expr>(); jj_consume_token(LPAREN); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case READ: case BOOLEAN_LITERAL: case LPAREN: case ADD: case SUB: case NOT: case B_COMP: case IDENTIFIER: l = ExprList(); break; default: jj_la1[35] = jj_gen; } jj_consume_token(RPAREN); return l; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Stmt Statement() throws ParseException { Stmt s; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LOCAL: s = LocalDecl(); break; case IF: s = IfStatement(); break; default: jj_la1[36] = jj_gen; if (jj_2_3(2147483647)) { s = Assignment(); } else { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: s = CallStmt(); break; case RETURN: s = ReturnStmt(); break; case WRITE: s = WriteStmt(); break; default: jj_la1[37] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } return s; }
// in src/jintgen/isdl/parser/ISDLParser.java
public DeclStmt LocalDecl() throws ParseException { Token n; TypeRef t; Expr e; jj_consume_token(LOCAL); n = jj_consume_token(IDENTIFIER); jj_consume_token(78); t = Type(); jj_consume_token(EQUALS); e = Expr(); jj_consume_token(SEMI); return new DeclStmt(n, t, e); }
// in src/jintgen/isdl/parser/ISDLParser.java
public IfStmt IfStatement() throws ParseException { Expr c; List<Stmt> t = new LinkedList<Stmt>(), f = new LinkedList<Stmt>(); jj_consume_token(IF); jj_consume_token(LPAREN); c = Expr(); jj_consume_token(RPAREN); SingleStatement(t); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ELSE: jj_consume_token(ELSE); SingleStatement(f); break; default: jj_la1[38] = jj_gen; } return new IfStmt(c, t, f); }
// in src/jintgen/isdl/parser/ISDLParser.java
public CallStmt CallStmt() throws ParseException { Token t; List<Expr> l; t = jj_consume_token(IDENTIFIER); l = Parameters(); jj_consume_token(SEMI); return new CallStmt(t, l); }
// in src/jintgen/isdl/parser/ISDLParser.java
public ReturnStmt ReturnStmt() throws ParseException { Expr e; jj_consume_token(RETURN); e = Expr(); jj_consume_token(SEMI); return new ReturnStmt(e); }
// in src/jintgen/isdl/parser/ISDLParser.java
public WriteStmt WriteStmt() throws ParseException { Token w, o; TypeRef t = null; Expr e; w = jj_consume_token(WRITE); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 78: jj_consume_token(78); t = Type(); break; default: jj_la1[39] = jj_gen; } jj_consume_token(LPAREN); o = jj_consume_token(IDENTIFIER); jj_consume_token(COMMA); e = Expr(); jj_consume_token(RPAREN); jj_consume_token(SEMI); return new WriteStmt(w, t, o, e); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void SingleStatement(List<Stmt> l) throws ParseException { Stmt s; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case READ: case WRITE: case LOCAL: case IF: case RETURN: case BOOLEAN_LITERAL: case LPAREN: case ADD: case SUB: case NOT: case B_COMP: case IDENTIFIER: s = Statement(); l.add(s); break; case LBRACKET: Block(l); break; default: jj_la1[40] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public AssignStmt Assignment() throws ParseException { Expr d; Expr e; d = Expr(); jj_consume_token(EQUALS); e = Expr(); jj_consume_token(SEMI); return new AssignStmt(d, e); }
// in src/jintgen/isdl/parser/ISDLParser.java
public List<Stmt> Block(List<Stmt> l) throws ParseException { Stmt s; jj_consume_token(LBRACKET); label_14: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case READ: case WRITE: case LOCAL: case IF: case RETURN: case BOOLEAN_LITERAL: case LPAREN: case ADD: case SUB: case NOT: case B_COMP: case IDENTIFIER: break; default: jj_la1[41] = jj_gen; break label_14; } s = Statement(); l.add(s); } jj_consume_token(RBRACKET); return l; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Index(Expr e) throws ParseException { Expr et; Token t1, t2; jj_consume_token(79); if (jj_2_4(2)) { t1 = jj_consume_token(INTEGER_LITERAL); jj_consume_token(78); t2 = jj_consume_token(INTEGER_LITERAL); e = new FixedRangeExpr(e, t1, t2); } else { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case READ: case BOOLEAN_LITERAL: case LPAREN: case ADD: case SUB: case NOT: case B_COMP: case IDENTIFIER: et = Expr(); e = new IndexExpr(e, et); break; default: jj_la1[42] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(80); return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Cond_Or_Expr() throws ParseException { Expr e, et; Token tok; e = Cond_Xor_Expr(); label_15: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case OR: break; default: jj_la1[43] = jj_gen; break label_15; } tok = jj_consume_token(OR); et = Cond_Xor_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Cond_Xor_Expr() throws ParseException { Expr e, et; Token tok; e = Cond_And_Expr(); label_16: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case XOR: break; default: jj_la1[44] = jj_gen; break label_16; } tok = jj_consume_token(XOR); et = Cond_And_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Cond_And_Expr() throws ParseException { Expr e, et; Token tok; e = Or_Expr(); label_17: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case AND: break; default: jj_la1[45] = jj_gen; break label_17; } tok = jj_consume_token(AND); et = Or_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Or_Expr() throws ParseException { Expr e, et; Token tok; e = Xor_Expr(); label_18: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case B_OR: break; default: jj_la1[46] = jj_gen; break label_18; } tok = jj_consume_token(B_OR); et = Xor_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Xor_Expr() throws ParseException { Expr e, et; Token tok; e = And_Expr(); label_19: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case B_XOR: break; default: jj_la1[47] = jj_gen; break label_19; } tok = jj_consume_token(B_XOR); et = And_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr And_Expr() throws ParseException { Expr e, et; Token tok; e = Equ_Expr(); label_20: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case B_AND: break; default: jj_la1[48] = jj_gen; break label_20; } tok = jj_consume_token(B_AND); et = Equ_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Equ_Expr() throws ParseException { Expr e, et; Token tok; e = Rel_Expr(); label_21: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case EQUAL: case NOTEQUAL: break; default: jj_la1[49] = jj_gen; break label_21; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case EQUAL: tok = jj_consume_token(EQUAL); break; case NOTEQUAL: tok = jj_consume_token(NOTEQUAL); break; default: jj_la1[50] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Rel_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Rel_Expr() throws ParseException { Expr e, et; Token tok; e = Shift_Expr(); label_22: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LESS: case LESSEQ: case GREATER: case GREATEREQ: break; default: jj_la1[51] = jj_gen; break label_22; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LESS: tok = jj_consume_token(LESS); break; case GREATER: tok = jj_consume_token(GREATER); break; case LESSEQ: tok = jj_consume_token(LESSEQ); break; case GREATEREQ: tok = jj_consume_token(GREATEREQ); break; default: jj_la1[52] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Shift_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Shift_Expr() throws ParseException { Expr e, et; Token tok; e = Add_Expr(); label_23: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case SHIFTLEFT: case SHIFTRIGHT: break; default: jj_la1[53] = jj_gen; break label_23; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case SHIFTLEFT: tok = jj_consume_token(SHIFTLEFT); break; case SHIFTRIGHT: tok = jj_consume_token(SHIFTRIGHT); break; default: jj_la1[54] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Add_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Add_Expr() throws ParseException { Expr e, et; Token tok; e = Mul_Expr(); label_24: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: case SUB: break; default: jj_la1[55] = jj_gen; break label_24; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: tok = jj_consume_token(ADD); break; case SUB: tok = jj_consume_token(SUB); break; default: jj_la1[56] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Mul_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Mul_Expr() throws ParseException { Expr e, et; Token tok; e = Un_Expr(); label_25: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case MUL: case DIV: case MOD: break; default: jj_la1[57] = jj_gen; break label_25; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case MUL: tok = jj_consume_token(MUL); break; case DIV: tok = jj_consume_token(DIV); break; case MOD: tok = jj_consume_token(MOD); break; default: jj_la1[58] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Un_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Un_Expr() throws ParseException { Expr e; Token tok; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: case SUB: case NOT: case B_COMP: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case B_COMP: tok = jj_consume_token(B_COMP); break; case NOT: tok = jj_consume_token(NOT); break; case SUB: tok = jj_consume_token(SUB); break; case ADD: tok = jj_consume_token(ADD); break; default: jj_la1[59] = jj_gen; jj_consume_token(-1); throw new ParseException(); } e = Term(); e = new UnOpExpr(tok, e); break; case INTEGER_LITERAL: case READ: case BOOLEAN_LITERAL: case LPAREN: case IDENTIFIER: e = Term(); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public TypeRef Type() throws ParseException { Token t; HashMap<String, List> dims = new HashMap<String, List>(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: case SUB: SignDimension(dims); break; default: jj_la1[61] = jj_gen; } t = jj_consume_token(IDENTIFIER); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 82: SizeDimension(dims); break; default: jj_la1[62] = jj_gen; } if (jj_2_5(2)) { TypesDimension(dims, "types"); } else { } return new TypeRef(t, dims); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void SignDimension(HashMap<String, List> dims) throws ParseException { Token s; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: s = jj_consume_token(ADD); break; case SUB: s = jj_consume_token(SUB); break; default: jj_la1[63] = jj_gen; jj_consume_token(-1); throw new ParseException(); } List l = new LinkedList(); l.add(s); dims.put("sign", l); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void SizeDimension(HashMap<String, List> dims) throws ParseException { Token w; jj_consume_token(82); w = jj_consume_token(INTEGER_LITERAL); List l = new LinkedList(); l.add(w); dims.put("size", l); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void TypesDimension(HashMap<String, List> dims, String n) throws ParseException { List ty = new LinkedList(); TypeRef tr; jj_consume_token(LESS); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: case SUB: case IDENTIFIER: tr = Type(); ty.add(tr); label_26: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[64] = jj_gen; break label_26; } jj_consume_token(COMMA); tr = Type(); ty.add(tr); } break; default: jj_la1[65] = jj_gen; } jj_consume_token(GREATER); dims.put(n, ty); }
// in src/jintgen/isdl/parser/ISDLParser.java
public OperandTypeRef OperandType() throws ParseException { Token t; t = jj_consume_token(IDENTIFIER); return new OperandTypeRef(t); }
// in src/jintgen/isdl/parser/ISDLParser.java
public EnumTypeRef EnumType() throws ParseException { Token t; t = jj_consume_token(IDENTIFIER); return new EnumTypeRef(t); }
// in src/jintgen/isdl/parser/ISDLParser.java
private Token jj_consume_token(int kind) throws ParseException { Token oldToken; if ((oldToken = token).next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; if (token.kind == kind) { jj_gen++; if (++jj_gc > 100) { jj_gc = 0; for (int i = 0; i < jj_2_rtns.length; i++) { JJCalls c = jj_2_rtns[i]; while (c != null) { if (c.gen < jj_gen) c.first = null; c = c.next; } } } return token; } token = oldToken; jj_kind = kind; throw generateParseException(); }
// in src/jintgen/Main.java
private static ArchDecl loadArchitecture(String fname) throws FileNotFoundException, ParseException { Status.begin("Loading architecture description "+fname); checkFileExists(fname); File archfile = new File(fname); FileInputStream fis = new FileInputStream(archfile); ISDLParser parser = new ISDLParser(fis); ArchDecl a = parser.ArchDecl(); Status.success(); Status.begin("Verifying "+fname); new Verifier(a).verify(); Status.success(); return a; }
(Domain) Error 15
              
// in src/avrora/sim/mcu/RegisterLayout.java
public void addIOReg(String n, int ior_num) { if ( ior_num >= ioreg_size ) throw new Util.Error("Layout Error", "invalid register address "+ior_num+" for register "+ StringUtil.quote(n)); RegisterInfo i = new RegisterInfo(n, ior_num); info[ior_num] = i; ioregAssignments.put(n, i); }
// in src/avrora/sim/mcu/RegisterLayout.java
public void addIOReg(String n, int ior_num, String format) { if ( ior_num >= ioreg_size ) throw new Util.Error("Layout Error", "invalid register address "+ior_num+" for register "+ StringUtil.quote(n)); RegisterInfo i = new RegisterInfo(n, ior_num); i.subfields = parseSubFields(n, ior_num, format); info[ior_num] = i; ioregAssignments.put(n, i); }
// in src/avrora/sim/mcu/RegisterLayout.java
private SubField[] parseSubFields(String name, int ior, String desc) { int totalbits = 0; int count = 0; SubField[] sfs = new SubField[8]; StringCharacterIterator i = new StringCharacterIterator(desc); int ior_hbit = 7; while ( ior_hbit >= 0 && i.current() != CharacterIterator.DONE ) { if ( i.current() == '.') { ior_hbit = readUnusedField(i, sfs, count, ior_hbit); totalbits += sfs[count].length; } else if ( i.current() == 'x') { ior_hbit = readReservedField(i, sfs, count, ior_hbit); totalbits += sfs[count].length; } else { ior_hbit = readNamedField(i, ior, sfs, count, ior_hbit); totalbits += sfs[count].length; } count++; StringUtil.peekAndEat(i, ','); StringUtil.skipWhiteSpace(i); } // check that there are exactly 8 bits if ( totalbits != ioreg_length ) { throw new Util.Error("Layout Error", "expected "+ioreg_length+" bits, found: "+totalbits+" in "+StringUtil.quote(name)); } // resize the array to be smaller SubField[] subFields = new SubField[count]; System.arraycopy(sfs, 0, subFields, 0, count); // calculate the commit points (i.e. last write to the field) HashSet fs = new HashSet(); for ( int cntr = subFields.length - 1; cntr >= 0; cntr-- ) { SubField subField = subFields[cntr]; if ( !fs.contains(subField.field) ) subField.commit = true; fs.add(subField.field); } return subFields; }
// in src/avrora/arch/avr/AVRInstrBuilder.java
public static int checkValue(int val, int low, int high) { if (val < low || val > high) { throw new Error(); } return val; }
// in src/avrora/arch/msp430/MSP430InstrBuilder.java
public static int checkValue(int val, int low, int high) { if ( val < low || val > high ) { throw new Error(); } return val; }
// in src/avrora/stack/Analyzer.java
public MutableState indirectCall(MutableState s, char addr_low, char addr_hi, char ext) { throw new Error("extended indirect calls not supported"); }
// in src/avrora/stack/Analyzer.java
public MutableState indirectJump(MutableState s, char addr_low, char addr_hi, char ext) { throw new Error("extended indirect jumps not supported"); }
// in src/cck/parser/SimpleCharStream.java
protected void ExpandBuff(boolean wrapAround) { char[] newbuffer = new char[bufsize + 2048]; int[] newbufline = new int[bufsize + 2048]; int[] newbufcolumn = new int[bufsize + 2048]; try { if (wrapAround) { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); bufcolumn = newbufcolumn; maxNextCharInd = bufpos += bufsize - tokenBegin; } else { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); bufcolumn = newbufcolumn; maxNextCharInd = bufpos -= tokenBegin; } } catch (Throwable t) { throw new Error(t.getMessage()); } bufsize += 2048; available = bufsize; tokenBegin = 0; }
// in src/cck/util/Util.java
public static void userError(String s) { throw new Error(s); }
// in src/cck/util/Util.java
public static void userError(String s, String p) { throw new Error(s, p); }
// in src/jintgen/isdl/parser/SimpleCharStream.java
protected void ExpandBuff(boolean wrapAround) { char[] newbuffer = new char[bufsize + 2048]; int[] newbufline = new int[bufsize + 2048]; int[] newbufcolumn = new int[bufsize + 2048]; try { if (wrapAround) { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); bufcolumn = newbufcolumn; maxNextCharInd = (bufpos += (bufsize - tokenBegin)); } else { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); bufcolumn = newbufcolumn; maxNextCharInd = (bufpos -= tokenBegin); } } catch (Throwable t) { throw new Error(t.getMessage()); } bufsize += 2048; available = bufsize; tokenBegin = 0; }
2
              
// in src/cck/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
// in src/jintgen/isdl/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
0
(Lib) NoSuchElementException 6
              
// in src/avrora/sim/mcu/MCUProperties.java
public int getPin(String n) { Integer i = (Integer)pinAssignments.get(n); if ( i == null ) throw new NoSuchElementException(StringUtil.quote(n)+" pin not found"); return i.intValue(); }
// in src/avrora/sim/mcu/MCUProperties.java
public int getInterrupt(String n) { Integer i = (Integer)interruptAssignments.get(n); if ( i == null ) throw new NoSuchElementException(StringUtil.quote(n)+" interrupt not found"); return i.intValue(); }
// in src/avrora/sim/mcu/RegisterLayout.java
public int getIOReg(String n) { RegisterInfo i = (RegisterInfo)ioregAssignments.get(n); if ( i == null ) throw new NoSuchElementException(StringUtil.quote(n)+" IO register not found"); return i.ior_num; }
// in src/avrora/sim/clock/ClockDomain.java
public Clock getClock(String name) { Clock clock = (Clock)clockMap.get(name); if ( clock == null ) throw new NoSuchElementException(StringUtil.quote(name)+" clock not found"); return clock; }
// in src/avrora/sim/Simulation.java
public Object next() { if ( cursor >= nodes.length ) throw new NoSuchElementException(); Object o = nodes[cursor]; cursor++; scan(); return o; }
// in src/cck/stat/Sequence.java
public int next() { if (frag == currentFrag) { // we are in the last fragment, did we run off the end? if (cursor >= offset) { throw new NoSuchElementException(); } } else { // we are in an old (complete) fragment if (cursor >= fragSize) { frag = (int[]) fiter.next(); cursor = 0; } } return frag[cursor++]; }
0 0
(Domain) TokenMgrError 6
              
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
public void SwitchTo(int lexState) { if (lexState >= 2 || lexState < 0) throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". LegacyState unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); else curLexState = lexState; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
public Token getNextToken() { Token specialToken = null; Token matchedToken; int curPos = 0; EOFLoop : while (true) { try { curChar = input_stream.BeginToken(); } catch (IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); return matchedToken; } jjimageLen = 0; while (true) { switch (curLexState) { case 0: try { input_stream.backup(0); while (curChar <= 32 && (0x100003600L & 1L << curChar) != 0L) curChar = input_stream.BeginToken(); } catch (IOException e1) { continue EOFLoop; } jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_0(); break; case 1: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_1(); if (jjmatchedPos == 0 && jjmatchedKind > 8) { jjmatchedKind = 8; } break; } if (jjmatchedKind != 0x7fffffff) { if (jjmatchedPos + 1 < curPos) input_stream.backup(curPos - jjmatchedPos - 1); if ((jjtoToken[jjmatchedKind >> 6] & 1L << (jjmatchedKind & 077)) != 0L) { matchedToken = jjFillToken(); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; return matchedToken; } else if ((jjtoSkip[jjmatchedKind >> 6] & 1L << (jjmatchedKind & 077)) != 0L) { if ((jjtoSpecial[jjmatchedKind >> 6] & 1L << (jjmatchedKind & 077)) == 0L) SkipLexicalActions(null); else { matchedToken = jjFillToken(); if (specialToken == null) specialToken = matchedToken; else { specialToken = specialToken.next = matchedToken; } SkipLexicalActions(matchedToken); } if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; continue EOFLoop; } jjimageLen += jjmatchedPos + 1; if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; curPos = 0; jjmatchedKind = 0x7fffffff; try { curChar = input_stream.readChar(); continue; } catch (IOException e1) { } } int error_line = input_stream.getEndLine(); int error_column = input_stream.getEndColumn(); String error_after = null; boolean EOFSeen = false; try { input_stream.readChar(); input_stream.backup(1); } catch (IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; } if (!EOFSeen) { input_stream.backup(1); error_after = curPos <= 1 ? "" : input_stream.GetImage(); } throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); } } }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
public void SwitchTo(int lexState) { if (lexState >= 2 || lexState < 0) throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". LegacyState unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); else curLexState = lexState; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
public Token getNextToken() { Token specialToken = null; Token matchedToken; int curPos = 0; EOFLoop : while (true) { try { curChar = input_stream.BeginToken(); } catch (IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); return matchedToken; } jjimageLen = 0; while (true) { switch (curLexState) { case 0: try { input_stream.backup(0); while (curChar <= 32 && (0x100003600L & 1L << curChar) != 0L) curChar = input_stream.BeginToken(); } catch (IOException e1) { continue EOFLoop; } jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_0(); break; case 1: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_1(); if (jjmatchedPos == 0 && jjmatchedKind > 8) { jjmatchedKind = 8; } break; } if (jjmatchedKind != 0x7fffffff) { if (jjmatchedPos + 1 < curPos) input_stream.backup(curPos - jjmatchedPos - 1); if ((jjtoToken[jjmatchedKind >> 6] & 1L << (jjmatchedKind & 077)) != 0L) { matchedToken = jjFillToken(); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; return matchedToken; } else if ((jjtoSkip[jjmatchedKind >> 6] & 1L << (jjmatchedKind & 077)) != 0L) { if ((jjtoSpecial[jjmatchedKind >> 6] & 1L << (jjmatchedKind & 077)) == 0L) SkipLexicalActions(null); else { matchedToken = jjFillToken(); if (specialToken == null) specialToken = matchedToken; else { specialToken = specialToken.next = matchedToken; } SkipLexicalActions(matchedToken); } if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; continue EOFLoop; } jjimageLen += jjmatchedPos + 1; if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; curPos = 0; jjmatchedKind = 0x7fffffff; try { curChar = input_stream.readChar(); continue; } catch (IOException e1) { } } int error_line = input_stream.getEndLine(); int error_column = input_stream.getEndColumn(); String error_after = null; boolean EOFSeen = false; try { input_stream.readChar(); input_stream.backup(1); } catch (IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; } if (!EOFSeen) { input_stream.backup(1); error_after = curPos <= 1 ? "" : input_stream.GetImage(); } throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); } } }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
public void SwitchTo(int lexState) { if (lexState >= 4 || lexState < 0) throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); else curLexState = lexState; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
public Token getNextToken() { Token specialToken = null; Token matchedToken; int curPos = 0; EOFLoop : while (true) { try { curChar = input_stream.BeginToken(); } catch (IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; return matchedToken; } image = null; jjimageLen = 0; while (true) { switch (curLexState) { case 0: try { input_stream.backup(0); while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L) curChar = input_stream.BeginToken(); } catch (IOException e1) { continue EOFLoop; } jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_0(); break; case 1: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_1(); if (jjmatchedPos == 0 && jjmatchedKind > 12) { jjmatchedKind = 12; } break; case 2: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_2(); if (jjmatchedPos == 0 && jjmatchedKind > 12) { jjmatchedKind = 12; } break; case 3: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_3(); if (jjmatchedPos == 0 && jjmatchedKind > 12) { jjmatchedKind = 12; } break; } if (jjmatchedKind != 0x7fffffff) { if (jjmatchedPos + 1 < curPos) input_stream.backup(curPos - jjmatchedPos - 1); if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; return matchedToken; } else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); if (specialToken == null) specialToken = matchedToken; else { matchedToken.specialToken = specialToken; specialToken = (specialToken.next = matchedToken); } SkipLexicalActions(matchedToken); } else SkipLexicalActions(null); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; continue EOFLoop; } MoreLexicalActions(); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; curPos = 0; jjmatchedKind = 0x7fffffff; try { curChar = input_stream.readChar(); continue; } catch (IOException e1) { } } int error_line = input_stream.getEndLine(); int error_column = input_stream.getEndColumn(); String error_after = null; boolean EOFSeen = false; try { input_stream.readChar(); input_stream.backup(1); } catch (IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; } if (!EOFSeen) { input_stream.backup(1); error_after = curPos <= 1 ? "" : input_stream.GetImage(); } throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); } } }
0 0
(Domain) AddressOutOfBoundsException 4
              
// in src/avrora/sim/Segment.java
public byte get(int address) { try { return direct_read(address); } catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); } }
// in src/avrora/sim/Segment.java
public void set(int address, byte val) { try { direct_write(address, val); } catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); } }
// in src/avrora/sim/CodeSegment.java
public LegacyInstr readInstr(int address) { try { return segment_instr[address].asInstr(); } catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); } }
// in src/avrora/sim/CodeSegment.java
public LegacyInstr getInstr(int address) { try { return segment_instr[address]; } catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); } }
4
              
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/CodeSegment.java
catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/CodeSegment.java
catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
0
(Domain) SourceError 4
              
// in src/cck/parser/ErrorReporter.java
public void error(String type, SourcePoint p, String report) { throw new SourceError(type, p, report, StringUtil.EMPTY_STRING_ARRAY); }
// in src/cck/parser/ErrorReporter.java
public void error(String type, SourcePoint p, String report, String p1) { String[] ps = {p1}; throw new SourceError(type, p, report, ps); }
// in src/cck/parser/ErrorReporter.java
public void error(String type, SourcePoint p, String report, String p1, String p2) { String[] ps = {p1, p2}; throw new SourceError(type, p, report, ps); }
// in src/cck/parser/ErrorReporter.java
public void error(String type, SourcePoint p, String report, String p1, String p2, String p3) { String[] ps = {p1, p2, p3}; throw new SourceError(type, p, report, ps); }
0 0
(Lib) IOException 3
              
// in src/cck/parser/SimpleCharStream.java
protected void FillBuff() throws IOException { if (maxNextCharInd == available) { if (available == bufsize) { if (tokenBegin > 2048) { bufpos = maxNextCharInd = 0; available = tokenBegin; } else if (tokenBegin < 0) bufpos = maxNextCharInd = 0; else ExpandBuff(false); } else if (available > tokenBegin) available = bufsize; else if (tokenBegin - available < 2048) ExpandBuff(true); else available = tokenBegin; } try { int i; if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1) { inputStream.close(); throw new IOException(); } else maxNextCharInd += i; } catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; } }
// in src/cck/text/SectionFile.java
private void readHeader() throws IOException { if (header_done) return; while (true) { String line = template.readLine(); if (line == null) throw new IOException("no section delimiter found"); super.write(line.getBytes()); super.write('\n'); if (line.equals(start_delimiter)) break; } header_done = true; }
// in src/jintgen/isdl/parser/SimpleCharStream.java
protected void FillBuff() throws IOException { if (maxNextCharInd == available) { if (available == bufsize) { if (tokenBegin > 2048) { bufpos = maxNextCharInd = 0; available = tokenBegin; } else if (tokenBegin < 0) bufpos = maxNextCharInd = 0; else ExpandBuff(false); } else if (available > tokenBegin) available = bufsize; else if ((tokenBegin - available) < 2048) ExpandBuff(true); else available = tokenBegin; } int i; try { if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1) { inputStream.close(); throw new IOException(); } else maxNextCharInd += i; } catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; } }
0 76
              
// in src/avrora/monitors/GDBServer.java
boolean executeCommand(String command) throws IOException { CharacterIterator i = new StringCharacterIterator(command); if ( i.current() == '+' ) i.next(); if ( !StringUtil.peekAndEat(i, '$') ) { commandError(); return false; } char c = i.current(); i.next(); switch ( c ) { case 'c': // CONTINUE WITH EXECUTION // TODO: implement continue at address sendPlus(); return true; case 'D': // DISCONNECT Terminal.println("GDBServer: disconnected"); sendPlus(); simulator.stop(); return true; case 'g': // READ REGISTERS readAllRegisters(); return false; case 'G': // WRITE REGISTERS // TODO: implement update of registers break; case 'H': // SET THREAD CONTEXT -- THERE IS ONLY ONE sendPacketOK("OK"); return false; case 'i': // STEP CYCLE isStepping=true; break; case 'k': // KILL Terminal.println("GDBServer: killed remotely"); sendPlus(); simulator.stop(); return true; case 'm': readMemory(i); return false; case 'M': // WRITE MEMORY // TODO: implement writes to memory break; case 'p': // READ SELECTED REGISTERS readOneRegister(i); return false; case 'P': // WRITE SELECTED REGISTERS // TODO: implement writes to selected registers break; case 'q': // QUERY A VARIABLE // TODO: implement queries to variables break; case 's': // STEP INSTRUCTION isStepping=true; sendPlus(); return true; case 'z': // REMOVE BREAKPOINT setBreakPoint(i, false); return false; case 'Z': // SET BREAKPOINT setBreakPoint(i, true); return false; case '?': // GET LAST SIGNAL sendPacketOK("S05"); return false; } // didn't understand the comand sendPacketOK(""); return false; }
// in src/avrora/monitors/GDBServer.java
private void sendPlus() throws IOException { output.write((byte)'+'); }
// in src/avrora/monitors/GDBServer.java
void commandError() throws IOException { output.write((byte)'-'); }
// in src/avrora/monitors/GDBServer.java
void setBreakPoint(CharacterIterator i, boolean on) throws IOException { // TODO: deal with length as well! char num = i.current(); i.next(); switch ( num ) { case '0': case '1': if ( !StringUtil.peekAndEat(i, ',') ) break; int addr = StringUtil.readHexValue(i, 4); if ( !StringUtil.peekAndEat(i, ',') ) break; int len = StringUtil.readHexValue(i, 4); for ( int cntr = addr; cntr < addr+len; cntr += 2 ) setBreakPoint(addr, on); sendPacketOK("OK"); return; case '2': // TODO: other breakpoint types? case '3': // TODO: other breakpoint types? default: } sendPacketOK(""); }
// in src/avrora/monitors/GDBServer.java
void readAllRegisters() throws IOException { StringBuffer buf = new StringBuffer(84); LegacyState s = (LegacyState)simulator.getState(); for ( int cntr = 0; cntr < 32; cntr++ ) { appendGPR(s, cntr, buf); } appendSREG(s, buf); appendSP(s, buf); appendPC(s, buf); sendPacketOK(buf.toString()); }
// in src/avrora/monitors/GDBServer.java
void readOneRegister(CharacterIterator i) throws IOException { StringBuffer buf = new StringBuffer(8); LegacyState s = (LegacyState)simulator.getState(); int num = StringUtil.readHexValue(i, 2); if ( num < 32 ) { // general purpose register appendGPR(s, num, buf); } else if ( num == 32 ) { // SREG appendSREG(s, buf); } else if ( num == 33 ) { // SP appendSP(s, buf); } else if ( num == 34 ) { // PC appendPC(s, buf); } else { // unknown register buf.append("ERR"); } sendPacketOK(buf.toString()); }
// in src/avrora/monitors/GDBServer.java
void readMemory(CharacterIterator i) throws IOException { // read the address in memory int addr = StringUtil.readHexValue(i, 8); // read the length if it exists int length = 1; if ( StringUtil.peekAndEat(i, ',') ) length = StringUtil.readHexValue(i, 8); LegacyState s = (LegacyState)simulator.getState(); StringBuffer buf = new StringBuffer(length*2); if ( (addr & MEMMASK) == MEMBEGIN ) { // reading from SRAM addr = addr & (~MEMMASK); for ( int cntr = 0; cntr < length; cntr++ ) { byte value = s.getDataByte(addr+cntr); buf.append(StringUtil.toLowHex(value & 0xff, 2)); } } else { // reading from program memory for ( int cntr = 0; cntr < length; cntr++ ) { byte value = s.getProgramByte(addr+cntr); buf.append(StringUtil.toLowHex(value & 0xff, 2)); } } sendPacketOK(buf.toString()); }
// in src/avrora/monitors/GDBServer.java
void sendPacketOK(String s) throws IOException { sendPlus(); sendPacket(s); }
// in src/avrora/monitors/GDBServer.java
void sendPacket(String packet) throws IOException { byte[] bytes = packet.getBytes(); int cksum = 0; int cntr = 0; while (cntr < bytes.length) { cksum += bytes[cntr++]; } String np = '$' +packet+ '#' +StringUtil.toLowHex(cksum & 0xff, 2); if (printer != null) { printer.println(" <-- "+np+""); } output.write(np.getBytes()); }
// in src/avrora/monitors/GDBServer.java
String readCommand() throws IOException { int i = input.read(); if ( i < 0 ) return null; StringBuffer buf = new StringBuffer(32); buf.append((char)i); while (true) { i = input.read(); if ( i < 0 ) return buf.toString(); buf.append((char)i); if ( i == '#') { int i2 = input.read(); int i3 = input.read(); if ( i2 >= 0 ) buf.append((char)i2); if ( i3 >= 0 ) buf.append((char)i3); return buf.toString(); } } }
// in src/avrora/Main.java
private static void loadUserDefaults() throws IOException { String hdir = System.getProperty("user.home"); if (hdir == null || "".equals(hdir)) return; File f = new File(hdir + "/.avrora"); if (f.exists()) { Properties defs = new Properties(); defs.load(new FileInputStream(f)); mainOptions.process(defs); } }
// in src/avrora/Main.java
private static void loadFile(String fname) throws IOException { checkFileExists(fname); File f = new File(fname); Properties defs = new Properties(); defs.load(new FileInputStream(f)); mainOptions.process(defs); }
// in src/avrora/actions/CFGAction.java
private void dumpDotCFG(ControlFlowGraph cfg) throws IOException { Printer p; if (FILE.isBlank()) p = Printer.STDOUT; else p = new Printer(new PrintStream(new FileOutputStream(FILE.get()))); p.startblock("digraph G"); if (COLOR_PROCEDURES.get() || GROUP_PROCEDURES.get() || COLLAPSE_PROCEDURES.get()) pmap = cfg.getProcedureMap(); dumpDotNodes(p); dumpDotEdges(p); p.endblock(); }
// in src/avrora/actions/DisassembleAction.java
private void disassembleFile(AbstractDisassembler da) throws IOException { String fname = FILE.get(); Main.checkFileExists(fname); FileInputStream fis = new FileInputStream(fname); byte[] buf = new byte[fis.available()]; fis.read(buf); for ( int cntr = 0; cntr < buf.length; ) { cntr += disassembleAndPrint(buf, cntr, da); } }
// in src/avrora/sim/platform/sensors/ReplaySensorData.java
private void getNextReading() throws IOException { int tt = st.nextToken(); if ( tt == StreamTokenizer.TT_EOF ) return; if ( tt != StreamTokenizer.TT_NUMBER ) throw Util.failure("sensor data format error: expected number as sensor reading"); currentReading = (int)st.nval & 0x3ff; }
// in src/avrora/sim/platform/sensors/ReplaySensorData.java
private void scheduleNextChange() throws IOException { int tt = st.nextToken(); if ( tt == StreamTokenizer.TT_EOF ) return; if ( tt != StreamTokenizer.TT_NUMBER ) throw Util.failure("sensor data format error: expected number as time value"); clock.insertEvent(change, (long)(st.nval * clock.getHZ())); }
// in src/avrora/sim/platform/SPIForwarder.java
private void receive(SPI.Frame frame) throws IOException { out.write(frame.data); }
// in src/avrora/sim/radio/noise.java
private void parse(BufferedReader f) throws IOException { String line; while ((line = f.readLine()) != null) { parseLine(line); } f.close(); }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
public StringBuffer cleanCode(String inFile) throws IOException { try { //Status.begin("Preprocessing"); StringBuffer out = new StringBuffer(200000); BufferedReader in = new BufferedReader(new FileReader(inFile)); cleanFile(in, out); //Status.success(); return out; } catch (IOException e) { // rethrow IO exceptions (e.g. file not found) //Status.error(e); throw e; } catch (Throwable e) { //Status.error(e); throw Util.unexpected(e); } }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
private void cleanFile(BufferedReader in, StringBuffer out) throws IOException { line_count = 0; String line = nextLine(in); //clean up first section line = readHeader(in, out, line); while (line != null) { String section = getSectionName(line); if (section != null) { // read the whole section line = readSection(in, out, section); } else { // ignore this line if it is between sections line = nextLine(in); } } }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
private String readHeader(BufferedReader in, StringBuffer out, String line) throws IOException { while (line != null) { if (line.indexOf("Disassembly of section") != -1) { break; } if (line.indexOf("main.exe") != -1) out.append("program \"main.exe\":\n\n"); Iterator i = sectlist.iterator(); while (i.hasNext()) { String s = (String)i.next(); if (line.indexOf(s) != -1) printSectionHeader(s, out, line); } line = nextLine(in); } return line; }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
private String readSection(BufferedReader in, StringBuffer out, String section) throws IOException { if (sections.contains(section)) return convertSection(in, out, section); else return ignoreSection(in, out, section); }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
private String ignoreSection(BufferedReader in, StringBuffer out, String section) throws IOException { append(out, "; section ", section, " removed"); String line = nextLine(in); while (line != null) { append(out, "; ", line, "\n"); if (getSectionName(line) != null) return line; line = nextLine(in); } return line; }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
private String convertSection(BufferedReader in, StringBuffer out, String section) throws IOException { // add the start of the section name append(out, "\nstart ", section, ":\n"); // read the next line String line = nextLine(in); while (line != null) { // beginning of new section if (getSectionName(line) != null) return line; // ignore "..." in output if (line.indexOf("...") != -1) { line = nextLine(in); out.append("; ..."); } if (line.indexOf("Address ") != -1) { line = line.substring(0, line.indexOf("Address ")); line += nextLine(in); } if (isLabel(line)) { out.append("label 0x"); StringTokenizer st = new StringTokenizer(line); out.append(st.nextToken()); String name = st.nextToken().replaceAll("[<,>]", "\""); append(out, " ", name, "\n"); } else { String tok; StringTokenizer st = new StringTokenizer(line); if (st.hasMoreTokens()) { tok = st.nextToken(); out.append(StringUtil.rightJustify("0x" + tok, 10)); while (st.hasMoreTokens()) { tok = st.nextToken(); if (tok.matches("\\p{XDigit}\\p{XDigit}")) append(out, " 0x", tok); else if (tok.charAt(0) == '<') append(out, "; ", tok); // workaround for objdump 2.16.1 bug else if (tok.startsWith("0x0x")) append(out, " ", tok.substring(2, tok.length())); else append(out, " ", tok); } out.append('\n'); } } line = nextLine(in); } return line; }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
private String nextLine(BufferedReader in) throws IOException { line_count++; return in.readLine(); }
// in src/avrora/syntax/elf/ELFParser.java
private void loadSymbolTables(Program p, RandomAccessFile fis) throws IOException { SourceMapping map = new SourceMapping(p); p.setSourceMapping(map); if (SYMBOLS.get()) { symbolTables = ELFLoader.readSymbolTables(fis, header, sht); Iterator i = symbolTables.iterator(); while (i.hasNext()) { ELFSymbolTable stab = (ELFSymbolTable)i.next(); addSymbols(map, stab, stab.getStringTable()); } } }
// in src/avrora/syntax/elf/ELFParser.java
private Program loadSections(RandomAccessFile fis) throws IOException { // load each section ELFDataInputStream is = new ELFDataInputStream(header, fis); Program p = createProgram(); for (int cntr = 0; cntr < pht.entries.length; cntr++) { ELFProgramHeaderTable.Entry32 e = pht.entries[cntr]; if (e.isLoadable() && e.p_filesz > 0) { fis.seek(e.p_offset); byte[] sect = is.read_section(e.p_offset, e.p_filesz); p.writeProgramBytes(sect, e.p_paddr); if (e.isExecutable()) disassembleSection(sect, e, p); } } return p; }
// in src/cck/parser/SimpleCharStream.java
protected void FillBuff() throws IOException { if (maxNextCharInd == available) { if (available == bufsize) { if (tokenBegin > 2048) { bufpos = maxNextCharInd = 0; available = tokenBegin; } else if (tokenBegin < 0) bufpos = maxNextCharInd = 0; else ExpandBuff(false); } else if (available > tokenBegin) available = bufsize; else if (tokenBegin - available < 2048) ExpandBuff(true); else available = tokenBegin; } try { int i; if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1) { inputStream.close(); throw new IOException(); } else maxNextCharInd += i; } catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; } }
// in src/cck/parser/SimpleCharStream.java
public char BeginToken() throws IOException { tokenBegin = -1; char c = readChar(); tokenBegin = bufpos; return c; }
// in src/cck/parser/SimpleCharStream.java
public char readChar() throws IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; return buffer[bufpos]; } if (++bufpos >= maxNextCharInd) FillBuff(); char c = buffer[bufpos]; UpdateLineColumn(c); return c; }
// in src/cck/elf/ELFHeader.java
public void read(RandomAccessFile fs) throws IOException, FormatError { // read the indentification string if ( fs.length() < EI_NIDENT ) throw new FormatError(); for ( int index = 0; index < EI_NIDENT; ) index += fs.read(e_ident, index, EI_NIDENT - index); checkIdent(); ELFDataInputStream is = new ELFDataInputStream(this, fs); e_type = is.read_Elf32_Half(); e_machine = is.read_Elf32_Half(); e_version = is.read_Elf32_Word(); e_entry = is.read_Elf32_Addr(); e_phoff = is.read_Elf32_Off(); e_shoff = is.read_Elf32_Off(); e_flags = is.read_Elf32_Word(); e_ehsize = is.read_Elf32_Half(); e_phentsize = is.read_Elf32_Half(); e_phnum = is.read_Elf32_Half(); e_shentsize = is.read_Elf32_Half(); e_shnum = is.read_Elf32_Half(); e_shstrndx = is.read_Elf32_Half(); }
// in src/cck/elf/ELFStringTable.java
public void read(RandomAccessFile f) throws IOException { if ( data.length == 0 ) return; f.seek(entry.sh_offset); for ( int read = 0; read < data.length; ) { read += f.read(data, read, data.length - read); } }
// in src/cck/elf/ELFLoader.java
public static ELFHeader readELFHeader(RandomAccessFile fis) throws IOException, ELFHeader.FormatError { ELFHeader header = new ELFHeader(); header.read(fis); return header; }
// in src/cck/elf/ELFLoader.java
public static ELFProgramHeaderTable readPHT(RandomAccessFile fis, ELFHeader header) throws IOException { ELFProgramHeaderTable pht = new ELFProgramHeaderTable(header); pht.read(fis); return pht; }
// in src/cck/elf/ELFLoader.java
public static ELFSectionHeaderTable readSHT(RandomAccessFile fis, ELFHeader header) throws IOException { ELFSectionHeaderTable sht = new ELFSectionHeaderTable(header); sht.read(fis); // read the ELF string table that contains the section names if ( header.e_shstrndx < sht.entries.length ) { ELFSectionHeaderTable.Entry32 e = sht.entries[header.e_shstrndx]; ELFStringTable srttab = new ELFStringTable(header, e); srttab.read(fis); sht.setStringTable(srttab); } return sht; }
// in src/cck/elf/ELFLoader.java
public static List readSymbolTables(RandomAccessFile fis, ELFHeader header, ELFSectionHeaderTable sht) throws IOException { List symbolTables = new LinkedList(); for (int cntr = 0; cntr < sht.entries.length; cntr++) { ELFSectionHeaderTable.Entry32 e1 = sht.entries[cntr]; if (e1.isSymbolTable()) { ELFSymbolTable stab = new ELFSymbolTable(header, e1); stab.read(fis); symbolTables.add(stab); ELFSectionHeaderTable.Entry32 strent = sht.entries[e1.sh_link]; if (strent.isStringTable()) { ELFStringTable str = new ELFStringTable(header, strent); str.read(fis); stab.setStringTable(str); } } } return symbolTables; }
// in src/cck/elf/ELFDataInputStream.java
public byte[] read_section(int off, int length) throws IOException { byte[] buffer = new byte[length]; file.seek(off); for ( int cntr = 0; cntr < length; ) { cntr += file.read(buffer, cntr, length - cntr); } return buffer; }
// in src/cck/elf/ELFDataInputStream.java
public byte read_Elf32_byte() throws IOException { return (byte)read_1(); }
// in src/cck/elf/ELFDataInputStream.java
public int read_Elf32_uchar() throws IOException { return read_1(); }
// in src/cck/elf/ELFDataInputStream.java
public int read_Elf32_Addr() throws IOException { return read_4(); }
// in src/cck/elf/ELFDataInputStream.java
public short read_Elf32_Half() throws IOException { return (short)read_2(); }
// in src/cck/elf/ELFDataInputStream.java
public int read_Elf32_Off() throws IOException { return read_4(); }
// in src/cck/elf/ELFDataInputStream.java
public int read_Elf32_SWord() throws IOException { return read_4(); }
// in src/cck/elf/ELFDataInputStream.java
public int read_Elf32_Word() throws IOException { return read_4(); }
// in src/cck/elf/ELFDataInputStream.java
private int read_1() throws IOException { return file.read() & 0xff; }
// in src/cck/elf/ELFDataInputStream.java
private int read_2() throws IOException { int b1 = read_1(); int b2 = read_1(); if ( bigEndian ) return asShort(b2, b1); return asShort(b1, b2); }
// in src/cck/elf/ELFDataInputStream.java
private int read_4() throws IOException { int b1 = read_1(); int b2 = read_1(); int b3 = read_1(); int b4 = read_1(); if ( bigEndian ) return asInt(b4, b3, b2, b1); return asInt(b1, b2, b3, b4); }
// in src/cck/elf/ELFProgramHeaderTable.java
public void read(RandomAccessFile fis) throws IOException { if ( entries.length == 0 ) return; // seek to the beginning of the table fis.seek(header.e_phoff); ELFDataInputStream is = new ELFDataInputStream(header, fis); // read each entry for ( int cntr = 0; cntr < entries.length; cntr++ ) { Entry32 e = new Entry32(); e.p_type = is.read_Elf32_Word(); e.p_offset = is.read_Elf32_Off(); e.p_vaddr = is.read_Elf32_Addr(); e.p_paddr = is.read_Elf32_Addr(); e.p_filesz = is.read_Elf32_Word(); e.p_memsz = is.read_Elf32_Word(); e.p_flags = is.read_Elf32_Word(); e.p_align = is.read_Elf32_Word(); entries[cntr] = e; // read the rest of the entry (padding) for ( int pad = 32; pad < header.e_phentsize; pad++) fis.read(); } }
// in src/cck/elf/ELFSymbolTable.java
public void read(RandomAccessFile f) throws IOException { // seek to the beginning of the section f.seek(entry.sh_offset); // create the elf data input stream ELFDataInputStream is = new ELFDataInputStream(header, f); // read each of the entries for ( int cntr = 0; cntr < entries.length; cntr++ ) { Entry e = new Entry(); e.st_name = is.read_Elf32_Word(); e.st_value = is.read_Elf32_Addr(); e.st_size = is.read_Elf32_Word(); e.st_info = is.read_Elf32_uchar(); e.st_other = is.read_Elf32_uchar(); e.st_shndx = is.read_Elf32_Half(); entries[cntr] = e; for ( int pad = 16; pad < entry.sh_entsize; pad++ ) f.read(); } }
// in src/cck/elf/ELFSectionHeaderTable.java
public void read(RandomAccessFile fis) throws IOException { if ( entries.length == 0 ) return; // seek to the beginning of the section header table fis.seek(header.e_shoff); ELFDataInputStream is = new ELFDataInputStream(header, fis); // load each of the section header entries for ( int cntr = 0; cntr < entries.length; cntr++ ) { Entry32 e = new Entry32(); e.sh_name = is.read_Elf32_Word(); e.sh_type = is.read_Elf32_Word(); e.sh_flags = is.read_Elf32_Word(); e.sh_addr = is.read_Elf32_Addr(); e.sh_offset = is.read_Elf32_Off(); e.sh_size = is.read_Elf32_Word(); e.sh_link = is.read_Elf32_Word(); e.sh_info = is.read_Elf32_Word(); e.sh_addralign = is.read_Elf32_Word(); e.sh_entsize = is.read_Elf32_Word(); entries[cntr] = e; for ( int pad = 40; pad < header.e_shentsize; pad++ ) fis.read(); } }
// in src/cck/util/Options.java
public void loadFile(String fname) throws IOException { //checkFileExists(fname); File f = new File(fname); Properties defs = new Properties(); defs.load(new FileInputStream(f)); process(defs); }
// in src/cck/text/SectionFile.java
public void write(byte[] b) throws IOException { readHeader(); super.write(b); }
// in src/cck/text/SectionFile.java
public void write(byte[] b, int off, int len) throws IOException { readHeader(); super.write(b, off, len); }
// in src/cck/text/SectionFile.java
public void write(int b) throws IOException { readHeader(); super.write(b); }
// in src/cck/text/SectionFile.java
public void writeLine(String s) throws IOException { readHeader(); super.write(s.getBytes()); super.write('\n'); }
// in src/cck/text/SectionFile.java
public void close() throws IOException { readHeader(); discardSection(); readFooter(); template.close(); super.close(); File old = new File(file_name); old.delete(); new File(file_name + ".new").renameTo(old); }
// in src/cck/text/SectionFile.java
private void readHeader() throws IOException { if (header_done) return; while (true) { String line = template.readLine(); if (line == null) throw new IOException("no section delimiter found"); super.write(line.getBytes()); super.write('\n'); if (line.equals(start_delimiter)) break; } header_done = true; }
// in src/cck/text/SectionFile.java
private void discardSection() throws IOException { while (true) { String line = template.readLine(); if (line == null) break; if (line.equals(end_delimiter)) { super.write(line.getBytes()); super.write('\n'); break; } } }
// in src/cck/text/SectionFile.java
private void readFooter() throws IOException { while (true) { String line = template.readLine(); if (line == null) break; super.write(line.getBytes()); super.write('\n'); } }
// in src/jintgen/isdl/parser/SimpleCharStream.java
protected void FillBuff() throws IOException { if (maxNextCharInd == available) { if (available == bufsize) { if (tokenBegin > 2048) { bufpos = maxNextCharInd = 0; available = tokenBegin; } else if (tokenBegin < 0) bufpos = maxNextCharInd = 0; else ExpandBuff(false); } else if (available > tokenBegin) available = bufsize; else if ((tokenBegin - available) < 2048) ExpandBuff(true); else available = tokenBegin; } int i; try { if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1) { inputStream.close(); throw new IOException(); } else maxNextCharInd += i; } catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; } }
// in src/jintgen/isdl/parser/SimpleCharStream.java
public char BeginToken() throws IOException { tokenBegin = -1; char c = readChar(); tokenBegin = bufpos; return c; }
// in src/jintgen/isdl/parser/SimpleCharStream.java
public char readChar() throws IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; return buffer[bufpos]; } if (++bufpos >= maxNextCharInd) FillBuff(); char c = buffer[bufpos]; UpdateLineColumn(c); return (c); }
// in src/jintgen/gen/InterpreterGenerator.java
public void generate() throws IOException { initStatics(); List<String> impl = new LinkedList<String>(); impl.add(tr("$visitor")); Printer printer = newAbstractClassPrinter("interpreter", null, tr("$state"), impl, tr("The <code>$interpreter</code> class contains the code for executing each of the " + "instructions for the \"$1\" architecture. It extends the $state class, which " + "is code written by the user that defines the state associated with the interpreter. ", arch.name)); setPrinter(printer); javaCodePrinter = new JavaCodePrinter(); startblock(tr("public $interpreter(avrora.sim.Simulator sim) ", arch.name)); println("super(sim);"); endblock(); println(""); generateUtilities(); generatePolyMethods(); for (SubroutineDecl d : arch.subroutines) visit(d); for (InstrDecl d : arch.instructions) visit(d); endblock(); close(); }
// in src/jintgen/gen/Generator.java
protected SectionFile createSectionFile(String fname, String sect) throws IOException { Main.checkFileExists(fname); return new SectionFile(fname, sect); }
// in src/jintgen/gen/Generator.java
protected Printer newClassPrinter(String name, List<String> imports, String sup, List<String> impl, String jdoc) throws IOException { return newJavaPrinter(name, imports, sup, "class", impl, jdoc); }
// in src/jintgen/gen/Generator.java
protected Printer newAbstractClassPrinter(String name, List<String> imports, String sup, List<String> impl, String jdoc) throws IOException { return newJavaPrinter(name, imports, sup, "abstract class", impl, jdoc); }
// in src/jintgen/gen/Generator.java
protected Printer newInterfacePrinter(String name, List<String> imports, String sup, String jdoc) throws IOException { return newJavaPrinter(name, imports, sup, "interface", null, jdoc); }
// in src/jintgen/gen/InstrIRGenerator.java
private void generateVisitor() throws IOException { setPrinter(newInterfacePrinter("visitor", null, null, tr("The <code>$visitor</code> interface allows user code that implements " + "the interface to easily dispatch on the type of an instruction without casting using " + "the visitor pattern."))); for (InstrDecl d : arch.instructions ) emitVisitMethod(d); p.endblock(); close(); }
// in src/jintgen/gen/InstrIRGenerator.java
private void generateInstrClasses() throws IOException { LinkedList<String> imports = new LinkedList<String>(); imports.add("avrora.arch.AbstractArchitecture"); imports.add("avrora.arch.AbstractInstr"); LinkedList<String> impl = new LinkedList<String>(); impl.add("AbstractInstr"); setPrinter(newAbstractClassPrinter("instr", imports, null, impl, tr("The <code>$instr</code> class is a container (almost a namespace) for " + "all of the instructions in this architecture. Each inner class represents an instruction " + "in the architecture and also extends the outer class."))); generateJavaDoc("The <code>accept()</code> method accepts an instruction visitor and " + "calls the appropriate <code>visit()</code> method for this instruction.\n" + "@param v the instruction visitor to accept"); println("public abstract void accept($visitor v);"); generateJavaDoc("The <code>accept()</code> method accepts an addressing mode visitor " + "and calls the appropriate <code>visit_*()</code> method for this instruction's addressing " + "mode.\n" + "@param v the addressing mode visitor to accept"); startblock("public void accept($addrvisitor v)"); println("// the default implementation of accept() is empty"); endblock(); generateJavaDoc("The <code>toString()</code> method converts this instruction to a string " + "representation. For instructions with operands, this method will render the operands " + "in the appropriate syntax as declared in the architecture description.\n" + "@return a string representation of this instruction"); startblock("public String toString()"); println("// the default implementation of toString() simply returns the name"); println("return name;"); endblock(); generateJavaDoc("The <code>name</code> field stores a reference to the name of the instruction as a " + "string."); println("public final String name;"); generateJavaDoc("The <code>size</code> field stores the size of the instruction in bytes."); println("public final int size;"); generateJavaDoc("The <code>getSize()</code> method returns the size of this instruction in bytes."); startblock("public int getSize()"); println("return size;"); endblock(); println(""); generateJavaDoc("The <code>getName()</code> method returns the name of this instruction."); startblock("public String getName()"); println("return name;"); endblock(); println(""); generateJavaDoc("The <code>getArchitecture()</code> method returns the architecture of this instruction."); startblock("public AbstractArchitecture getArchitecture()"); println("return null;"); endblock(); println(""); generateJavaDoc(tr("The default constructor for the <code>$instr</code> class accepts a " + "string name and a size for each instruction.\n" + "@param name the string name of the instruction\n" + "@param size the size of the instruction in bytes")); startblock("protected $instr(String name, int size)"); println("this.name = name;"); println("this.size = size;"); endblock(); println(""); generateSuperClasses(); for (InstrDecl d : arch.instructions) emitClass(d); endblock(); close(); }
// in src/jintgen/gen/InstrIRGenerator.java
private void generateEnumerations() throws IOException { setPrinter(newClassPrinter("symbol", hashMapImport, null, null, tr("The <code>$symbol</code> class represents a symbol (or an enumeration as " + "declared in the instruction set description) relevant to the instruction set architecture. " + "For example register names, status bit names, etc are given here. This class provides a " + "type-safe enumeration for such symbolic names."))); generateEnumHeader(); for ( EnumDecl d : arch.enums ) { generateEnumClass(d); } endblock(); close(); }
// in src/jintgen/gen/InstrIRGenerator.java
private void generateOperandClasses() throws IOException { setPrinter(newAbstractClassPrinter("operand", hashMapImport, null, null, tr("The <code>$operand</code> interface represents operands that are allowed to " + "instructions in this architecture. Inner classes of this interface enumerate the possible " + "operand types to instructions and their constructors allow for dynamic checking of " + "correctness constraints as expressed in the instruction set description."))); int cntr = 1; for ( OperandTypeDecl d : arch.operandTypes ) { println("public static final byte $1_val = $2;", d.name, cntr++); } generateJavaDoc("The <code>op_type</code> field stores a code that determines the type of " + "the operand. This code can be used to dispatch on the type of the operand by switching " + "on the code."); println("public final byte op_type;"); generateJavaDoc("The <code>accept()</code> method implements the visitor pattern for operand " + "types, allowing a user to double-dispatch on the type of an operand."); p.println(tr("public abstract void accept($opvisitor v);")); generateJavaDoc("The default constructor for the <code>$operand</code> class simply stores the " + "type of the operand in a final field."); startblock("protected $operand(byte t)"); println("op_type = t;"); endblock(); generateJavaDoc(tr("The <code>$operand.Int</code> class is the super class of operands that can " + "take on integer values. It implements rendering the operand as an integer literal.")); startblock("abstract static class Int extends $operand"); println("public final int value;"); startblock("Int(byte t, int val)"); println("super(t);"); println("this.value = val;"); endblock(); startblock("public String toString()"); println("return Integer.toString(value);"); endblock(); endblock(); println(""); generateJavaDoc(tr("The <code>$operand.Sym</code> class is the super class of operands that can " + "take on symbolic (enumerated) values. It implements rendering the operand as " + "the name of the corresponding enumeration type.")); startblock("abstract static class Sym extends $operand"); println("public final $symbol value;"); startblock("Sym(byte t, $symbol sym)"); println("super(t);"); println("if ( sym == null ) throw new Error();"); println("this.value = sym;"); endblock(); startblock("public String toString()"); println("return value.symbol;"); endblock(); endblock(); println(""); generateJavaDoc(tr("The <code>$operand.Addr</code> class is the super class of operands that represent " + "an address. It implements rendering the operand as a hexadecimal number.")); startblock("abstract static class Addr extends $operand"); println("public final int value;"); startblock("Addr(byte t, int addr)"); println("super(t);"); println("this.value = addr;"); endblock(); startblock("public String toString()"); println("String hs = Integer.toHexString(value);"); println("StringBuffer buf = new StringBuffer(\"0x\");"); println("for ( int cntr = hs.length(); cntr < 4; cntr++ ) buf.append('0');"); println("buf.append(hs);"); println("return buf.toString();"); endblock(); endblock(); println(""); generateJavaDoc(tr("The <code>$operand.Rel</code> class is the super class of operands that represent " + "an address that is computed relative to the program counter. It implements rendering " + "the operand as the PC plus an offset.")); startblock("abstract static class Rel extends $operand"); println("public final int value;"); println("public final int relative;"); startblock("Rel(byte t, int addr, int rel)"); println("super(t);"); println("this.value = addr;"); println("this.relative = rel;"); endblock(); startblock("public String toString()"); println("if ( relative >= 0 ) return \".+\"+relative;"); println("else return \".\"+relative;"); endblock(); endblock(); println(""); for ( OperandTypeDecl d : arch.operandTypes ) generateOperandType(d); endblock(); close(); // generate visitor class Printer vprinter = newInterfacePrinter("opvisitor", hashMapImport, null, tr("The <code>$opvisitor</code> interface allows clients to use the Visitor pattern to " + "resolve the types of operands to instructions.")); // generate the visit methods explicitly declared operand types for ( OperandTypeDecl d : arch.operandTypes ) vprinter.println(tr("public void visit($operand.$1 o);", d.name)); vprinter.endblock(); vprinter.close(); }
// in src/jintgen/gen/InstrIRGenerator.java
private void generateBuilder() throws IOException { setPrinter(newAbstractClassPrinter("builder", hashMapImport, null, null, null)); println("public abstract $instr build(int size, $addr am);"); println("static final HashMap builders = new HashMap();"); startblock("static $builder add(String name, $builder b)"); println("builders.put(name, b);"); println("return b;"); endblock(); for ( InstrDecl d : arch.instructions ) { startblock("public static class $1_builder extends $builder", d.innerClassName); startblock("public $instr build(int size, $addr am)"); if ( DGUtil.addrModeClassExists(d)) println("return new $instr.$1(size, ($addr.$2)am);", d.innerClassName, addrModeName(d)); else println("return new $instr.$1(size);", d.innerClassName); endblock(); endblock(); } for ( InstrDecl d : arch.instructions ) { println("public static final $builder $1 = add($2, new $1_builder());", d.innerClassName, d.name); } startblock("public static int checkValue(int val, int low, int high)"); startblock("if ( val < low || val > high )"); println("throw new Error();"); endblock(); println("return val;"); endblock(); endblock(); close(); }
// in src/jintgen/gen/InstrIRGenerator.java
void generateAddrModeClasses() throws IOException { setPrinter(newInterfacePrinter("addr", hashMapImport, null, tr("The <code>$addr</code> class represents an addressing mode for this architecture. An " + "addressing mode fixes the number and type of operands, the syntax, and the encoding format " + "of the instruction."))); println("public void accept($instr i, $addrvisitor v);"); for ( AddrModeSetDecl as : arch.addrSets ) { startblock("public interface $1 extends $addr", as.name); for ( AddrModeDecl.Operand o : as.unionOperands ) println("public $operand get_$1();", o.name); endblock(); } List<AddrModeDecl> list = new LinkedList<AddrModeDecl>(); for ( AddrModeDecl am : arch.addrModes ) list.add(am); for ( InstrDecl id : arch.instructions ) { // for each addressing mode declared locally if ( id.addrMode.localDecl != null && DGUtil.addrModeClassExists(id) ) list.add(id.addrMode.localDecl); } for ( AddrModeDecl am : list ) emitAddrMode(am); endblock(); close(); emitAddrModeVisitor(list); }
// in src/jintgen/gen/InstrIRGenerator.java
private void emitAddrModeVisitor(List<AddrModeDecl> list) throws IOException { setPrinter(newInterfacePrinter("addrvisitor", hashMapImport, null, tr("The <code>$addrvisitor</code> interface implements the visitor pattern for addressing modes."))); for ( AddrModeDecl am : list ) { print("public void visit_$1", javaName(am.name.image)); printParams(nameTypeList("$instr", "i", am.operands)); println(";"); } endblock(); close(); }
(Domain) InvalidInstruction 3
              
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyRegister getReg(LegacyRegister[] table, int index) throws InvalidInstruction { if ( index < 0 || index >= table.length ) { throw new InvalidInstruction(getWord(0), pc); } LegacyRegister reg = table[index]; if ( reg == null ) { throw new InvalidInstruction(getWord(0), pc); } return reg; }
// in src/avrora/arch/legacy/LegacyDisassembler.java
LegacyInstr decode_root(int word1) throws InvalidInstruction { LegacyInstr i = null; i = decode_root0(word1); if ( i != null ) return i; i = decode_root1(word1); if ( i != null ) return i; throw new InvalidInstruction(word1, pc); }
0 159
              
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyRegister getReg(LegacyRegister[] table, int index) throws InvalidInstruction { if ( index < 0 || index >= table.length ) { throw new InvalidInstruction(getWord(0), pc); } LegacyRegister reg = table[index]; if ( reg == null ) { throw new InvalidInstruction(getWord(0), pc); } return reg; }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BST_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00008) != 0x00000 ) { return null; } int rr = 0; int bit = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:12] -> // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.BST(pc, getReg(GPR_table, rr), bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BLD_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00008) != 0x00000 ) { return null; } int rr = 0; int bit = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:12] -> // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.BLD(pc, getReg(GPR_table, rr), bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_0(int word1) throws InvalidInstruction { // get value of bits logical[6:6] int value = (word1 >> 9) & 0x00001; switch ( value ) { case 0x00001: return decode_BST_0(word1); case 0x00000: return decode_BLD_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRPL_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRPL(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRGE_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRGE(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRTC_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRTC(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRNE_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRNE(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRVC_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRVC(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRID_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRID(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRHC_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRHC(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRCC_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRCC(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_1(int word1) throws InvalidInstruction { // get value of bits logical[13:15] int value = (word1) & 0x00007; switch ( value ) { case 0x00002: return decode_BRPL_0(word1); case 0x00004: return decode_BRGE_0(word1); case 0x00006: return decode_BRTC_0(word1); case 0x00001: return decode_BRNE_0(word1); case 0x00003: return decode_BRVC_0(word1); case 0x00007: return decode_BRID_0(word1); case 0x00005: return decode_BRHC_0(word1); case 0x00000: return decode_BRCC_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBRS_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00008) != 0x00000 ) { return null; } int rr = 0; int bit = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:12] -> // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.SBRS(pc, getReg(GPR_table, rr), bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBRC_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00008) != 0x00000 ) { return null; } int rr = 0; int bit = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:12] -> // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.SBRC(pc, getReg(GPR_table, rr), bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_2(int word1) throws InvalidInstruction { // get value of bits logical[6:6] int value = (word1 >> 9) & 0x00001; switch ( value ) { case 0x00001: return decode_SBRS_0(word1); case 0x00000: return decode_SBRC_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRMI_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRMI(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRLT_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRLT(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRTS_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRTS(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BREQ_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BREQ(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRVS_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRVS(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRIE_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRIE(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRHS_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRHS(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRCS_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRCS(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_3(int word1) throws InvalidInstruction { // get value of bits logical[13:15] int value = (word1) & 0x00007; switch ( value ) { case 0x00002: return decode_BRMI_0(word1); case 0x00004: return decode_BRLT_0(word1); case 0x00006: return decode_BRTS_0(word1); case 0x00001: return decode_BREQ_0(word1); case 0x00003: return decode_BRVS_0(word1); case 0x00007: return decode_BRIE_0(word1); case 0x00005: return decode_BRHS_0(word1); case 0x00000: return decode_BRCS_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_4(int word1) throws InvalidInstruction { // get value of bits logical[4:5] int value = (word1 >> 10) & 0x00003; switch ( value ) { case 0x00002: return decode_0(word1); case 0x00001: return decode_1(word1); case 0x00003: return decode_2(word1); case 0x00000: return decode_3(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBCI_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:3] -> // logical[4:7] -> imm[7:4] imm |= ((word1 >> 8) & 0x0000F) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.SBCI(pc, getReg(HGPR_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ST_1(int word1) throws InvalidInstruction { // this method decodes ST when ar == Y int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.ST(pc, LegacyRegister.Y, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ST_2(int word1) throws InvalidInstruction { // this method decodes ST when ar == Z int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.ST(pc, LegacyRegister.Z, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_5(int word1) throws InvalidInstruction { // get value of bits logical[12:15] int value = (word1) & 0x0000F; switch ( value ) { case 0x00008: return decode_ST_1(word1); case 0x00000: return decode_ST_2(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LD_1(int word1) throws InvalidInstruction { // this method decodes LD when ar == Y int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LD(pc, getReg(GPR_table, rd), LegacyRegister.Y); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LD_2(int word1) throws InvalidInstruction { // this method decodes LD when ar == Z int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LD(pc, getReg(GPR_table, rd), LegacyRegister.Z); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_6(int word1) throws InvalidInstruction { // get value of bits logical[12:15] int value = (word1) & 0x0000F; switch ( value ) { case 0x00008: return decode_LD_1(word1); case 0x00000: return decode_LD_2(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_7(int word1) throws InvalidInstruction { // get value of bits logical[4:6] int value = (word1 >> 9) & 0x00007; switch ( value ) { case 0x00001: return decode_5(word1); case 0x00000: return decode_6(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_OUT_0(int word1) throws InvalidInstruction { int ior = 0; int rr = 0; // logical[0:4] -> // logical[5:6] -> ior[5:4] ior |= ((word1 >> 9) & 0x00003) << 4; // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> ior[3:0] ior |= (word1 & 0x0000F); return new LegacyInstr.OUT(pc, ior, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_IN_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:4] -> // logical[5:6] -> imm[5:4] imm |= ((word1 >> 9) & 0x00003) << 4; // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.IN(pc, getReg(GPR_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_8(int word1) throws InvalidInstruction { // get value of bits logical[4:4] int value = (word1 >> 11) & 0x00001; switch ( value ) { case 0x00001: return decode_OUT_0(word1); case 0x00000: return decode_IN_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CPI_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:3] -> // logical[4:7] -> imm[7:4] imm |= ((word1 >> 8) & 0x0000F) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.CPI(pc, getReg(HGPR_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ANDI_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:3] -> // logical[4:7] -> imm[7:4] imm |= ((word1 >> 8) & 0x0000F) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.ANDI(pc, getReg(HGPR_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_RJMP_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:3] -> // logical[4:15] -> target[11:0] target |= (word1 & 0x00FFF); return new LegacyInstr.RJMP(pc, relative(target, 11)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_OR_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.OR(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_EOR_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.EOR(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_MOV_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.MOV(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_AND_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.AND(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_9(int word1) throws InvalidInstruction { // get value of bits logical[4:5] int value = (word1 >> 10) & 0x00003; switch ( value ) { case 0x00002: return decode_OR_0(word1); case 0x00001: return decode_EOR_0(word1); case 0x00003: return decode_MOV_0(word1); case 0x00000: return decode_AND_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_RCALL_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:3] -> // logical[4:15] -> target[11:0] target |= (word1 & 0x00FFF); return new LegacyInstr.RCALL(pc, relative(target, 11)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBI_0(int word1) throws InvalidInstruction { int ior = 0; int bit = 0; // logical[0:7] -> // logical[8:12] -> ior[4:0] ior |= ((word1 >> 3) & 0x0001F); // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.SBI(pc, ior, bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBIC_0(int word1) throws InvalidInstruction { int ior = 0; int bit = 0; // logical[0:7] -> // logical[8:12] -> ior[4:0] ior |= ((word1 >> 3) & 0x0001F); // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.SBIC(pc, ior, bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBIS_0(int word1) throws InvalidInstruction { int ior = 0; int bit = 0; // logical[0:7] -> // logical[8:12] -> ior[4:0] ior |= ((word1 >> 3) & 0x0001F); // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.SBIS(pc, ior, bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CBI_0(int word1) throws InvalidInstruction { int ior = 0; int bit = 0; // logical[0:7] -> // logical[8:12] -> ior[4:0] ior |= ((word1 >> 3) & 0x0001F); // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.CBI(pc, ior, bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_10(int word1) throws InvalidInstruction { // get value of bits logical[6:7] int value = (word1 >> 8) & 0x00003; switch ( value ) { case 0x00002: return decode_SBI_0(word1); case 0x00001: return decode_SBIC_0(word1); case 0x00003: return decode_SBIS_0(word1); case 0x00000: return decode_CBI_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBIW_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:7] -> // logical[8:9] -> imm[5:4] imm |= ((word1 >> 6) & 0x00003) << 4; // logical[10:11] -> rd[1:0] rd |= ((word1 >> 4) & 0x00003); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.SBIW(pc, getReg(RDL_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ADIW_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:7] -> // logical[8:9] -> imm[5:4] imm |= ((word1 >> 6) & 0x00003) << 4; // logical[10:11] -> rd[1:0] rd |= ((word1 >> 4) & 0x00003); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.ADIW(pc, getReg(RDL_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_11(int word1) throws InvalidInstruction { // get value of bits logical[7:7] int value = (word1 >> 8) & 0x00001; switch ( value ) { case 0x00001: return decode_SBIW_0(word1); case 0x00000: return decode_ADIW_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ASR_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00001 ) { return null; } int rd = 0; // logical[0:6] -> // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> return new LegacyInstr.ASR(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLI_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLI(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SES_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SES(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SPM_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.SPM(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLC_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLC(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_WDR_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.WDR(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLV_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLV(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ICALL_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.ICALL(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_RET_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.RET(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_12(int word1) throws InvalidInstruction { // get value of bits logical[15:15] int value = (word1) & 0x00001; switch ( value ) { case 0x00001: return decode_ICALL_0(word1); case 0x00000: return decode_RET_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SEV_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SEV(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SEI_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SEI(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLS_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLS(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_EICALL_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.EICALL(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_RETI_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.RETI(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_13(int word1) throws InvalidInstruction { // get value of bits logical[15:15] int value = (word1) & 0x00001; switch ( value ) { case 0x00001: return decode_EICALL_0(word1); case 0x00000: return decode_RETI_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SEN_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SEN(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLH_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLH(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLZ_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLZ(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LPM_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.LPM(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SET_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SET(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_EIJMP_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.EIJMP(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SEZ_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SEZ(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_14(int word1) throws InvalidInstruction { // get value of bits logical[15:15] int value = (word1) & 0x00001; switch ( value ) { case 0x00001: return decode_EIJMP_0(word1); case 0x00000: return decode_SEZ_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ELPM_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.ELPM(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLT_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLT(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BREAK_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.BREAK(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SLEEP_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.SLEEP(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLN_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLN(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SEH_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SEH(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_IJMP_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.IJMP(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SEC_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SEC(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_15(int word1) throws InvalidInstruction { // get value of bits logical[15:15] int value = (word1) & 0x00001; switch ( value ) { case 0x00001: return decode_IJMP_0(word1); case 0x00000: return decode_SEC_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_16(int word1) throws InvalidInstruction { // get value of bits logical[7:11] int value = (word1 >> 4) & 0x0001F; switch ( value ) { case 0x0000F: return decode_CLI_0(word1); case 0x00004: return decode_SES_0(word1); case 0x0001E: return decode_SPM_0(word1); case 0x00008: return decode_CLC_0(word1); case 0x0001A: return decode_WDR_0(word1); case 0x0000B: return decode_CLV_0(word1); case 0x00010: return decode_12(word1); case 0x00003: return decode_SEV_0(word1); case 0x00007: return decode_SEI_0(word1); case 0x0000C: return decode_CLS_0(word1); case 0x00011: return decode_13(word1); case 0x00002: return decode_SEN_0(word1); case 0x0000D: return decode_CLH_0(word1); case 0x00009: return decode_CLZ_0(word1); case 0x0001C: return decode_LPM_0(word1); case 0x00006: return decode_SET_0(word1); case 0x00001: return decode_14(word1); case 0x0001D: return decode_ELPM_0(word1); case 0x0000E: return decode_CLT_0(word1); case 0x00019: return decode_BREAK_0(word1); case 0x00018: return decode_SLEEP_0(word1); case 0x0000A: return decode_CLN_0(word1); case 0x00005: return decode_SEH_0(word1); case 0x00000: return decode_15(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_JMP_0(int word1) throws InvalidInstruction { int word2 = getWord(1); int target = 0; // logical[0:6] -> // logical[7:11] -> target[21:17] target |= ((word1 >> 4) & 0x0001F) << 17; // logical[12:14] -> // logical[15:15] -> target[16:16] target |= (word1 & 0x00001) << 16; // logical[16:31] -> target[15:0] target |= (word2 & 0x0FFFF); return new LegacyInstr.JMP(pc, target); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_INC_0(int word1) throws InvalidInstruction { int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.INC(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SWAP_0(int word1) throws InvalidInstruction { int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.SWAP(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_17(int word1) throws InvalidInstruction { // get value of bits logical[15:15] int value = (word1) & 0x00001; switch ( value ) { case 0x00001: return decode_INC_0(word1); case 0x00000: return decode_SWAP_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ROR_0(int word1) throws InvalidInstruction { int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.ROR(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LSR_0(int word1) throws InvalidInstruction { int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LSR(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_18(int word1) throws InvalidInstruction { // get value of bits logical[15:15] int value = (word1) & 0x00001; switch ( value ) { case 0x00001: return decode_ROR_0(word1); case 0x00000: return decode_LSR_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CALL_0(int word1) throws InvalidInstruction { int word2 = getWord(1); int target = 0; // logical[0:6] -> // logical[7:11] -> target[21:17] target |= ((word1 >> 4) & 0x0001F) << 17; // logical[12:14] -> // logical[15:15] -> target[16:16] target |= (word1 & 0x00001) << 16; // logical[16:31] -> target[15:0] target |= (word2 & 0x0FFFF); return new LegacyInstr.CALL(pc, target); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_DEC_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.DEC(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_NEG_0(int word1) throws InvalidInstruction { int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.NEG(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_COM_0(int word1) throws InvalidInstruction { int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.COM(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_19(int word1) throws InvalidInstruction { // get value of bits logical[15:15] int value = (word1) & 0x00001; switch ( value ) { case 0x00001: return decode_NEG_0(word1); case 0x00000: return decode_COM_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_20(int word1) throws InvalidInstruction { // get value of bits logical[12:14] int value = (word1 >> 1) & 0x00007; switch ( value ) { case 0x00002: return decode_ASR_0(word1); case 0x00004: return decode_16(word1); case 0x00006: return decode_JMP_0(word1); case 0x00001: return decode_17(word1); case 0x00003: return decode_18(word1); case 0x00007: return decode_CALL_0(word1); case 0x00005: return decode_DEC_0(word1); case 0x00000: return decode_19(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_21(int word1) throws InvalidInstruction { // get value of bits logical[6:6] int value = (word1 >> 9) & 0x00001; switch ( value ) { case 0x00001: return decode_11(word1); case 0x00000: return decode_20(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_MUL_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.MUL(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STPD_2(int word1) throws InvalidInstruction { // this method decodes STPD when ar == Z int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.STPD(pc, LegacyRegister.Z, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_PUSH_0(int word1) throws InvalidInstruction { int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.PUSH(pc, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STPI_0(int word1) throws InvalidInstruction { // this method decodes STPI when ar == X int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.STPI(pc, LegacyRegister.X, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STPI_1(int word1) throws InvalidInstruction { // this method decodes STPI when ar == Y int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.STPI(pc, LegacyRegister.Y, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STPI_2(int word1) throws InvalidInstruction { // this method decodes STPI when ar == Z int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.STPI(pc, LegacyRegister.Z, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STPD_0(int word1) throws InvalidInstruction { // this method decodes STPD when ar == X int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.STPD(pc, LegacyRegister.X, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STPD_1(int word1) throws InvalidInstruction { // this method decodes STPD when ar == Y int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.STPD(pc, LegacyRegister.Y, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ST_0(int word1) throws InvalidInstruction { // this method decodes ST when ar == X int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.ST(pc, LegacyRegister.X, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STS_0(int word1) throws InvalidInstruction { int word2 = getWord(1); int addr = 0; int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> // logical[16:31] -> addr[15:0] addr |= (word2 & 0x0FFFF); return new LegacyInstr.STS(pc, addr, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_22(int word1) throws InvalidInstruction { // get value of bits logical[12:15] int value = (word1) & 0x0000F; switch ( value ) { case 0x00002: return decode_STPD_2(word1); case 0x0000F: return decode_PUSH_0(word1); case 0x0000D: return decode_STPI_0(word1); case 0x00009: return decode_STPI_1(word1); case 0x00001: return decode_STPI_2(word1); case 0x0000E: return decode_STPD_0(word1); case 0x0000A: return decode_STPD_1(word1); case 0x0000C: return decode_ST_0(word1); case 0x00000: return decode_STS_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_POP_0(int word1) throws InvalidInstruction { int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.POP(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LPMD_0(int word1) throws InvalidInstruction { int rd = 0; int z = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LPMD(pc, getReg(GPR_table, rd), getReg(Z_table, z)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ELPMPI_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.ELPMPI(pc, getReg(GPR_table, rd), getReg(Z_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LD_0(int word1) throws InvalidInstruction { // this method decodes LD when ar == X int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LD(pc, getReg(GPR_table, rd), LegacyRegister.X); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDPD_2(int word1) throws InvalidInstruction { // this method decodes LDPD when ar == Z int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LDPD(pc, getReg(GPR_table, rd), LegacyRegister.Z); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDPI_0(int word1) throws InvalidInstruction { // this method decodes LDPI when ar == X int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LDPI(pc, getReg(GPR_table, rd), LegacyRegister.X); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDPI_1(int word1) throws InvalidInstruction { // this method decodes LDPI when ar == Y int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LDPI(pc, getReg(GPR_table, rd), LegacyRegister.Y); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ELPMD_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.ELPMD(pc, getReg(GPR_table, rd), getReg(Z_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDPI_2(int word1) throws InvalidInstruction { // this method decodes LDPI when ar == Z int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LDPI(pc, getReg(GPR_table, rd), LegacyRegister.Z); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDPD_0(int word1) throws InvalidInstruction { // this method decodes LDPD when ar == X int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LDPD(pc, getReg(GPR_table, rd), LegacyRegister.X); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDPD_1(int word1) throws InvalidInstruction { // this method decodes LDPD when ar == Y int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LDPD(pc, getReg(GPR_table, rd), LegacyRegister.Y); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LPMPI_0(int word1) throws InvalidInstruction { int rd = 0; int z = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LPMPI(pc, getReg(GPR_table, rd), getReg(Z_table, z)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDS_0(int word1) throws InvalidInstruction { int word2 = getWord(1); int rd = 0; int addr = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> // logical[16:31] -> addr[15:0] addr |= (word2 & 0x0FFFF); return new LegacyInstr.LDS(pc, getReg(GPR_table, rd), addr); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_23(int word1) throws InvalidInstruction { // get value of bits logical[12:15] int value = (word1) & 0x0000F; switch ( value ) { case 0x0000F: return decode_POP_0(word1); case 0x00004: return decode_LPMD_0(word1); case 0x00007: return decode_ELPMPI_0(word1); case 0x0000C: return decode_LD_0(word1); case 0x00002: return decode_LDPD_2(word1); case 0x0000D: return decode_LDPI_0(word1); case 0x00009: return decode_LDPI_1(word1); case 0x00006: return decode_ELPMD_0(word1); case 0x00001: return decode_LDPI_2(word1); case 0x0000E: return decode_LDPD_0(word1); case 0x0000A: return decode_LDPD_1(word1); case 0x00005: return decode_LPMPI_0(word1); case 0x00000: return decode_LDS_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_24(int word1) throws InvalidInstruction { // get value of bits logical[6:6] int value = (word1 >> 9) & 0x00001; switch ( value ) { case 0x00001: return decode_22(word1); case 0x00000: return decode_23(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_25(int word1) throws InvalidInstruction { // get value of bits logical[4:5] int value = (word1 >> 10) & 0x00003; switch ( value ) { case 0x00002: return decode_10(word1); case 0x00001: return decode_21(word1); case 0x00003: return decode_MUL_0(word1); case 0x00000: return decode_24(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ORI_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:3] -> // logical[4:7] -> imm[7:4] imm |= ((word1 >> 8) & 0x0000F) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.ORI(pc, getReg(HGPR_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SUB_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.SUB(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CP_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.CP(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ADC_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.ADC(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CPSE_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.CPSE(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_26(int word1) throws InvalidInstruction { // get value of bits logical[4:5] int value = (word1 >> 10) & 0x00003; switch ( value ) { case 0x00002: return decode_SUB_0(word1); case 0x00001: return decode_CP_0(word1); case 0x00003: return decode_ADC_0(word1); case 0x00000: return decode_CPSE_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDI_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:3] -> // logical[4:7] -> imm[7:4] imm |= ((word1 >> 8) & 0x0000F) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.LDI(pc, getReg(HGPR_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SUBI_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:3] -> // logical[4:7] -> imm[7:4] imm |= ((word1 >> 8) & 0x0000F) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.SUBI(pc, getReg(HGPR_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBC_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.SBC(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CPC_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.CPC(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ADD_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.ADD(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_MULS_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:7] -> // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.MULS(pc, getReg(HGPR_table, rd), getReg(HGPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_MOVW_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:7] -> // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.MOVW(pc, getReg(EGPR_table, rd), getReg(EGPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_FMULSU_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> rd[2:0] rd |= ((word1 >> 4) & 0x00007); // logical[12:12] -> // logical[13:15] -> rr[2:0] rr |= (word1 & 0x00007); return new LegacyInstr.FMULSU(pc, getReg(MGPR_table, rd), getReg(MGPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_FMULS_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> rd[2:0] rd |= ((word1 >> 4) & 0x00007); // logical[12:12] -> // logical[13:15] -> rr[2:0] rr |= (word1 & 0x00007); return new LegacyInstr.FMULS(pc, getReg(MGPR_table, rd), getReg(MGPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_27(int word1) throws InvalidInstruction { // get value of bits logical[12:12] int value = (word1 >> 3) & 0x00001; switch ( value ) { case 0x00001: return decode_FMULSU_0(word1); case 0x00000: return decode_FMULS_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_FMUL_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> rd[2:0] rd |= ((word1 >> 4) & 0x00007); // logical[12:12] -> // logical[13:15] -> rr[2:0] rr |= (word1 & 0x00007); return new LegacyInstr.FMUL(pc, getReg(MGPR_table, rd), getReg(MGPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_MULSU_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> rd[2:0] rd |= ((word1 >> 4) & 0x00007); // logical[12:12] -> // logical[13:15] -> rr[2:0] rr |= (word1 & 0x00007); return new LegacyInstr.MULSU(pc, getReg(MGPR_table, rd), getReg(MGPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_28(int word1) throws InvalidInstruction { // get value of bits logical[12:12] int value = (word1 >> 3) & 0x00001; switch ( value ) { case 0x00001: return decode_FMUL_0(word1); case 0x00000: return decode_MULSU_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_29(int word1) throws InvalidInstruction { // get value of bits logical[8:8] int value = (word1 >> 7) & 0x00001; switch ( value ) { case 0x00001: return decode_27(word1); case 0x00000: return decode_28(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_NOP_0(int word1) throws InvalidInstruction { if ( (word1 & 0x000FF) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.NOP(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_30(int word1) throws InvalidInstruction { // get value of bits logical[6:7] int value = (word1 >> 8) & 0x00003; switch ( value ) { case 0x00002: return decode_MULS_0(word1); case 0x00001: return decode_MOVW_0(word1); case 0x00003: return decode_29(word1); case 0x00000: return decode_NOP_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_31(int word1) throws InvalidInstruction { // get value of bits logical[4:5] int value = (word1 >> 10) & 0x00003; switch ( value ) { case 0x00002: return decode_SBC_0(word1); case 0x00001: return decode_CPC_0(word1); case 0x00003: return decode_ADD_0(word1); case 0x00000: return decode_30(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_root0(int word1) throws InvalidInstruction { // get value of bits logical[0:3] int value = (word1 >> 12) & 0x0000F; switch ( value ) { case 0x0000F: return decode_4(word1); case 0x00004: return decode_SBCI_0(word1); case 0x00008: return decode_7(word1); case 0x0000B: return decode_8(word1); case 0x00003: return decode_CPI_0(word1); case 0x00007: return decode_ANDI_0(word1); case 0x0000C: return decode_RJMP_0(word1); case 0x00002: return decode_9(word1); case 0x0000D: return decode_RCALL_0(word1); case 0x00009: return decode_25(word1); case 0x00006: return decode_ORI_0(word1); case 0x00001: return decode_26(word1); case 0x0000E: return decode_LDI_0(word1); case 0x00005: return decode_SUBI_0(word1); case 0x00000: return decode_31(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STD_0(int word1) throws InvalidInstruction { int ar = 0; int imm = 0; int rr = 0; // logical[0:1] -> // logical[2:2] -> imm[5] imm = Arithmetic.setBit(imm, 5, Arithmetic.getBit(word1, 13)); // logical[3:3] -> // logical[4:5] -> imm[4:3] imm |= ((word1 >> 10) & 0x00003) << 3; // logical[6:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:12] -> ar[0] ar = Arithmetic.setBit(ar, 0, Arithmetic.getBit(word1, 3)); // logical[13:15] -> imm[2:0] imm |= (word1 & 0x00007); return new LegacyInstr.STD(pc, getReg(YZ_table, ar), imm, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDD_0(int word1) throws InvalidInstruction { int rd = 0; int ar = 0; int imm = 0; // logical[0:1] -> // logical[2:2] -> imm[5] imm = Arithmetic.setBit(imm, 5, Arithmetic.getBit(word1, 13)); // logical[3:3] -> // logical[4:5] -> imm[4:3] imm |= ((word1 >> 10) & 0x00003) << 3; // logical[6:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:12] -> ar[0] ar = Arithmetic.setBit(ar, 0, Arithmetic.getBit(word1, 3)); // logical[13:15] -> imm[2:0] imm |= (word1 & 0x00007); return new LegacyInstr.LDD(pc, getReg(GPR_table, rd), getReg(YZ_table, ar), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_32(int word1) throws InvalidInstruction { // get value of bits logical[6:6] int value = (word1 >> 9) & 0x00001; switch ( value ) { case 0x00001: return decode_STD_0(word1); case 0x00000: return decode_LDD_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_33(int word1) throws InvalidInstruction { // get value of bits logical[3:3] int value = (word1 >> 12) & 0x00001; switch ( value ) { case 0x00000: return decode_32(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_root1(int word1) throws InvalidInstruction { // get value of bits logical[0:1] int value = (word1 >> 14) & 0x00003; switch ( value ) { case 0x00002: return decode_33(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
LegacyInstr decode_root(int word1) throws InvalidInstruction { LegacyInstr i = null; i = decode_root0(word1); if ( i != null ) return i; i = decode_root1(word1); if ( i != null ) return i; throw new InvalidInstruction(word1, pc); }
(Domain) FormatError 2
              
// in src/cck/elf/ELFHeader.java
public void read(RandomAccessFile fs) throws IOException, FormatError { // read the indentification string if ( fs.length() < EI_NIDENT ) throw new FormatError(); for ( int index = 0; index < EI_NIDENT; ) index += fs.read(e_ident, index, EI_NIDENT - index); checkIdent(); ELFDataInputStream is = new ELFDataInputStream(this, fs); e_type = is.read_Elf32_Half(); e_machine = is.read_Elf32_Half(); e_version = is.read_Elf32_Word(); e_entry = is.read_Elf32_Addr(); e_phoff = is.read_Elf32_Off(); e_shoff = is.read_Elf32_Off(); e_flags = is.read_Elf32_Word(); e_ehsize = is.read_Elf32_Half(); e_phentsize = is.read_Elf32_Half(); e_phnum = is.read_Elf32_Half(); e_shentsize = is.read_Elf32_Half(); e_shnum = is.read_Elf32_Half(); e_shstrndx = is.read_Elf32_Half(); }
// in src/cck/elf/ELFHeader.java
private void checkIndentByte(int ind, int val) throws FormatError { if ( e_ident[ind] != val ) throw new FormatError(); }
0 4
              
// in src/cck/elf/ELFHeader.java
public void read(RandomAccessFile fs) throws IOException, FormatError { // read the indentification string if ( fs.length() < EI_NIDENT ) throw new FormatError(); for ( int index = 0; index < EI_NIDENT; ) index += fs.read(e_ident, index, EI_NIDENT - index); checkIdent(); ELFDataInputStream is = new ELFDataInputStream(this, fs); e_type = is.read_Elf32_Half(); e_machine = is.read_Elf32_Half(); e_version = is.read_Elf32_Word(); e_entry = is.read_Elf32_Addr(); e_phoff = is.read_Elf32_Off(); e_shoff = is.read_Elf32_Off(); e_flags = is.read_Elf32_Word(); e_ehsize = is.read_Elf32_Half(); e_phentsize = is.read_Elf32_Half(); e_phnum = is.read_Elf32_Half(); e_shentsize = is.read_Elf32_Half(); e_shnum = is.read_Elf32_Half(); e_shstrndx = is.read_Elf32_Half(); }
// in src/cck/elf/ELFHeader.java
private void checkIdent() throws FormatError { checkIndentByte(0, 0x7f); checkIndentByte(1, 'E'); checkIndentByte(2, 'L'); checkIndentByte(3, 'F'); bigEndian = isBigEndian(); }
// in src/cck/elf/ELFHeader.java
private void checkIndentByte(int ind, int val) throws FormatError { if ( e_ident[ind] != val ) throw new FormatError(); }
// in src/cck/elf/ELFLoader.java
public static ELFHeader readELFHeader(RandomAccessFile fis) throws IOException, ELFHeader.FormatError { ELFHeader header = new ELFHeader(); header.read(fis); return header; }
(Domain) ImmediateRequired 2
              
// in src/avrora/arch/legacy/LegacyInstr.java
private static int IMM(LegacyOperand o) { LegacyOperand.Constant c = o.asConstant(); if (c == null) throw new ImmediateRequired(o); return c.getValue(); }
// in src/avrora/arch/legacy/LegacyInstr.java
private static int WORD(LegacyOperand o) { LegacyOperand.Constant c = o.asConstant(); if (c == null) throw new ImmediateRequired(o); return c.getValueAsWord(); }
0 0
(Lib) RuntimeException 2
              
// in src/jintgen/isdl/parser/ISDLParser.java
public void ReInit(InputStream stream, String encoding) { try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source.ReInit(jj_input_stream); token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 66; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); }
2
              
// in src/jintgen/isdl/parser/ISDLParser.java
catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }
0
(Domain) InternalError 1
              
// in src/cck/util/Util.java
public static void enforce(boolean b, String s) { if ( !b ) throw new InternalError(s); }
0 0
(Domain) InvalidImmediate 1
              
// in src/avrora/arch/legacy/LegacyInstr.java
private static int checkImm(int num, int val, int low, int high) { if (val < low || val > high) throw new InvalidImmediate(num, val, low, high); return val; }
0 0
(Domain) InvalidRegister 1
              
// in src/avrora/arch/legacy/LegacyInstr.java
private static LegacyRegister checkReg(int num, LegacyRegister reg, LegacyRegister.Set set) { if (set.contains(reg)) return reg; throw new InvalidRegister(num, reg, set); }
0 0
(Domain) RegisterRequired 1
              
// in src/avrora/arch/legacy/LegacyInstr.java
private static LegacyRegister REG(LegacyOperand o) { LegacyOperand.Register r = o.asRegister(); if (r == null) throw new RegisterRequired(o); return r.getRegister(); }
0 0
(Domain) UnboundedStackException 1
              
// in src/avrora/stack/Analyzer.java
protected Path findMaximalPath(StateCache.State s, HashMap stack, int depth) throws UnboundedStackException { // record this node and the stack depth at which we first encounter it stack.put(s, new Integer(depth)); int maxdepth = 0; int minlength = Integer.MAX_VALUE; Path maxtail = null; StateTransitionGraph.Edge maxedge = null; for (StateTransitionGraph.Edge edge = s.info.forwardEdges; edge != null; edge = edge.forwardLink) { StateCache.State t = edge.target; if (stack.containsKey(t)) { // cycle detected. check that the depth when reentering is the same int prevdepth = ((Integer)stack.get(t)).intValue(); if (depth + edge.weight != prevdepth) { stack.remove(s); throw new UnboundedStackException(new Path(depth + edge.weight, edge, null)); } } else { Path tail; if (edge.target.mark instanceof Path) { // node has already been visited and marked with the // maximum amount of stack depth that it can add. tail = ((Path)edge.target.mark); } else { // node has not been seen before, traverse it try { tail = findMaximalPath(edge.target, stack, depth + edge.weight); } catch (UnboundedStackException e) { // this node is part of an unbounded cycle, add it to the path // and rethrow the exception e.path = new Path(depth + edge.weight, edge, e.path); stack.remove(s); throw e; } } // compute maximum added stack depth by following this edge int extra = edge.weight + tail.depth; // remember the shortest path (in number of links) to the // maximum depth stack from following any of the links if (extra > maxdepth || (tail.length < minlength && extra == maxdepth)) { maxdepth = extra; maxtail = tail; maxedge = edge; minlength = tail.length; } } } // we are finished with this node, remember how much deeper it can take us stack.remove(s); Path maxpath = new Path(maxdepth, maxedge, maxtail); s.mark = maxpath; return maxpath; }
0 1
              
// in src/avrora/stack/Analyzer.java
protected Path findMaximalPath(StateCache.State s, HashMap stack, int depth) throws UnboundedStackException { // record this node and the stack depth at which we first encounter it stack.put(s, new Integer(depth)); int maxdepth = 0; int minlength = Integer.MAX_VALUE; Path maxtail = null; StateTransitionGraph.Edge maxedge = null; for (StateTransitionGraph.Edge edge = s.info.forwardEdges; edge != null; edge = edge.forwardLink) { StateCache.State t = edge.target; if (stack.containsKey(t)) { // cycle detected. check that the depth when reentering is the same int prevdepth = ((Integer)stack.get(t)).intValue(); if (depth + edge.weight != prevdepth) { stack.remove(s); throw new UnboundedStackException(new Path(depth + edge.weight, edge, null)); } } else { Path tail; if (edge.target.mark instanceof Path) { // node has already been visited and marked with the // maximum amount of stack depth that it can add. tail = ((Path)edge.target.mark); } else { // node has not been seen before, traverse it try { tail = findMaximalPath(edge.target, stack, depth + edge.weight); } catch (UnboundedStackException e) { // this node is part of an unbounded cycle, add it to the path // and rethrow the exception e.path = new Path(depth + edge.weight, edge, e.path); stack.remove(s); throw e; } } // compute maximum added stack depth by following this edge int extra = edge.weight + tail.depth; // remember the shortest path (in number of links) to the // maximum depth stack from following any of the links if (extra > maxdepth || (tail.length < minlength && extra == maxdepth)) { maxdepth = extra; maxtail = tail; maxedge = edge; minlength = tail.length; } } } // we are finished with this node, remember how much deeper it can take us stack.remove(s); Path maxpath = new Path(maxdepth, maxedge, maxtail); s.mark = maxpath; return maxpath; }
(Domain) WrongNumberOfOperands 1
              
// in src/avrora/arch/legacy/LegacyInstr.java
private static void need(int num, LegacyOperand[] ops) { if (ops.length != num) throw new WrongNumberOfOperands(ops.length, num); }
0 0
(Domain) BreakPointException 1
              
// in src/avrora/monitors/InteractiveMonitor.java
public void fireBefore(State s, int pc) { throw new SimAction.BreakPointException(pc, s); }
0 0
(Domain) NoSuchInstructionException 1
              
// in src/avrora/sim/CodeSegment.java
public void accept(LegacyInstrVisitor v) { throw new InterpreterError.NoSuchInstructionException(interpreter.getState().getPC()); }
0 0
(Domain) TimeoutException 1
              
// in src/avrora/sim/util/ClockCycleTimeout.java
public void fire() { State state = simulator.getState(); throw new SimAction.TimeoutException(state.getPC(), state, timeout, "clock cycles"); }
0 0
Explicit thrown (throw new...): 125/364
Explicit thrown ratio: 34.3%
Builder thrown ratio: 63.5%
Variable thrown ratio: 2.2%
Checked Runtime Total
Domain 6 108 114
Lib 3 2 5
Total 9 110

Caught Exceptions Summary

A (Domain) exception is defined in the application. A (Lib) exception is defined in the JDK or in a library. An exception can be caught, and it happens that the catch block contains a throw (e.g. for wrapping a low-level exception). Hovering over a number triggers showing code snippets from the application code.

Type Exception Caught
(directly)
Caught
with Thrown
(Lib) IOException 74
            
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { Util.userError("GDBServer could not create socket on port "+port, e.getMessage()); }
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/types/SensorSimulation.java
catch ( IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/sensors/ReplaySensorData.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/Simulation.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/util/InterruptScheduler.java
catch ( IOException e ) { throw Util.unexpected(e); }
// in src/avrora/sim/util/InterruptScheduler.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/radio/TopologyStatic.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { return pos + 1; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(0, active0, active1, active2); return 1; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(1, active0, active1, active2); return 2; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(2, active0, active1, active2); return 3; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(3, active0, active1, active2); return 4; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(4, active0, active1, 0L); return 5; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(5, active0, 0L, 0L); return 6; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { return curPos; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { return curPos; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); return matchedToken; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e1) { continue EOFLoop; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e1) { }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
catch (IOException e) { // rethrow IO exceptions (e.g. file not found) //Status.error(e); throw e; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { return pos + 1; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(0, active0, active1, active2); return 1; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(1, active0, active1, active2); return 2; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(2, active0, active1, active2); return 3; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(3, active0, active1, active2); return 4; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(4, 0L, active1, active2); return 5; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(5, 0L, 0L, active2); return 6; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(6, 0L, 0L, active2); return 7; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { return curPos; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { return curPos; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); return matchedToken; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e1) { continue EOFLoop; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e1) { }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; }
// in src/cck/parser/SimpleCharStream.java
catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { return pos + 1; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(0, active0, active1); return 1; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(1, active0, active1); return 2; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(2, active0, active1); return 3; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(3, active0, active1); return 4; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(4, active0, active1); return 5; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(5, active0, active1); return 6; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(6, active0, active1); return 7; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(7, active0, active1); return 8; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(8, active0, active1); return 9; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(9, active0, active1); return 10; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(10, active0, 0L); return 11; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { return curPos; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { return 1; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { return curPos; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { return 1; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; return matchedToken; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e1) { continue EOFLoop; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e1) { }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; }
// in src/jintgen/isdl/parser/SimpleCharStream.java
catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; }
26
            
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/types/SensorSimulation.java
catch ( IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/sensors/ReplaySensorData.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/Simulation.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/util/InterruptScheduler.java
catch ( IOException e ) { throw Util.unexpected(e); }
// in src/avrora/sim/util/InterruptScheduler.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/radio/TopologyStatic.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
catch (IOException e) { // rethrow IO exceptions (e.g. file not found) //Status.error(e); throw e; }
// in src/cck/parser/SimpleCharStream.java
catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; }
// in src/jintgen/isdl/parser/SimpleCharStream.java
catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; }
(Domain) LookaheadSuccess 15
            
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (LookaheadSuccess ls) { }
0
(Lib) Exception 12
            
// in src/avrora/monitors/SnifferMonitor.java
catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); }
// in src/avrora/gui/AvroraGui.java
catch (Exception e) { System.err.println("Couldn't get specified look and feel (" + lookAndFeel + "), for some reason."); System.err.println("Using the default look and feel."); e.printStackTrace(); }
// in src/avrora/gui/ManageSimInput.java
catch ( Exception e ) { // TODO: display exception loading file throw Util.failure(e.toString()); }
// in src/avrora/Main.java
catch (Exception e) { // report any other exceptions e.printStackTrace(); }
// in src/avrora/actions/DisassembleAction.java
catch (Exception e) { e.printStackTrace(); }
// in src/avrora/sim/util/MemPrint.java
catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); }
// in src/avrora/sim/util/MemPrint.java
catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); }
// in src/avrora/syntax/Expr.java
catch (Exception e) { throw Util.unexpected(e); }
// in src/avrora/syntax/Expr.java
catch (Exception e) { throw Util.unexpected(e); }
// in src/cck/util/Option.java
catch (Exception e) { parseError(name, "long", val); }
// in src/cck/util/Option.java
catch (Exception e) { parseError(name, "double", val); }
// in src/jintgen/Main.java
catch (Exception e) { // report any other exceptions e.printStackTrace(); }
3
            
// in src/avrora/gui/ManageSimInput.java
catch ( Exception e ) { // TODO: display exception loading file throw Util.failure(e.toString()); }
// in src/avrora/syntax/Expr.java
catch (Exception e) { throw Util.unexpected(e); }
// in src/avrora/syntax/Expr.java
catch (Exception e) { throw Util.unexpected(e); }
(Lib) Throwable 9
            
// in src/avrora/actions/SimAction.java
catch (Throwable t) { exitSimulation(t); Runtime.getRuntime().removeShutdownHook(shutdownThread); }
// in src/avrora/actions/SimAction.java
catch (Throwable t) { Terminal.printRed("Simulation terminated with unexpected exception"); Terminal.print(": "); t.printStackTrace(); }
// in src/avrora/sim/clock/StepSynchronizer.java
catch ( Throwable t) { reportExit(sim, t); removeSimulator(threads[cntr]); }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
catch (Throwable e) { //Status.error(e); throw Util.unexpected(e); }
// in src/avrora/syntax/RawModule.java
catch (Throwable t) { // since this is a raw module, we ignore assembling errors // such as mismatched instruction problems--these are due to // objdump attempting to disassemble all data within the file, // even misaligned instructions and raw machine code that might // not be valid according to the instruction set specification }
// in src/cck/help/ClassMapValueItem.java
catch (Throwable t) { return "(No help available for this item.)"; }
// in src/cck/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
// in src/jintgen/isdl/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
// in src/jintgen/Main.java
catch ( Throwable t) { Status.error(t); t.printStackTrace(); }
3
            
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
catch (Throwable e) { //Status.error(e); throw Util.unexpected(e); }
// in src/cck/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
// in src/jintgen/isdl/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
(Lib) InterruptedException 7
            
// in src/avrora/gui/SimTimeEvents.java
catch (InterruptedException e) { //do nothing }
// in src/avrora/gui/AvroraGui.java
catch (InterruptedException except) { //If interrupted, do nothing }
// in src/avrora/sim/clock/RippleSynchronizer.java
catch (InterruptedException e) { throw Util.unimplemented(); }
// in src/avrora/sim/clock/BarrierSynchronizer.java
catch (InterruptedException e) { throw Util.unexpected(e); }
// in src/avrora/sim/clock/BarrierSynchronizer.java
catch ( InterruptedException e) { throw Util.unexpected(e); }
// in src/avrora/sim/clock/StepSynchronizer.java
catch ( InterruptedException e) { // do nothing. }
// in src/avrora/stack/Analyzer.java
catch (InterruptedException e) { throw Util.unexpected(e); }
4
            
// in src/avrora/sim/clock/RippleSynchronizer.java
catch (InterruptedException e) { throw Util.unimplemented(); }
// in src/avrora/sim/clock/BarrierSynchronizer.java
catch (InterruptedException e) { throw Util.unexpected(e); }
// in src/avrora/sim/clock/BarrierSynchronizer.java
catch ( InterruptedException e) { throw Util.unexpected(e); }
// in src/avrora/stack/Analyzer.java
catch (InterruptedException e) { throw Util.unexpected(e); }
(Lib) ArrayIndexOutOfBoundsException 6
            
// in src/avrora/sim/Segment.java
catch ( ArrayIndexOutOfBoundsException e ) { if ( error_watch != null ) error_watch.fireBeforeRead(state, address); return this.value; }
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { if ( error_watch != null ) error_watch.fireBeforeWrite(state, address, val); }
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/CodeSegment.java
catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/CodeSegment.java
catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
4
            
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/CodeSegment.java
catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/CodeSegment.java
catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
(Domain) Error 5
            
// in src/avrora/Main.java
catch (Util.Error e) { // report any internal Avrora errors e.report(); }
// in src/avrora/actions/SimAction.java
catch (Util.Error e) { Terminal.printRed("Simulation terminated"); Terminal.print(": "); e.report(); }
// in src/avrora/sim/SimulatorThread.java
catch (Util.Error e) { e.report(); }
// in src/jintgen/Main.java
catch (Util.Error e) { // report any internal errors e.report(); }
// in src/jintgen/Main.java
catch ( Util.Error t) { Status.error(t); t.report(); }
0
(Domain) BreakPointException 2
            
// in src/avrora/actions/SimAction.java
catch (BreakPointException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": breakpoint at " + StringUtil.addrToString(e.address) + " reached."); }
// in src/avrora/sim/SimulatorThread.java
catch (SimAction.BreakPointException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": breakpoint at " + StringUtil.addrToString(e.address) + " reached."); }
0
(Lib) ClassNotFoundException 2
            
// in src/avrora/gui/AvroraGui.java
catch (ClassNotFoundException e) { System.err.println("Couldn't find class for specified look and feel:" + lookAndFeel); System.err.println("Did you include the L&F library in the class path?"); System.err.println("Using the default look and feel."); }
// in src/cck/util/ClassMap.java
catch (ClassNotFoundException e) { Util.userError(type + " class not found", clname); }
0
(Domain) FormatError 2
            
// in src/avrora/actions/ELFDumpAction.java
catch ( ELFHeader.FormatError e) { Util.userError(fname, "invalid ELF header"); }
// in src/avrora/syntax/elf/ELFParser.java
catch (ELFHeader.FormatError e) { Util.userError(fname, "invalid ELF header"); }
0
(Domain) InvalidImmediate 2
            
// in src/avrora/arch/legacy/LegacyDisassembler.java
catch ( LegacyInstr.InvalidImmediate e ) { return null; }
// in src/avrora/syntax/Module.java
catch (LegacyInstr.InvalidImmediate e) { ERROR.ConstantOutOfRange(instr.operands[e.number - 1], e.value, StringUtil.interval(e.low, e.high)); }
0
(Lib) NoSuchElementException 2
            
// in src/avrora/sim/radio/TopologyStatic.java
catch (NoSuchElementException e) { throw Util.failure("Error reading topology tokens"); }
// in src/avrora/sim/radio/noise.java
catch (NoSuchElementException e) { throw Util.failure("Error reading Noise file"); }
2
            
// in src/avrora/sim/radio/TopologyStatic.java
catch (NoSuchElementException e) { throw Util.failure("Error reading topology tokens"); }
// in src/avrora/sim/radio/noise.java
catch (NoSuchElementException e) { throw Util.failure("Error reading Noise file"); }
(Lib) NumberFormatException 2
            
// in src/avrora/monitors/GDBServer.java
catch (NumberFormatException nfe) { // just ignore and go on }
// in src/cck/util/Option.java
catch (NumberFormatException e) { // in case of NumberFormatException parseError(name, "interval", val); }
0
(Lib) OutOfMemoryError 2
            
// in src/avrora/gui/GraphEvents.java
catch (OutOfMemoryError e) { //Note that it's possible to get an out of memory exception //elsewhere, but "most probably" it will be here Terminal.println("RAN OUT OF HEAP SPACE FOR MONITOR"); Terminal.println("SIZE OF MONITORS VECTOR AT THE TIME: " + Integer.toString(privateNumbers[i].size())); }
// in src/avrora/stack/Analyzer.java
catch (OutOfMemoryError ome) { // free the reserved memory reserve = null; long check = System.currentTimeMillis(); buildTime = check - start; outOfMemory(); graph.deleteStateSets(); }
0
(Domain) TimeoutException 2
            
// in src/avrora/actions/SimAction.java
catch (TimeoutException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": timeout reached at pc = " + StringUtil.addrToString(e.address) + ", time = " + e.state.getCycles()); }
// in src/avrora/sim/SimulatorThread.java
catch (SimAction.TimeoutException te) { // suppress timeout exceptions. }
0
(Domain) UnboundedStackException 2
            
// in src/avrora/stack/Analyzer.java
catch (UnboundedStackException e) { unbounded = true; maximalPath = e.path; }
// in src/avrora/stack/Analyzer.java
catch (UnboundedStackException e) { // this node is part of an unbounded cycle, add it to the path // and rethrow the exception e.path = new Path(depth + edge.weight, edge, e.path); stack.remove(s); throw e; }
1
            
// in src/avrora/stack/Analyzer.java
catch (UnboundedStackException e) { // this node is part of an unbounded cycle, add it to the path // and rethrow the exception e.path = new Path(depth + edge.weight, edge, e.path); stack.remove(s); throw e; }
(Lib) UnsupportedEncodingException 2
            
// in src/jintgen/isdl/parser/ISDLParser.java
catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }
2
            
// in src/jintgen/isdl/parser/ISDLParser.java
catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }
(Domain) AsynchronousExit 1
            
// in src/avrora/actions/SimAction.java
catch (AsynchronousExit e) { Terminal.printYellow("Simulation terminated asynchronously"); Terminal.nextln(); }
0
(Lib) FileNotFoundException 1
            
// in src/avrora/syntax/Module.java
catch (FileNotFoundException e) { ERROR.IncludeFileNotFound(fname); }
0
(Lib) IllegalAccessException 1
            
// in src/cck/util/ClassMap.java
catch (IllegalAccessException e) { Util.userError("Illegal access to class", clname); }
0
(Domain) ImmediateRequired 1
            
// in src/avrora/syntax/Module.java
catch (LegacyInstr.ImmediateRequired e) { ERROR.ConstantExpected((SyntacticOperand)e.operand); }
0
(Lib) InstantiationException 1
            
// in src/cck/util/ClassMap.java
catch (InstantiationException e) { Util.userError("The specified class does not have a default constructor", clname); }
0
(Domain) InvalidInstruction 1
            
// in src/avrora/arch/legacy/LegacyDisassembler.java
catch ( InvalidInstruction e ) { return null; }
0
(Domain) InvalidRegister 1
            
// in src/avrora/syntax/Module.java
catch (LegacyInstr.InvalidRegister e) { ERROR.IncorrectRegister(instr.operands[e.number - 1], e.register, e.set.toString()); }
0
(Domain) RegisterRequired 1
            
// in src/avrora/syntax/Module.java
catch (LegacyInstr.RegisterRequired e) { ERROR.RegisterExpected((SyntacticOperand)e.operand); }
0
(Lib) UnsupportedLookAndFeelException 1
            
// in src/avrora/gui/AvroraGui.java
catch (UnsupportedLookAndFeelException e) { System.err.println("Can't use the specified look and feel (" + lookAndFeel + ") on this platform."); System.err.println("Using the default look and feel."); }
0
(Domain) WrongNumberOfOperands 1
            
// in src/avrora/syntax/Module.java
catch (LegacyInstr.WrongNumberOfOperands e) { ERROR.WrongNumberOfOperands(instr.name, e.found, e.expected); }
0

Exception Recast Summary

There is a common practice of throwing exceptions from within a catch block (e.g. for wrapping a low-level exception). The following table summarizes the usage of this practice in the application. The last column gives the number of times it happens for a pair of exceptions. The graph below the table graphically renders the same information. For a given node, its color represents its origin (blue means library exception, orange means domain exception); the left-most number is the number of times it is thrown, the right-most is the number of times it is caught.

Catch Throw
(Lib) IOException
Unknown
26
                    
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/types/SensorSimulation.java
catch ( IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/sensors/ReplaySensorData.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/Simulation.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/util/InterruptScheduler.java
catch ( IOException e ) { throw Util.unexpected(e); }
// in src/avrora/sim/util/InterruptScheduler.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/radio/TopologyStatic.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
catch (IOException e) { // rethrow IO exceptions (e.g. file not found) //Status.error(e); throw e; }
// in src/cck/parser/SimpleCharStream.java
catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; }
// in src/jintgen/isdl/parser/SimpleCharStream.java
catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; }
(Lib) Exception
Unknown
3
                    
// in src/avrora/gui/ManageSimInput.java
catch ( Exception e ) { // TODO: display exception loading file throw Util.failure(e.toString()); }
// in src/avrora/syntax/Expr.java
catch (Exception e) { throw Util.unexpected(e); }
// in src/avrora/syntax/Expr.java
catch (Exception e) { throw Util.unexpected(e); }
(Domain) UnboundedStackException
Unknown
1
                    
// in src/avrora/stack/Analyzer.java
catch (UnboundedStackException e) { // this node is part of an unbounded cycle, add it to the path // and rethrow the exception e.path = new Path(depth + edge.weight, edge, e.path); stack.remove(s); throw e; }
(Lib) InterruptedException
Unknown
4
                    
// in src/avrora/sim/clock/RippleSynchronizer.java
catch (InterruptedException e) { throw Util.unimplemented(); }
// in src/avrora/sim/clock/BarrierSynchronizer.java
catch (InterruptedException e) { throw Util.unexpected(e); }
// in src/avrora/sim/clock/BarrierSynchronizer.java
catch ( InterruptedException e) { throw Util.unexpected(e); }
// in src/avrora/stack/Analyzer.java
catch (InterruptedException e) { throw Util.unexpected(e); }
(Lib) Throwable
(Domain) Error
Unknown
2
                    
// in src/cck/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
// in src/jintgen/isdl/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
1
                    
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
catch (Throwable e) { //Status.error(e); throw Util.unexpected(e); }
(Lib) ArrayIndexOutOfBoundsException
(Domain) AddressOutOfBoundsException
4
                    
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/CodeSegment.java
catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/CodeSegment.java
catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
(Lib) NoSuchElementException
Unknown
2
                    
// in src/avrora/sim/radio/TopologyStatic.java
catch (NoSuchElementException e) { throw Util.failure("Error reading topology tokens"); }
// in src/avrora/sim/radio/noise.java
catch (NoSuchElementException e) { throw Util.failure("Error reading Noise file"); }
(Lib) UnsupportedEncodingException
(Lib) RuntimeException
2
                    
// in src/jintgen/isdl/parser/ISDLParser.java
catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }

Caught / Thrown Exception

Not all exceptions are thrown AND caught in the same project. The following table gives the exceptions types with respect to this. The lower left hand side sell lists all exceptions thrown but not caught (prevalent for libraries), the upper right-hand side lists all exceptions caught but not thrown (usually coming from external dependencies).

Thrown Not Thrown
Caught
Type Name
(Lib) IOException
(Domain) InvalidInstruction
(Domain) UnboundedStackException
(Domain) FormatError
(Domain) Error
(Domain) BreakPointException
(Domain) TimeoutException
(Lib) NoSuchElementException
(Domain) InvalidImmediate
(Domain) InvalidRegister
(Domain) RegisterRequired
(Domain) ImmediateRequired
(Domain) WrongNumberOfOperands
Type Name
(Lib) NumberFormatException
(Lib) Exception
(Lib) InterruptedException
(Lib) ClassNotFoundException
(Lib) UnsupportedLookAndFeelException
(Lib) OutOfMemoryError
(Domain) LookaheadSuccess
(Lib) Throwable
(Domain) AsynchronousExit
(Lib) ArrayIndexOutOfBoundsException
(Lib) FileNotFoundException
(Lib) InstantiationException
(Lib) IllegalAccessException
(Lib) UnsupportedEncodingException
Not caught
Type Name
(Domain) AddressOutOfBoundsException
(Domain) NoSuchInstructionException
(Domain) TokenMgrError
(Domain) ParseException
(Domain) SourceError
(Domain) InternalError
(Lib) RuntimeException

Methods called in Catch and Finally Blocks

The following shows the methods that are called inside catch blocks (first column) and finally blocks (second column). For each method, we give the number of times it is called in a catch block (second sub-column), and the total number of calls (third sub-column). If the method name is red, it means that it is only called from catch/finally blocks. Hovering over a number triggers showing code snippets from the application code.

Catch Finally
Method Nbr Nbr total
unexpected
26
                  
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/types/SensorSimulation.java
catch ( IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/sensors/ReplaySensorData.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/clock/BarrierSynchronizer.java
catch (InterruptedException e) { throw Util.unexpected(e); }
// in src/avrora/sim/clock/BarrierSynchronizer.java
catch ( InterruptedException e) { throw Util.unexpected(e); }
// in src/avrora/sim/Simulation.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/util/InterruptScheduler.java
catch ( IOException e ) { throw Util.unexpected(e); }
// in src/avrora/sim/util/InterruptScheduler.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/radio/TopologyStatic.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
catch (Throwable e) { //Status.error(e); throw Util.unexpected(e); }
// in src/avrora/syntax/Expr.java
catch (Exception e) { throw Util.unexpected(e); }
// in src/avrora/syntax/Expr.java
catch (Exception e) { throw Util.unexpected(e); }
// in src/avrora/stack/Analyzer.java
catch (InterruptedException e) { throw Util.unexpected(e); }
26
jjStopStringLiteralDfa_0 24
                  
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(0, active0, active1, active2); return 1; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(1, active0, active1, active2); return 2; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(2, active0, active1, active2); return 3; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(3, active0, active1, active2); return 4; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(4, active0, active1, 0L); return 5; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(5, active0, 0L, 0L); return 6; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(0, active0, active1, active2); return 1; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(1, active0, active1, active2); return 2; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(2, active0, active1, active2); return 3; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(3, active0, active1, active2); return 4; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(4, 0L, active1, active2); return 5; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(5, 0L, 0L, active2); return 6; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(6, 0L, 0L, active2); return 7; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(0, active0, active1); return 1; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(1, active0, active1); return 2; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(2, active0, active1); return 3; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(3, active0, active1); return 4; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(4, active0, active1); return 5; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(5, active0, active1); return 6; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(6, active0, active1); return 7; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(7, active0, active1); return 8; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(8, active0, active1); return 9; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(9, active0, active1); return 10; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(10, active0, 0L); return 11; }
27
println 15
                  
// in src/avrora/monitors/SnifferMonitor.java
catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); }
// in src/avrora/gui/AvroraGui.java
catch (ClassNotFoundException e) { System.err.println("Couldn't find class for specified look and feel:" + lookAndFeel); System.err.println("Did you include the L&F library in the class path?"); System.err.println("Using the default look and feel."); }
// in src/avrora/gui/AvroraGui.java
catch (UnsupportedLookAndFeelException e) { System.err.println("Can't use the specified look and feel (" + lookAndFeel + ") on this platform."); System.err.println("Using the default look and feel."); }
// in src/avrora/gui/AvroraGui.java
catch (Exception e) { System.err.println("Couldn't get specified look and feel (" + lookAndFeel + "), for some reason."); System.err.println("Using the default look and feel."); e.printStackTrace(); }
// in src/avrora/gui/GraphEvents.java
catch (OutOfMemoryError e) { //Note that it's possible to get an out of memory exception //elsewhere, but "most probably" it will be here Terminal.println("RAN OUT OF HEAP SPACE FOR MONITOR"); Terminal.println("SIZE OF MONITORS VECTOR AT THE TIME: " + Integer.toString(privateNumbers[i].size())); }
// in src/avrora/actions/SimAction.java
catch (BreakPointException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": breakpoint at " + StringUtil.addrToString(e.address) + " reached."); }
// in src/avrora/actions/SimAction.java
catch (TimeoutException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": timeout reached at pc = " + StringUtil.addrToString(e.address) + ", time = " + e.state.getCycles()); }
// in src/avrora/sim/SimulatorThread.java
catch (SimAction.BreakPointException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": breakpoint at " + StringUtil.addrToString(e.address) + " reached."); }
// in src/avrora/sim/util/MemPrint.java
catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); }
// in src/avrora/sim/util/MemPrint.java
catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); }
543
failure 6
                  
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/gui/ManageSimInput.java
catch ( Exception e ) { // TODO: display exception loading file throw Util.failure(e.toString()); }
// in src/avrora/sim/radio/TopologyStatic.java
catch (NoSuchElementException e) { throw Util.failure("Error reading topology tokens"); }
// in src/avrora/sim/radio/noise.java
catch (NoSuchElementException e) { throw Util.failure("Error reading Noise file"); }
117
getMessage 6
                  
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { Util.userError("GDBServer could not create socket on port "+port, e.getMessage()); }
// in src/avrora/monitors/SnifferMonitor.java
catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); }
// in src/avrora/sim/util/MemPrint.java
catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); }
// in src/avrora/sim/util/MemPrint.java
catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); }
// in src/cck/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
// in src/jintgen/isdl/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
9
printStackTrace 6
                  
// in src/avrora/gui/AvroraGui.java
catch (Exception e) { System.err.println("Couldn't get specified look and feel (" + lookAndFeel + "), for some reason."); System.err.println("Using the default look and feel."); e.printStackTrace(); }
// in src/avrora/Main.java
catch (Exception e) { // report any other exceptions e.printStackTrace(); }
// in src/avrora/actions/DisassembleAction.java
catch (Exception e) { e.printStackTrace(); }
// in src/avrora/actions/SimAction.java
catch (Throwable t) { Terminal.printRed("Simulation terminated with unexpected exception"); Terminal.print(": "); t.printStackTrace(); }
// in src/jintgen/Main.java
catch (Exception e) { // report any other exceptions e.printStackTrace(); }
// in src/jintgen/Main.java
catch ( Throwable t) { Status.error(t); t.printStackTrace(); }
10
userError 6
                  
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { Util.userError("GDBServer could not create socket on port "+port, e.getMessage()); }
// in src/avrora/actions/ELFDumpAction.java
catch ( ELFHeader.FormatError e) { Util.userError(fname, "invalid ELF header"); }
// in src/avrora/syntax/elf/ELFParser.java
catch (ELFHeader.FormatError e) { Util.userError(fname, "invalid ELF header"); }
// in src/cck/util/ClassMap.java
catch (ClassNotFoundException e) { Util.userError(type + " class not found", clname); }
// in src/cck/util/ClassMap.java
catch (InstantiationException e) { Util.userError("The specified class does not have a default constructor", clname); }
// in src/cck/util/ClassMap.java
catch (IllegalAccessException e) { Util.userError("Illegal access to class", clname); }
73
report 5
                  
// in src/avrora/Main.java
catch (Util.Error e) { // report any internal Avrora errors e.report(); }
// in src/avrora/actions/SimAction.java
catch (Util.Error e) { Terminal.printRed("Simulation terminated"); Terminal.print(": "); e.report(); }
// in src/avrora/sim/SimulatorThread.java
catch (Util.Error e) { e.report(); }
// in src/jintgen/Main.java
catch (Util.Error e) { // report any internal errors e.report(); }
// in src/jintgen/Main.java
catch ( Util.Error t) { Status.error(t); t.report(); }
11
printYellow 4
                  
// in src/avrora/actions/SimAction.java
catch (BreakPointException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": breakpoint at " + StringUtil.addrToString(e.address) + " reached."); }
// in src/avrora/actions/SimAction.java
catch (TimeoutException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": timeout reached at pc = " + StringUtil.addrToString(e.address) + ", time = " + e.state.getCycles()); }
// in src/avrora/actions/SimAction.java
catch (AsynchronousExit e) { Terminal.printYellow("Simulation terminated asynchronously"); Terminal.nextln(); }
// in src/avrora/sim/SimulatorThread.java
catch (SimAction.BreakPointException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": breakpoint at " + StringUtil.addrToString(e.address) + " reached."); }
6
GetImage 3
                  
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; }
9
addrToString 3
                  
// in src/avrora/actions/SimAction.java
catch (BreakPointException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": breakpoint at " + StringUtil.addrToString(e.address) + " reached."); }
// in src/avrora/actions/SimAction.java
catch (TimeoutException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": timeout reached at pc = " + StringUtil.addrToString(e.address) + ", time = " + e.state.getCycles()); }
// in src/avrora/sim/SimulatorThread.java
catch (SimAction.BreakPointException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": breakpoint at " + StringUtil.addrToString(e.address) + " reached."); }
60
jjFillToken 3
                  
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); return matchedToken; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); return matchedToken; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; return matchedToken; }
11
parseError 3
                  
// in src/cck/util/Option.java
catch (Exception e) { parseError(name, "long", val); }
// in src/cck/util/Option.java
catch (Exception e) { parseError(name, "double", val); }
// in src/cck/util/Option.java
catch (NumberFormatException e) { // in case of NumberFormatException parseError(name, "interval", val); }
7
toString 3
                  
// in src/avrora/gui/GraphEvents.java
catch (OutOfMemoryError e) { //Note that it's possible to get an out of memory exception //elsewhere, but "most probably" it will be here Terminal.println("RAN OUT OF HEAP SPACE FOR MONITOR"); Terminal.println("SIZE OF MONITORS VECTOR AT THE TIME: " + Integer.toString(privateNumbers[i].size())); }
// in src/avrora/gui/ManageSimInput.java
catch ( Exception e ) { // TODO: display exception loading file throw Util.failure(e.toString()); }
// in src/avrora/syntax/Module.java
catch (LegacyInstr.InvalidRegister e) { ERROR.IncorrectRegister(instr.operands[e.number - 1], e.register, e.set.toString()); }
212
backup 2
                  
// in src/cck/parser/SimpleCharStream.java
catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; }
// in src/jintgen/isdl/parser/SimpleCharStream.java
catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; }
15
error 2
                  
// in src/jintgen/Main.java
catch ( Util.Error t) { Status.error(t); t.report(); }
// in src/jintgen/Main.java
catch ( Throwable t) { Status.error(t); t.printStackTrace(); }
52
print 2
                  
// in src/avrora/actions/SimAction.java
catch (Util.Error e) { Terminal.printRed("Simulation terminated"); Terminal.print(": "); e.report(); }
// in src/avrora/actions/SimAction.java
catch (Throwable t) { Terminal.printRed("Simulation terminated with unexpected exception"); Terminal.print(": "); t.printStackTrace(); }
432
printRed 2
                  
// in src/avrora/actions/SimAction.java
catch (Util.Error e) { Terminal.printRed("Simulation terminated"); Terminal.print(": "); e.report(); }
// in src/avrora/actions/SimAction.java
catch (Throwable t) { Terminal.printRed("Simulation terminated with unexpected exception"); Terminal.print(": "); t.printStackTrace(); }
25
ConstantExpected
1
                  
// in src/avrora/syntax/Module.java
catch (LegacyInstr.ImmediateRequired e) { ERROR.ConstantExpected((SyntacticOperand)e.operand); }
1
ConstantOutOfRange
1
                  
// in src/avrora/syntax/Module.java
catch (LegacyInstr.InvalidImmediate e) { ERROR.ConstantOutOfRange(instr.operands[e.number - 1], e.value, StringUtil.interval(e.low, e.high)); }
1
IncludeFileNotFound
1
                  
// in src/avrora/syntax/Module.java
catch (FileNotFoundException e) { ERROR.IncludeFileNotFound(fname); }
1
IncorrectRegister
1
                  
// in src/avrora/syntax/Module.java
catch (LegacyInstr.InvalidRegister e) { ERROR.IncorrectRegister(instr.operands[e.number - 1], e.register, e.set.toString()); }
1
Path 1
                  
// in src/avrora/stack/Analyzer.java
catch (UnboundedStackException e) { // this node is part of an unbounded cycle, add it to the path // and rethrow the exception e.path = new Path(depth + edge.weight, edge, e.path); stack.remove(s); throw e; }
3
RegisterExpected
1
                  
// in src/avrora/syntax/Module.java
catch (LegacyInstr.RegisterRequired e) { ERROR.RegisterExpected((SyntacticOperand)e.operand); }
1
currentTimeMillis 1
                  
// in src/avrora/stack/Analyzer.java
catch (OutOfMemoryError ome) { // free the reserved memory reserve = null; long check = System.currentTimeMillis(); buildTime = check - start; outOfMemory(); graph.deleteStateSets(); }
13
deleteStateSets
1
                  
// in src/avrora/stack/Analyzer.java
catch (OutOfMemoryError ome) { // free the reserved memory reserve = null; long check = System.currentTimeMillis(); buildTime = check - start; outOfMemory(); graph.deleteStateSets(); }
1
exitSimulation 1
                  
// in src/avrora/actions/SimAction.java
catch (Throwable t) { exitSimulation(t); Runtime.getRuntime().removeShutdownHook(shutdownThread); }
3
fireBeforeRead 1
                  
// in src/avrora/sim/Segment.java
catch ( ArrayIndexOutOfBoundsException e ) { if ( error_watch != null ) error_watch.fireBeforeRead(state, address); return this.value; }
7
fireBeforeWrite 1
                  
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { if ( error_watch != null ) error_watch.fireBeforeWrite(state, address, val); }
7
getCycles 1
                  
// in src/avrora/actions/SimAction.java
catch (TimeoutException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": timeout reached at pc = " + StringUtil.addrToString(e.address) + ", time = " + e.state.getCycles()); }
30
getRuntime 1
                  
// in src/avrora/actions/SimAction.java
catch (Throwable t) { exitSimulation(t); Runtime.getRuntime().removeShutdownHook(shutdownThread); }
4
interval
1
                  
// in src/avrora/syntax/Module.java
catch (LegacyInstr.InvalidImmediate e) { ERROR.ConstantOutOfRange(instr.operands[e.number - 1], e.value, StringUtil.interval(e.low, e.high)); }
1
nextln 1
                  
// in src/avrora/actions/SimAction.java
catch (AsynchronousExit e) { Terminal.printYellow("Simulation terminated asynchronously"); Terminal.nextln(); }
100
outOfMemory
1
                  
// in src/avrora/stack/Analyzer.java
catch (OutOfMemoryError ome) { // free the reserved memory reserve = null; long check = System.currentTimeMillis(); buildTime = check - start; outOfMemory(); graph.deleteStateSets(); }
1
remove 1
                  
// in src/avrora/stack/Analyzer.java
catch (UnboundedStackException e) { // this node is part of an unbounded cycle, add it to the path // and rethrow the exception e.path = new Path(depth + edge.weight, edge, e.path); stack.remove(s); throw e; }
40
removeShutdownHook 1
                  
// in src/avrora/actions/SimAction.java
catch (Throwable t) { exitSimulation(t); Runtime.getRuntime().removeShutdownHook(shutdownThread); }
2
removeSimulator 1
                  
// in src/avrora/sim/clock/StepSynchronizer.java
catch ( Throwable t) { reportExit(sim, t); removeSimulator(threads[cntr]); }
2
reportExit
1
                  
// in src/avrora/sim/clock/StepSynchronizer.java
catch ( Throwable t) { reportExit(sim, t); removeSimulator(threads[cntr]); }
1
size 1
                  
// in src/avrora/gui/GraphEvents.java
catch (OutOfMemoryError e) { //Note that it's possible to get an out of memory exception //elsewhere, but "most probably" it will be here Terminal.println("RAN OUT OF HEAP SPACE FOR MONITOR"); Terminal.println("SIZE OF MONITORS VECTOR AT THE TIME: " + Integer.toString(privateNumbers[i].size())); }
73
unimplemented 1
                  
// in src/avrora/sim/clock/RippleSynchronizer.java
catch (InterruptedException e) { throw Util.unimplemented(); }
87
Method Nbr Nbr total
jj_save 13
                  
// in src/avrora/syntax/objdump/ObjDumpParser.java
finally { jj_save(0, xla); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
finally { jj_save(1, xla); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
finally { jj_save(2, xla); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
finally { jj_save(3, xla); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
finally { jj_save(4, xla); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
finally { jj_save(5, xla); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
finally { jj_save(6, xla); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
finally { jj_save(7, xla); }
// in src/jintgen/isdl/parser/ISDLParser.java
finally { jj_save(0, xla); }
// in src/jintgen/isdl/parser/ISDLParser.java
finally { jj_save(1, xla); }
// in src/jintgen/isdl/parser/ISDLParser.java
finally { jj_save(2, xla); }
// in src/jintgen/isdl/parser/ISDLParser.java
finally { jj_save(3, xla); }
// in src/jintgen/isdl/parser/ISDLParser.java
finally { jj_save(4, xla); }
19
exitSimulation 1
                  
// in src/avrora/actions/SimAction.java
finally { exitSimulation(null); Runtime.getRuntime().removeShutdownHook(shutdownThread); }
3
get 1
                  
// in src/avrora/actions/SimAction.java
finally { TermUtil.printSeparator(); reportTime(simulation, delta, THROUGHPUT.get()); reportMonitors(simulation); }
341
getRuntime 1
                  
// in src/avrora/actions/SimAction.java
finally { exitSimulation(null); Runtime.getRuntime().removeShutdownHook(shutdownThread); }
4
printSeparator 1
                  
// in src/avrora/actions/SimAction.java
finally { TermUtil.printSeparator(); reportTime(simulation, delta, THROUGHPUT.get()); reportMonitors(simulation); }
24
removeNode 1
                  
// in src/avrora/sim/SimulatorThread.java
finally { if ( synchronizer != null ) synchronizer.removeNode(node); }
4
removeShutdownHook 1
                  
// in src/avrora/actions/SimAction.java
finally { exitSimulation(null); Runtime.getRuntime().removeShutdownHook(shutdownThread); }
2
reportMonitors
1
                  
// in src/avrora/actions/SimAction.java
finally { TermUtil.printSeparator(); reportTime(simulation, delta, THROUGHPUT.get()); reportMonitors(simulation); }
1
reportTime
1
                  
// in src/avrora/actions/SimAction.java
finally { TermUtil.printSeparator(); reportTime(simulation, delta, THROUGHPUT.get()); reportMonitors(simulation); }
1

Reference Table

This table concatenates the results of the previous tables.

Checked/Runtime Type Exception Thrown Thrown from Catch Declared Caught directly Caught
with Thrown
Caught
with Thrown Runtime
unknown (Lib) . 0 0 0 0 0 0
runtime (Domain) AbstractParseException
public class AbstractParseException extends RuntimeException {
    /**
     * This constructor is used by the method "generateParseException" in the generated parser.  Calling this
     * constructor generates a new object of this type with the fields "currentToken",
     * "expectedTokenSequences", and "tokenImage" set.  The boolean flag "specialConstructor" is also set to
     * true to indicate that this constructor was used to create this object. This constructor calls its super
     * class with the empty string to force the "toString" method of parent class "Throwable" to print the
     * error message in the form: ParseException: <result of getMessage>
     */
    public AbstractParseException(AbstractToken currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal) {
        super("");
        specialConstructor = true;
        currentToken = currentTokenVal;
        expectedTokenSequences = expectedTokenSequencesVal;
        tokenImage = tokenImageVal;
        AbstractToken tok = currentToken.getNextToken();
        sourcePoint = new SourcePoint(tok.file, tok.beginLine, tok.beginColumn, tok.endColumn);
    }

    /**
     * The following constructors are for use by you for whatever purpose you can think of.  Constructing the
     * exception in this manner makes the exception behave in the normal way - i.e., as documented in the
     * class "Throwable".  The fields "errorToken", "expectedTokenSequences", and "tokenImage" do not contain
     * relevant information.  The JavaCC generated code does not use these constructors.
     */

    public AbstractParseException() {
        specialConstructor = false;
    }

    public AbstractParseException(String message) {
        super(message);
        specialConstructor = false;
    }


    /**
     * This variable determines which constructor was used to create this object and thereby affects the
     * semantics of the "getMessage" method (see below).
     */
    protected boolean specialConstructor;
    /**
     * This is the last token that has been consumed successfully.  If this object has been created due to a
     * parse error, the token followng this token will (therefore) be the first error token.
     */
    public AbstractToken currentToken;
    /**
     * Each entry in this array is an array of integers.  Each array of integers represents a sequence of
     * tokens (by their ordinal values) that is expected at this point of the parse.
     */
    public int[][] expectedTokenSequences;
    /**
     * This is a reference to the "tokenImage" array of the generated parser within which the parse error
     * occurred. This array is defined in the generated ...Constants interface.
     */
    public String[] tokenImage;
    /**
     * The end of line string for this machine.
     */
    protected String eol = System.getProperty("line.separator", "\n");

    public SourcePoint sourcePoint;

    /**
     * Used to convert raw characters to their escaped version when these raw version cannot be used as part
     * of an ASCII string literal.
     */
    protected String add_escapes(String str) {
        StringBuffer retval = new StringBuffer();
        char ch;
        for (int i = 0; i < str.length(); i++) {
            switch (str.charAt(i)) {
                case 0:
                    continue;
                case '\b':
                    retval.append("\\b");
                    continue;
                case '\t':
                    retval.append("\\t");
                    continue;
                case '\n':
                    retval.append("\\n");
                    continue;
                case '\f':
                    retval.append("\\f");
                    continue;
                case '\r':
                    retval.append("\\r");
                    continue;
                case '\"':
                    retval.append("\\\"");
                    continue;
                case '\'':
                    retval.append("\\\'");
                    continue;
                case '\\':
                    retval.append("\\\\");
                    continue;
                default:
                    if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
                        String s = "0000" + Integer.toString(ch, 16);
                        retval.append("\\u");
                        retval.append(s.substring(s.length() - 4, s.length()));
                    } else {
                        retval.append(ch);
                    }
            }
        }
        return retval.toString();
    }
}
0 0 1
            
// in src/avrora/syntax/Module.java
public void includeFile(AbstractToken fname) throws AbstractParseException { try { modulePrinter.println("includeFile(" + fname.image + ')'); String fn = StringUtil.trimquotes(fname.image); AtmelParser parser = new AtmelParser(new FileInputStream(fn), this, fn); // TODO: handle infinite include recursion possibility parser.Module(); } catch (FileNotFoundException e) { ERROR.IncludeFileNotFound(fname); } }
0 0 0
runtime (Domain) AddressOutOfBoundsException
public class AddressOutOfBoundsException extends Util.Error {
        public final int data_addr;

        protected AddressOutOfBoundsException(int da) {
            super("Segment access error", "illegal access of "+ StringUtil.quote(name) + " at " + StringUtil.addrToString(da));
            this.data_addr = da;
        }
    }public static class AddressOutOfBoundsException extends Util.Error {
        public final String segment;
        public final int data_addr;
        public final int badPc;

        protected AddressOutOfBoundsException(String s, int pc, int da) {
            super("Program error", "at pc = " + StringUtil.addrToString(pc) + ", illegal access of " + StringUtil.quote(s) + " at " + StringUtil.addrToString(da));
            this.data_addr = da;
            this.segment = s;
            this.badPc = pc;
        }
    }
4
            
// in src/avrora/sim/Segment.java
public byte get(int address) { try { return direct_read(address); } catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); } }
// in src/avrora/sim/Segment.java
public void set(int address, byte val) { try { direct_write(address, val); } catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); } }
// in src/avrora/sim/CodeSegment.java
public LegacyInstr readInstr(int address) { try { return segment_instr[address].asInstr(); } catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); } }
// in src/avrora/sim/CodeSegment.java
public LegacyInstr getInstr(int address) { try { return segment_instr[address]; } catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); } }
4
            
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/CodeSegment.java
catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/CodeSegment.java
catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
0 0 0 0
unknown (Lib) ArrayIndexOutOfBoundsException 0 0 0 6
            
// in src/avrora/sim/Segment.java
catch ( ArrayIndexOutOfBoundsException e ) { if ( error_watch != null ) error_watch.fireBeforeRead(state, address); return this.value; }
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { if ( error_watch != null ) error_watch.fireBeforeWrite(state, address, val); }
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/CodeSegment.java
catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/CodeSegment.java
catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
4
            
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/Segment.java
catch (ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/CodeSegment.java
catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
// in src/avrora/sim/CodeSegment.java
catch ( ArrayIndexOutOfBoundsException e) { throw new AddressOutOfBoundsException(address); }
4
runtime (Domain) AsynchronousExit
public static class AsynchronousExit extends RuntimeException {
    }
0 0 0 1
            
// in src/avrora/actions/SimAction.java
catch (AsynchronousExit e) { Terminal.printYellow("Simulation terminated asynchronously"); Terminal.nextln(); }
0 0
runtime (Domain) BreakPointException
public static class BreakPointException extends RuntimeException {
        /**
         * The <code>address</code> field stores the address of the instruction that caused the breakpoint.
         */
        public final int address;

        /**
         * The <code>state</code> field stores a reference to the state of the simulator when the breakpoint
         * occurred, before executing the instruction.
         */
        public final State state;

        public BreakPointException(int a, State s) {
            super("breakpoint @ " + StringUtil.addrToString(a) + " reached");
            address = a;
            state = s;
        }
    }
1
            
// in src/avrora/monitors/InteractiveMonitor.java
public void fireBefore(State s, int pc) { throw new SimAction.BreakPointException(pc, s); }
0 0 2
            
// in src/avrora/actions/SimAction.java
catch (BreakPointException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": breakpoint at " + StringUtil.addrToString(e.address) + " reached."); }
// in src/avrora/sim/SimulatorThread.java
catch (SimAction.BreakPointException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": breakpoint at " + StringUtil.addrToString(e.address) + " reached."); }
0 0
unknown (Lib) ClassNotFoundException 0 0 0 2
            
// in src/avrora/gui/AvroraGui.java
catch (ClassNotFoundException e) { System.err.println("Couldn't find class for specified look and feel:" + lookAndFeel); System.err.println("Did you include the L&F library in the class path?"); System.err.println("Using the default look and feel."); }
// in src/cck/util/ClassMap.java
catch (ClassNotFoundException e) { Util.userError(type + " class not found", clname); }
0 0
runtime (Domain) Error
public static class Error extends java.lang.Error {

        protected final String message, param;
        public static boolean STACKTRACES;

        public Error(String p) {
            super(p);
            message = "Error";
            param = p;
        }

        public Error(String n, String p) {
            super(n);
            message = n;
            param = p;
        }

        public String getParam() {
            return param;
        }

        /**
         * The <code>report()</code> method generates a textual report that is printed
         * on the terminal for the user.
         */
        public void report() {
            Terminal.print(Terminal.ERROR_COLOR, message);
            Terminal.print(": " + param + '\n');
            if (STACKTRACES) {
                printStackTrace();
            }
        }
    }
15
            
// in src/avrora/sim/mcu/RegisterLayout.java
public void addIOReg(String n, int ior_num) { if ( ior_num >= ioreg_size ) throw new Util.Error("Layout Error", "invalid register address "+ior_num+" for register "+ StringUtil.quote(n)); RegisterInfo i = new RegisterInfo(n, ior_num); info[ior_num] = i; ioregAssignments.put(n, i); }
// in src/avrora/sim/mcu/RegisterLayout.java
public void addIOReg(String n, int ior_num, String format) { if ( ior_num >= ioreg_size ) throw new Util.Error("Layout Error", "invalid register address "+ior_num+" for register "+ StringUtil.quote(n)); RegisterInfo i = new RegisterInfo(n, ior_num); i.subfields = parseSubFields(n, ior_num, format); info[ior_num] = i; ioregAssignments.put(n, i); }
// in src/avrora/sim/mcu/RegisterLayout.java
private SubField[] parseSubFields(String name, int ior, String desc) { int totalbits = 0; int count = 0; SubField[] sfs = new SubField[8]; StringCharacterIterator i = new StringCharacterIterator(desc); int ior_hbit = 7; while ( ior_hbit >= 0 && i.current() != CharacterIterator.DONE ) { if ( i.current() == '.') { ior_hbit = readUnusedField(i, sfs, count, ior_hbit); totalbits += sfs[count].length; } else if ( i.current() == 'x') { ior_hbit = readReservedField(i, sfs, count, ior_hbit); totalbits += sfs[count].length; } else { ior_hbit = readNamedField(i, ior, sfs, count, ior_hbit); totalbits += sfs[count].length; } count++; StringUtil.peekAndEat(i, ','); StringUtil.skipWhiteSpace(i); } // check that there are exactly 8 bits if ( totalbits != ioreg_length ) { throw new Util.Error("Layout Error", "expected "+ioreg_length+" bits, found: "+totalbits+" in "+StringUtil.quote(name)); } // resize the array to be smaller SubField[] subFields = new SubField[count]; System.arraycopy(sfs, 0, subFields, 0, count); // calculate the commit points (i.e. last write to the field) HashSet fs = new HashSet(); for ( int cntr = subFields.length - 1; cntr >= 0; cntr-- ) { SubField subField = subFields[cntr]; if ( !fs.contains(subField.field) ) subField.commit = true; fs.add(subField.field); } return subFields; }
// in src/avrora/arch/avr/AVRInstrBuilder.java
public static int checkValue(int val, int low, int high) { if (val < low || val > high) { throw new Error(); } return val; }
// in src/avrora/arch/msp430/MSP430InstrBuilder.java
public static int checkValue(int val, int low, int high) { if ( val < low || val > high ) { throw new Error(); } return val; }
// in src/avrora/stack/Analyzer.java
public MutableState indirectCall(MutableState s, char addr_low, char addr_hi, char ext) { throw new Error("extended indirect calls not supported"); }
// in src/avrora/stack/Analyzer.java
public MutableState indirectJump(MutableState s, char addr_low, char addr_hi, char ext) { throw new Error("extended indirect jumps not supported"); }
// in src/cck/parser/SimpleCharStream.java
protected void ExpandBuff(boolean wrapAround) { char[] newbuffer = new char[bufsize + 2048]; int[] newbufline = new int[bufsize + 2048]; int[] newbufcolumn = new int[bufsize + 2048]; try { if (wrapAround) { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); bufcolumn = newbufcolumn; maxNextCharInd = bufpos += bufsize - tokenBegin; } else { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); bufcolumn = newbufcolumn; maxNextCharInd = bufpos -= tokenBegin; } } catch (Throwable t) { throw new Error(t.getMessage()); } bufsize += 2048; available = bufsize; tokenBegin = 0; }
// in src/cck/util/Util.java
public static void userError(String s) { throw new Error(s); }
// in src/cck/util/Util.java
public static void userError(String s, String p) { throw new Error(s, p); }
// in src/jintgen/isdl/parser/SimpleCharStream.java
protected void ExpandBuff(boolean wrapAround) { char[] newbuffer = new char[bufsize + 2048]; int[] newbufline = new int[bufsize + 2048]; int[] newbufcolumn = new int[bufsize + 2048]; try { if (wrapAround) { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); bufcolumn = newbufcolumn; maxNextCharInd = (bufpos += (bufsize - tokenBegin)); } else { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); bufcolumn = newbufcolumn; maxNextCharInd = (bufpos -= tokenBegin); } } catch (Throwable t) { throw new Error(t.getMessage()); } bufsize += 2048; available = bufsize; tokenBegin = 0; }
2
            
// in src/cck/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
// in src/jintgen/isdl/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
0 5
            
// in src/avrora/Main.java
catch (Util.Error e) { // report any internal Avrora errors e.report(); }
// in src/avrora/actions/SimAction.java
catch (Util.Error e) { Terminal.printRed("Simulation terminated"); Terminal.print(": "); e.report(); }
// in src/avrora/sim/SimulatorThread.java
catch (Util.Error e) { e.report(); }
// in src/jintgen/Main.java
catch (Util.Error e) { // report any internal errors e.report(); }
// in src/jintgen/Main.java
catch ( Util.Error t) { Status.error(t); t.report(); }
0 0
checked (Lib) Exception 0 0 42
            
// in src/avrora/Defaults.java
public Program read(String[] args) throws Exception { if (args.length == 0) Util.userError("no input files"); if (args.length != 1) Util.userError("input type \"auto\" accepts only one file at a time."); String n = args[0]; int offset = n.lastIndexOf('.'); if (offset < 0) Util.userError("file " + StringUtil.quote(n) + " does not have an extension"); String extension = n.substring(offset).toLowerCase(); ProgramReader reader = null; if (".asm".equals(extension)) reader = new AtmelProgramReader(); else if (".od".equals(extension)) reader = new ObjDumpProgramReader(); else if (".odpp".equals(extension)) reader = new ObjDump2ProgramReader(); else if (".elf".equals(extension)) reader = new ELFParser(); if ( reader == null ) { Util.userError("file extension " + StringUtil.quote(extension) + " unknown"); return null; } // TODO: this is a hack; all inherited options should be available reader.INDIRECT_EDGES.set(INDIRECT_EDGES.stringValue()); reader.ARCH.set(ARCH.stringValue()); reader.options.process(options); return reader.read(args); }
// in src/avrora/Main.java
private static void runAction() throws Exception { banner(); Action a = Defaults.getAction(ACTION.get()); if (a == null) Util.userError("Unknown Action", StringUtil.quote(ACTION.get())); a.options.process(mainOptions); a.run(mainOptions.getArguments()); }
// in src/avrora/Main.java
public static Program loadProgram(String[] args) throws Exception { Status.begin("Loading "+args[0]); ProgramReader reader = Defaults.getProgramReader(INPUT.get()); reader.options.process(mainOptions); Program program = reader.read(args); Status.success(); return program; }
// in src/avrora/actions/CFGAction.java
public void run(String[] args) throws Exception { program = Main.loadProgram(args); cfg = program.getCFG(); if ("dot".equals(OUTPUT.get())) dumpDotCFG(cfg); else dumpCFG(cfg); }
// in src/avrora/actions/DisassembleAction.java
public void run(String[] args) throws Exception { byte[] buf = new byte[128]; AbstractArchitecture arch = ArchitectureRegistry.getArchitecture(ARCH.get()); AbstractDisassembler da = arch.getDisassembler(); if ( EXHAUSTIVE.get() ) { // run the exhaustive disassembler exhaustive(da); } else if ( !FILE.isBlank() ) { // load and disassemble a complete file disassembleFile(da); } else { // disassemble the bytes specified on the command line disassembleArguments(args, buf, da); } }
// in src/avrora/actions/NewSimAction.java
public void run(String[] args) throws Exception { if ( args.length != 1 ) Util.userError("no simulation file specified"); String fn = args[0]; Main.checkFileExists(fn); ELFParser loader = new ELFParser(); loader.options.process(options); AbstractArchitecture arch = loader.getArchitecture(); AbstractDisassembler d = arch.getDisassembler(); }
// in src/avrora/actions/AnalyzeStackAction.java
public void run(String[] args) throws Exception { Program p = Main.loadProgram(args); Analyzer.TRACE_SUMMARY = TRACE_SUMMARY.get(); Analyzer.MONITOR_STATES = MONITOR_STATES.get(); Analyzer.TRACE = TRACE.get(); Analyzer.USE_ISEA = USE_ISEA.get(); Analyzer.SHOW_PATH = SHOW_PATH.get(); Analyzer.reserve = new byte[(int)(RESERVE.get() * MEGABYTES)]; Analyzer a = new Analyzer(p); a.run(); a.report(); if (DUMP_STATE_SPACE.get()) a.dump(); }
// in src/avrora/actions/RegisterTestAction.java
public void run(String[] args) throws Exception { detail = DETAIL.get(); Register r1 = new Register(16); writeAndPrint("R1", r1, 0x89); writeAndPrint("R1", r1, 0x1189); writeAndPrint("R1", r1, 0x89); writeAndPrint("R1", r1, 0x1AC89); RegisterView r2 = RegisterUtil.bitRangeView(r1, 0, 15); r1.write(0x89); checkRegister("R2", r2, 0x89); r2.setValue(0x7a); checkRegister("R1", r1, 0x7a); Register r3 = new Register(8); Register r4 = new Register(8); RegisterView r5 = RegisterUtil.stackedView(r3, r4); r5.setValue(0xa3b7); checkRegister("R3", r3, 0xb7); checkRegister("R4", r4, 0xa3); RegisterView r6 = RegisterUtil.bitRangeView(r5, 4, 7); RegisterView r7 = RegisterUtil.bitRangeView(r5, 10, 15); r5.setValue(0xabcd); checkRegister("R6", r6, 0xc); r6.setValue(0x7); checkRegister("R5", r5, 0xab7d); checkRegister("R7", r7, 0x2a); r7.setValue(0xff); checkRegister("R5", r5, 0xff7d); assert Arithmetic.getBitMask(16) == 0xffff; assert Arithmetic.getBitMask(32) == 0xffffffff; }
// in src/avrora/actions/MediumTestAction.java
public void run(String[] args) throws Exception { // create a medium and test it. Medium m = new Medium(null, null, 300, 102, 8, 128); MainClock c = new MainClock("main", 3000); final Medium.Transmitter t = new TestTransmitter(m, c); final Medium.Receiver r = new TestReceiver(m, c); Simulator.Event send = new Simulator.Event() { public void fire() { //power and frequency are doubles now t.beginTransmit(0.0,2.4); } }; Simulator.Event recv = new Simulator.Event() { public void fire() { r.beginReceive(2.4); } }; c.insertEvent(send, 1000); c.insertEvent(send, 45500); c.insertEvent(send, 65500); c.insertEvent(send, 106000); c.insertEvent(recv, 100); for ( int i = 0; i < 1000000; i++ ) c.advance(1); }
// in src/avrora/actions/GUIAction.java
public void run(String[] args) throws Exception { //Let's turn off colors Terminal.useColors = false; //Provide nothing to the array if it's empty if (args.length < 1) { args = new String[1]; args[0] = ""; } //For now, we don't run it in a seperate thread. //We'll wait until we have problems until we try the whole seperate thread thing AvroraGui.init(options, args); AvroraGui.instance.showGui(); }
// in src/avrora/actions/ELFDumpAction.java
public void run(String[] args) throws Exception { String fname = args[0]; Main.checkFileExists(fname); RandomAccessFile fis = new RandomAccessFile(fname, "r"); try { // read the ELF header ELFHeader header = ELFLoader.readELFHeader(fis); printHeader(header); // read the program header table (if it exists) ELFProgramHeaderTable pht = ELFLoader.readPHT(fis, header); printPHT(pht); // read the section header table ELFSectionHeaderTable sht = ELFLoader.readSHT(fis, header); printSHT(sht); // read the symbol tables List symbolTables = ELFLoader.readSymbolTables(fis, header, sht); Iterator i = symbolTables.iterator(); while ( i.hasNext() ) { ELFSymbolTable stab = (ELFSymbolTable) i.next(); printSymbolTable(stab, sht); } } catch ( ELFHeader.FormatError e) { Util.userError(fname, "invalid ELF header"); } }
// in src/avrora/actions/SimAction.java
public void run(String[] args) throws Exception { SimUtil.REPORT_SECONDS = REPORT_SECONDS.get(); SimUtil.SECONDS_PRECISION = (int)SECONDS_PRECISION.get(); simulation = Defaults.getSimulation(SIMULATION.get()); simulation.process(options, args); ShutdownThread shutdownThread = new ShutdownThread(); Runtime.getRuntime().addShutdownHook(shutdownThread); printSimHeader(); try { startms = System.currentTimeMillis(); simulation.start(); simulation.join(); } catch (Throwable t) { exitSimulation(t); Runtime.getRuntime().removeShutdownHook(shutdownThread); } finally { exitSimulation(null); Runtime.getRuntime().removeShutdownHook(shutdownThread); } }
// in src/avrora/actions/ISEAAction.java
public void run(String[] args) throws Exception { Program p = Main.loadProgram(args); ISEAnalyzer a = new ISEAnalyzer(p); if ( !START.isBlank() ) { SourceMapping.Location location = p.getSourceMapping().getLocation(START.get()); if ( location == null ) Util.userError("Cannot find program location "+START.get()); a.analyze(location.lma_addr); } else { a.analyze(); } }
// in src/avrora/actions/TestAction.java
public void run(String[] args) throws Exception { TestEngine.LONG_REPORT = DETAIL.get(); Status.ENABLED = false; TestEngine engine = new TestEngine(Defaults.getTestHarnessMap()); boolean r = engine.runTests(args); if (!r) System.exit(1); }
// in src/avrora/sim/types/WiredSimulation.java
public void process(Options o, String[] args) throws Exception { options.process(o); processMonitorList(); if (args.length == 0) Util.userError("Simulation error", "No program specified"); Main.checkFilesExist(args); PlatformFactory pf = getPlatform(); // create the nodes based on arguments createNodes(args, pf); }
// in src/avrora/sim/types/WiredSimulation.java
private void createNodes(String[] args, PlatformFactory pf) throws Exception { int cntr = 0; Iterator i = NODECOUNT.get().iterator(); while (i.hasNext()) { if (args.length <= cntr) break; String pname = args[cntr++]; LoadableProgram lp = new LoadableProgram(pname); lp.load(); // create a number of nodes with the same program int max = StringUtil.evaluateIntegerLiteral((String)i.next()); for (int node = 0; node < max; node++) { WiredNode n = (WiredNode)createNode(pf, lp); long r = processRandom(); long s = processStagger(); n.startup = r + s; } } }
// in src/avrora/sim/types/SensorSimulation.java
public void process(Options o, String[] args) throws Exception { options.process(o); processMonitorList(); if ( args.length == 0 ) Util.userError("Simulation error", "No program specified"); Main.checkFilesExist(args); PlatformFactory pf = getPlatform(); // build the synchronizer synchronizer = new RippleSynchronizer(100000, null); // create the topology processTopology(); // create the nodes based on arguments createNodes(args, pf); // process the sensor data input option processSensorInput(); //create Noise time trace createNoise(); }
// in src/avrora/sim/types/SensorSimulation.java
private void createNodes(String[] args, PlatformFactory pf) throws Exception { Iterator i = NODECOUNT.get().iterator(); for ( int arg = 0; arg < args.length; arg++ ) { int count = i.hasNext() ? StringUtil.evaluateIntegerLiteral((String)i.next()) : 1; LoadableProgram lp = new LoadableProgram(args[arg]); lp.load(); // create a number of nodes with the same program for (int node = 0; node < count; node++) { SensorNode n = (SensorNode)createNode(pf, lp); long r = processRandom(); long s = processStagger(); n.startup = r + s; } } }
// in src/avrora/sim/types/SensorSimulation.java
private void createNoise() throws Exception { if (noise == null && !NOISE.isBlank()) { noise = new noise(NOISE.get()); }else if (noise == null && NOISE.isBlank()){ noise = new noise(); } }
// in src/avrora/sim/types/SingleSimulation.java
public void process(Options o, String[] args) throws Exception { options.process(o); processMonitorList(); if ( args.length == 0 ) Util.userError("Simulation error", "No program specified"); if ( args.length > 1 ) Util.userError("Simulation error", "Single node simulation accepts only one program"); Main.checkFilesExist(args); LoadableProgram p = new LoadableProgram(args[0]); p.load(); PlatformFactory pf = getPlatform(); createNode(pf, p); }
// in src/avrora/core/LoadableProgram.java
public void load() throws Exception { program = Main.loadProgram(new String[] { fname }); }
// in src/avrora/syntax/objdump/ObjDumpProgramReader.java
public Program read(String[] args) throws Exception { if (args.length == 0) Util.userError("no input files"); if (args.length != 1) Util.userError("input type \"objdump\" accepts only one file at a time."); if (getArchitecture() != LegacyArchitecture.INSTANCE) Util.userError("input type \"objdump\" parses only the \"legacy\" architecture."); File f = new File(args[0]); RawModule module = new RawModule(true, true); StringBuffer buf = new ObjDumpReformatter(SECTIONS.get()).cleanCode(args[0]); Reader r = new StringReader(buf.toString()); //Status.begin("Parsing"); ObjDumpParser parser = new ObjDumpParser(r, module, f.getName()); parser.Module(); //Status.success(); //Status.begin("Building"); Program p = module.build(); //Status.success(); addIndirectEdges(p); return p; }
// in src/avrora/syntax/objdump/ODPPAction.java
public void run(String[] args) throws Exception { ObjDumpReformatter rf = new ObjDumpReformatter(SECTIONS.get()); if (FILE.isBlank()) { System.out.println(rf.cleanCode(args[0])); } else { FileOutputStream outf = new FileOutputStream(FILE.get()); PrintWriter p = new PrintWriter(outf); p.write(rf.cleanCode(args[0]).toString()); p.close(); } }
// in src/avrora/syntax/objdump/ObjDump2ProgramReader.java
public Program read(String[] args) throws Exception { if (args.length == 0) Util.userError("no input files"); if (args.length != 1) Util.userError("input type \"odpp\" accepts only one file at a time."); if (getArchitecture() != LegacyArchitecture.INSTANCE) Util.userError("input type \"odpp\" parses only the \"legacy\" architecture."); File f = new File(args[0]); RawModule module = new RawModule(true, true); //Status.begin("Parsing"); ObjDumpParser parser = new ObjDumpParser(new FileReader(f), module, f.getName()); parser.Module(); //Status.success(); //Status.begin("Building"); Program p = module.build(); //Status.success(); addIndirectEdges(p); return p; }
// in src/avrora/syntax/atmel/AtmelProgramReader.java
public Program read(String[] args) throws Exception { if (args.length == 0) Util.userError("no input files"); if (args.length != 1) Util.userError("input type \"atmel\" accepts only one file at a time."); if (getArchitecture() != LegacyArchitecture.INSTANCE) Util.userError("input type \"atmel\" parses only the \"legacy\" architecture."); File f = new File(args[0]); Module module = new Module(false, false); FileInputStream fis = new FileInputStream(f); //Status.begin("Parsing"); AtmelParser parser = new AtmelParser(fis, module, f.getName()); parser.Module(); //Status.success(); //Status.begin("Building"); Program p = module.build(); //Status.success(); addIndirectEdges(p); return p; }
// in src/avrora/syntax/elf/ELFParser.java
public Program read(String[] args) throws Exception { if (args.length == 0) Util.userError("no input files"); if (args.length != 1) Util.userError("input type \"elf\" accepts only one file at a time."); String fname = args[0]; Main.checkFileExists(fname); RandomAccessFile fis = new RandomAccessFile(fname, "r"); // read the ELF header try { header = ELFLoader.readELFHeader(fis); } catch (ELFHeader.FormatError e) { Util.userError(fname, "invalid ELF header"); } arch = getArchitecture(); // read the program header table (if it exists) pht = ELFLoader.readPHT(fis, header); // read the section header table (if it exists) if (SYMBOLS.get()) { sht = ELFLoader.readSHT(fis, header); shstrtab = sht.getStringTable(); } // load the sections from the ELF file Program p = loadSections(fis); // read the symbol tables (if they exist) loadSymbolTables(p, fis); return p; }
// in src/avrora/syntax/raw/RAWReader.java
public Program read(String[] args) throws Exception { if (args.length == 0) Util.userError("no input files"); if (args.length != 1) Util.userError("input type \"raw\" accepts only one file at a time."); AbstractArchitecture arch = getArchitecture(); String fname = args[0]; List records = parseFile(fname); Program p = createProgram(arch, records); loadProgram(p, records); return p; }
// in src/avrora/syntax/raw/RAWReader.java
private List parseFile(String fname) throws Exception { Main.checkFileExists(fname); BufferedReader reader = new BufferedReader(new FileReader(fname)); List records = new LinkedList(); int cntr = 1; while (true) { String line = reader.readLine(); if (line == null) break; Record r = parse(cntr++, line); if (r != null) records.add(r); } return records; }
// in src/avrora/syntax/raw/RAWReader.java
protected Record parse(int lineno, String line) throws Exception { CharacterIterator i = new StringCharacterIterator(line); StringUtil.skipWhiteSpace(i); char ch = i.current(); if (ch == CharacterIterator.DONE) return null; // empty line if (ch == ';') return null; // line consists of comment only if (ch == '.') return readDirective(i); else return readRecord(ch, lineno, i); }
// in src/avrora/syntax/raw/RAWReader.java
private Record readRecord(char ch, int lineno, CharacterIterator i) throws Exception { if (!StringUtil.isHexDigit(ch)) Util.userError("syntax error @ " + lineno + ':' + i.getIndex()); Record record = new Record(readAddress(i, ch)); record.code = inCode; StringUtil.expectChar(i, ':'); // expect a colon while (true) { // read in the bytes and strings one by one StringUtil.skipWhiteSpace(i); ch = i.current(); if (StringUtil.isHexDigit(ch)) readByte(record, i); else if (ch == '"') readString(record, i); else if (ch == ';') break; else if (ch == CharacterIterator.DONE) break; else Util.userError("syntax error at " + i.getIndex()); } return record; }
// in src/cck/text/StringUtil.java
public static void expectChar(CharacterIterator i, char c) throws Exception { char r = i.current(); i.next(); if (r != c) Util.failure("parse error at " + i.getIndex() + ", expected character " + squote(c)); }
// in src/cck/text/StringUtil.java
public static void expectChars(CharacterIterator i, String s) throws Exception { for (int cntr = 0; cntr < s.length(); cntr++) expectChar(i, s.charAt(cntr)); }
// in src/cck/text/StringUtil.java
public static String evaluateStringLiteral(String literal) throws Exception { StringBuffer buffer = new StringBuffer(literal.length()); CharacterIterator i = new StringCharacterIterator(literal); expectChar(i, QUOTE_CHAR); while (true) { if (peekAndEat(i, QUOTE_CHAR)) break; char c = i.current(); i.next(); if (c == CharacterIterator.DONE) break; if (c == BACKSLASH) c = escapeChar(i); buffer.append(c); } expectChar(i, CharacterIterator.DONE); return buffer.toString(); }
// in src/cck/text/StringUtil.java
public static char evaluateCharLiteral(String literal) throws Exception { CharacterIterator i = new StringCharacterIterator(literal); expectChar(i, SQUOTE_CHAR); char ch; if (peekAndEat(i, BACKSLASH)) { ch = escapeChar(i); } else { ch = i.current(); i.next(); } expectChar(i, SQUOTE_CHAR); expectChar(i, CharacterIterator.DONE); return ch; }
// in src/jintgen/isdl/verifier/VerifierTestHarness.java
public void run() throws Exception { File archfile = new File(filename); FileInputStream fis = new FileInputStream(archfile); ISDLParser parser = new ISDLParser(fis); ArchDecl a = parser.ArchDecl(); new Verifier(a).verify(); }
// in src/jintgen/isdl/verifier/VerifierTestHarness.java
public TestCase newTestCase(String fname, Properties props) throws Exception { return new VerifierTest(fname, props); }
// in src/jintgen/Main.java
private static void run(String[] args) throws Exception { banner(); if (args.length < 1) Util.userError("Usage: jintgen <arch.isdl>"); ArchDecl.INLINE = INLINE.get(); try { ArchDecl a = loadArchitecture(args[0]); runGenerators(a); } catch ( Util.Error t) { Status.error(t); t.report(); } catch ( Throwable t) { Status.error(t); t.printStackTrace(); } }
// in src/jintgen/Main.java
private static void runGenerators(ArchDecl a) throws Exception { for ( Object o : GENERATORS.get() ) { String str = (String)o; Status.begin("Running "+str+" generator"); Generator g = (Generator)generatorMap.getObjectOfClass(str); g.setArchitecture(a); g.processOptions(mainOptions); g.generate(); Status.success(); } }
// in src/jintgen/gen/CodemapGenerator.java
public void generate() throws Exception { if ( CODEMAP_FILE.isBlank() ) Util.userError("No template file specified"); SectionFile sf = createSectionFile(CODEMAP_FILE.get(), "CODEMAP GENERATOR"); printer = new Printer(new PrintStream(sf)); initializeRegisterMap(); printer.indent(); for ( InstrDecl d : arch.instructions ) visit(d); generateHelperMethods(); printer.unindent(); }
// in src/jintgen/gen/disassembler/Decoder.java
void dotDump() throws Exception { for ( Map.Entry<String, DTNode> e : finalTrees.entrySet() ) { String name = e.getKey(); FileOutputStream fos = new FileOutputStream(name+".dot"); Printer p = new Printer(new PrintStream(fos)); DGUtil.printDotTree(name, e.getValue(), p); } }
// in src/jintgen/gen/disassembler/DisassemblerGenerator.java
public void generate() throws Exception { List<String> imports = new LinkedList<String>(); imports.add("avrora.arch.AbstractDisassembler"); imports.add("avrora.arch.AbstractInstr"); imports.add("java.util.Arrays"); initStatics(); List<String> impl = new LinkedList<String>(); impl.add("AbstractDisassembler"); setPrinter(newClassPrinter("disassembler", imports, null, impl, tr("The <code>$disassembler</code> class decodes bit patterns into instructions. It has " + "been generated automatically by jIntGen from a file containing a description of the instruction " + "set and their encodings.\n\n" + "The following options have been specified to tune this implementation:\n\n" + "</p>-word-size=$1\n"+ "</p>-parallel-trees=$2\n"+ "</p>-multiple-trees=$3\n"+ "</p>-chained-trees=$4\n", WORD.get(), PARALLEL_TREE.get(), MULTI_TREE.get(), CHAINED.get()))); generateHeader(); generateDecodeTables(); int maxprio = getMaxPriority(); if ( PARALLEL_TREE.get() ) implementation = new Decoder.Parallel(this, maxprio); else implementation = new Decoder.Serial(this, maxprio); reader = new ReaderImplementation(this); visitInstructions(); reader.generateOperandReaders(); implementation.compute(); implementation.generate(); if ( verboseDump.enabled ) { implementation.print(verboseDump); } if ( dotDump.enabled ) { implementation.dotDump(); } Terminal.nextln(); TermUtil.reportQuantity("Instructions", instrs, ""); TermUtil.reportQuantity("Pseudo-instructions", pseudoInstrs, ""); TermUtil.reportQuantity("Encodings", numEncodings, ""); TermUtil.reportQuantity("Encoding Instances", encodingInstances, ""); TermUtil.reportQuantity("Decoding Trees", implementation.numTrees, ""); TermUtil.reportQuantity("Nodes", implementation.treeNodes, ""); endblock(); }
// in src/jintgen/gen/InstrIRGenerator.java
public void generate() throws Exception { properties.setProperty("instr", className("Instr")); properties.setProperty("addr", className("AddrMode")); properties.setProperty("addrvisitor", className("AddrModeVisitor")); properties.setProperty("operand", className("Operand")); properties.setProperty("opvisitor", className("OperandVisitor")); properties.setProperty("visitor", className("InstrVisitor")); properties.setProperty("builder", className("InstrBuilder")); properties.setProperty("symbol", className("Symbol")); hashMapImport = new LinkedList<String>(); hashMapImport.add("java.util.HashMap"); generateOperandClasses(); generateVisitor(); generateInstrClasses(); generateEnumerations(); generateBuilder(); generateAddrModeClasses(); }
12
            
// in src/avrora/monitors/SnifferMonitor.java
catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); }
// in src/avrora/gui/AvroraGui.java
catch (Exception e) { System.err.println("Couldn't get specified look and feel (" + lookAndFeel + "), for some reason."); System.err.println("Using the default look and feel."); e.printStackTrace(); }
// in src/avrora/gui/ManageSimInput.java
catch ( Exception e ) { // TODO: display exception loading file throw Util.failure(e.toString()); }
// in src/avrora/Main.java
catch (Exception e) { // report any other exceptions e.printStackTrace(); }
// in src/avrora/actions/DisassembleAction.java
catch (Exception e) { e.printStackTrace(); }
// in src/avrora/sim/util/MemPrint.java
catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); }
// in src/avrora/sim/util/MemPrint.java
catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); }
// in src/avrora/syntax/Expr.java
catch (Exception e) { throw Util.unexpected(e); }
// in src/avrora/syntax/Expr.java
catch (Exception e) { throw Util.unexpected(e); }
// in src/cck/util/Option.java
catch (Exception e) { parseError(name, "long", val); }
// in src/cck/util/Option.java
catch (Exception e) { parseError(name, "double", val); }
// in src/jintgen/Main.java
catch (Exception e) { // report any other exceptions e.printStackTrace(); }
3
            
// in src/avrora/gui/ManageSimInput.java
catch ( Exception e ) { // TODO: display exception loading file throw Util.failure(e.toString()); }
// in src/avrora/syntax/Expr.java
catch (Exception e) { throw Util.unexpected(e); }
// in src/avrora/syntax/Expr.java
catch (Exception e) { throw Util.unexpected(e); }
0
unknown (Lib) FileNotFoundException 0 0 3
            
// in src/jintgen/Main.java
private static ArchDecl loadArchitecture(String fname) throws FileNotFoundException, ParseException { Status.begin("Loading architecture description "+fname); checkFileExists(fname); File archfile = new File(fname); FileInputStream fis = new FileInputStream(archfile); ISDLParser parser = new ISDLParser(fis); ArchDecl a = parser.ArchDecl(); Status.success(); Status.begin("Verifying "+fname); new Verifier(a).verify(); Status.success(); return a; }
// in src/jintgen/gen/Generator.java
private Printer newJavaPrinter(String n, List<String> imports, String sup, String type, List<String> impl, String jdoc) throws FileNotFoundException { String name = properties.getProperty(n); if ( name == null ) throw Util.failure("unknown class template: "+n); File f = new File(name + ".java"); Printer printer = new Printer(new PrintStream(f)); String pname = this.DEST_PACKAGE.get(); if ( !"".equals(pname) ) { printer.println("package "+pname+ ';'); printer.nextln(); } String pabs = ABSTRACT.get(); if ( !"".equals(pabs)) printer.println("import "+pabs+".*;"); if ( imports != null ) for ( String s : imports ) { printer.println("import "+s+ ';'); } if ( jdoc != null ) generateJavaDoc(printer, jdoc); String ec = sup == null ? "" : " extends "+sup; printer.print("public "+type+ ' ' +name+ec+' '); if ( impl != null ) { printer.beginList("implements "); for ( String str : impl ) printer.print(str); printer.endList(" "); } printer.startblock(); return printer; }
1
            
// in src/avrora/syntax/Module.java
catch (FileNotFoundException e) { ERROR.IncludeFileNotFound(fname); }
0 0
checked (Domain) FormatError
public class FormatError extends Exception {

    }
2
            
// in src/cck/elf/ELFHeader.java
public void read(RandomAccessFile fs) throws IOException, FormatError { // read the indentification string if ( fs.length() < EI_NIDENT ) throw new FormatError(); for ( int index = 0; index < EI_NIDENT; ) index += fs.read(e_ident, index, EI_NIDENT - index); checkIdent(); ELFDataInputStream is = new ELFDataInputStream(this, fs); e_type = is.read_Elf32_Half(); e_machine = is.read_Elf32_Half(); e_version = is.read_Elf32_Word(); e_entry = is.read_Elf32_Addr(); e_phoff = is.read_Elf32_Off(); e_shoff = is.read_Elf32_Off(); e_flags = is.read_Elf32_Word(); e_ehsize = is.read_Elf32_Half(); e_phentsize = is.read_Elf32_Half(); e_phnum = is.read_Elf32_Half(); e_shentsize = is.read_Elf32_Half(); e_shnum = is.read_Elf32_Half(); e_shstrndx = is.read_Elf32_Half(); }
// in src/cck/elf/ELFHeader.java
private void checkIndentByte(int ind, int val) throws FormatError { if ( e_ident[ind] != val ) throw new FormatError(); }
0 4
            
// in src/cck/elf/ELFHeader.java
public void read(RandomAccessFile fs) throws IOException, FormatError { // read the indentification string if ( fs.length() < EI_NIDENT ) throw new FormatError(); for ( int index = 0; index < EI_NIDENT; ) index += fs.read(e_ident, index, EI_NIDENT - index); checkIdent(); ELFDataInputStream is = new ELFDataInputStream(this, fs); e_type = is.read_Elf32_Half(); e_machine = is.read_Elf32_Half(); e_version = is.read_Elf32_Word(); e_entry = is.read_Elf32_Addr(); e_phoff = is.read_Elf32_Off(); e_shoff = is.read_Elf32_Off(); e_flags = is.read_Elf32_Word(); e_ehsize = is.read_Elf32_Half(); e_phentsize = is.read_Elf32_Half(); e_phnum = is.read_Elf32_Half(); e_shentsize = is.read_Elf32_Half(); e_shnum = is.read_Elf32_Half(); e_shstrndx = is.read_Elf32_Half(); }
// in src/cck/elf/ELFHeader.java
private void checkIdent() throws FormatError { checkIndentByte(0, 0x7f); checkIndentByte(1, 'E'); checkIndentByte(2, 'L'); checkIndentByte(3, 'F'); bigEndian = isBigEndian(); }
// in src/cck/elf/ELFHeader.java
private void checkIndentByte(int ind, int val) throws FormatError { if ( e_ident[ind] != val ) throw new FormatError(); }
// in src/cck/elf/ELFLoader.java
public static ELFHeader readELFHeader(RandomAccessFile fis) throws IOException, ELFHeader.FormatError { ELFHeader header = new ELFHeader(); header.read(fis); return header; }
2
            
// in src/avrora/actions/ELFDumpAction.java
catch ( ELFHeader.FormatError e) { Util.userError(fname, "invalid ELF header"); }
// in src/avrora/syntax/elf/ELFParser.java
catch (ELFHeader.FormatError e) { Util.userError(fname, "invalid ELF header"); }
0 0
checked (Lib) IOException 3
            
// in src/cck/parser/SimpleCharStream.java
protected void FillBuff() throws IOException { if (maxNextCharInd == available) { if (available == bufsize) { if (tokenBegin > 2048) { bufpos = maxNextCharInd = 0; available = tokenBegin; } else if (tokenBegin < 0) bufpos = maxNextCharInd = 0; else ExpandBuff(false); } else if (available > tokenBegin) available = bufsize; else if (tokenBegin - available < 2048) ExpandBuff(true); else available = tokenBegin; } try { int i; if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1) { inputStream.close(); throw new IOException(); } else maxNextCharInd += i; } catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; } }
// in src/cck/text/SectionFile.java
private void readHeader() throws IOException { if (header_done) return; while (true) { String line = template.readLine(); if (line == null) throw new IOException("no section delimiter found"); super.write(line.getBytes()); super.write('\n'); if (line.equals(start_delimiter)) break; } header_done = true; }
// in src/jintgen/isdl/parser/SimpleCharStream.java
protected void FillBuff() throws IOException { if (maxNextCharInd == available) { if (available == bufsize) { if (tokenBegin > 2048) { bufpos = maxNextCharInd = 0; available = tokenBegin; } else if (tokenBegin < 0) bufpos = maxNextCharInd = 0; else ExpandBuff(false); } else if (available > tokenBegin) available = bufsize; else if ((tokenBegin - available) < 2048) ExpandBuff(true); else available = tokenBegin; } int i; try { if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1) { inputStream.close(); throw new IOException(); } else maxNextCharInd += i; } catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; } }
0 76
            
// in src/avrora/monitors/GDBServer.java
boolean executeCommand(String command) throws IOException { CharacterIterator i = new StringCharacterIterator(command); if ( i.current() == '+' ) i.next(); if ( !StringUtil.peekAndEat(i, '$') ) { commandError(); return false; } char c = i.current(); i.next(); switch ( c ) { case 'c': // CONTINUE WITH EXECUTION // TODO: implement continue at address sendPlus(); return true; case 'D': // DISCONNECT Terminal.println("GDBServer: disconnected"); sendPlus(); simulator.stop(); return true; case 'g': // READ REGISTERS readAllRegisters(); return false; case 'G': // WRITE REGISTERS // TODO: implement update of registers break; case 'H': // SET THREAD CONTEXT -- THERE IS ONLY ONE sendPacketOK("OK"); return false; case 'i': // STEP CYCLE isStepping=true; break; case 'k': // KILL Terminal.println("GDBServer: killed remotely"); sendPlus(); simulator.stop(); return true; case 'm': readMemory(i); return false; case 'M': // WRITE MEMORY // TODO: implement writes to memory break; case 'p': // READ SELECTED REGISTERS readOneRegister(i); return false; case 'P': // WRITE SELECTED REGISTERS // TODO: implement writes to selected registers break; case 'q': // QUERY A VARIABLE // TODO: implement queries to variables break; case 's': // STEP INSTRUCTION isStepping=true; sendPlus(); return true; case 'z': // REMOVE BREAKPOINT setBreakPoint(i, false); return false; case 'Z': // SET BREAKPOINT setBreakPoint(i, true); return false; case '?': // GET LAST SIGNAL sendPacketOK("S05"); return false; } // didn't understand the comand sendPacketOK(""); return false; }
// in src/avrora/monitors/GDBServer.java
private void sendPlus() throws IOException { output.write((byte)'+'); }
// in src/avrora/monitors/GDBServer.java
void commandError() throws IOException { output.write((byte)'-'); }
// in src/avrora/monitors/GDBServer.java
void setBreakPoint(CharacterIterator i, boolean on) throws IOException { // TODO: deal with length as well! char num = i.current(); i.next(); switch ( num ) { case '0': case '1': if ( !StringUtil.peekAndEat(i, ',') ) break; int addr = StringUtil.readHexValue(i, 4); if ( !StringUtil.peekAndEat(i, ',') ) break; int len = StringUtil.readHexValue(i, 4); for ( int cntr = addr; cntr < addr+len; cntr += 2 ) setBreakPoint(addr, on); sendPacketOK("OK"); return; case '2': // TODO: other breakpoint types? case '3': // TODO: other breakpoint types? default: } sendPacketOK(""); }
// in src/avrora/monitors/GDBServer.java
void readAllRegisters() throws IOException { StringBuffer buf = new StringBuffer(84); LegacyState s = (LegacyState)simulator.getState(); for ( int cntr = 0; cntr < 32; cntr++ ) { appendGPR(s, cntr, buf); } appendSREG(s, buf); appendSP(s, buf); appendPC(s, buf); sendPacketOK(buf.toString()); }
// in src/avrora/monitors/GDBServer.java
void readOneRegister(CharacterIterator i) throws IOException { StringBuffer buf = new StringBuffer(8); LegacyState s = (LegacyState)simulator.getState(); int num = StringUtil.readHexValue(i, 2); if ( num < 32 ) { // general purpose register appendGPR(s, num, buf); } else if ( num == 32 ) { // SREG appendSREG(s, buf); } else if ( num == 33 ) { // SP appendSP(s, buf); } else if ( num == 34 ) { // PC appendPC(s, buf); } else { // unknown register buf.append("ERR"); } sendPacketOK(buf.toString()); }
// in src/avrora/monitors/GDBServer.java
void readMemory(CharacterIterator i) throws IOException { // read the address in memory int addr = StringUtil.readHexValue(i, 8); // read the length if it exists int length = 1; if ( StringUtil.peekAndEat(i, ',') ) length = StringUtil.readHexValue(i, 8); LegacyState s = (LegacyState)simulator.getState(); StringBuffer buf = new StringBuffer(length*2); if ( (addr & MEMMASK) == MEMBEGIN ) { // reading from SRAM addr = addr & (~MEMMASK); for ( int cntr = 0; cntr < length; cntr++ ) { byte value = s.getDataByte(addr+cntr); buf.append(StringUtil.toLowHex(value & 0xff, 2)); } } else { // reading from program memory for ( int cntr = 0; cntr < length; cntr++ ) { byte value = s.getProgramByte(addr+cntr); buf.append(StringUtil.toLowHex(value & 0xff, 2)); } } sendPacketOK(buf.toString()); }
// in src/avrora/monitors/GDBServer.java
void sendPacketOK(String s) throws IOException { sendPlus(); sendPacket(s); }
// in src/avrora/monitors/GDBServer.java
void sendPacket(String packet) throws IOException { byte[] bytes = packet.getBytes(); int cksum = 0; int cntr = 0; while (cntr < bytes.length) { cksum += bytes[cntr++]; } String np = '$' +packet+ '#' +StringUtil.toLowHex(cksum & 0xff, 2); if (printer != null) { printer.println(" <-- "+np+""); } output.write(np.getBytes()); }
// in src/avrora/monitors/GDBServer.java
String readCommand() throws IOException { int i = input.read(); if ( i < 0 ) return null; StringBuffer buf = new StringBuffer(32); buf.append((char)i); while (true) { i = input.read(); if ( i < 0 ) return buf.toString(); buf.append((char)i); if ( i == '#') { int i2 = input.read(); int i3 = input.read(); if ( i2 >= 0 ) buf.append((char)i2); if ( i3 >= 0 ) buf.append((char)i3); return buf.toString(); } } }
// in src/avrora/Main.java
private static void loadUserDefaults() throws IOException { String hdir = System.getProperty("user.home"); if (hdir == null || "".equals(hdir)) return; File f = new File(hdir + "/.avrora"); if (f.exists()) { Properties defs = new Properties(); defs.load(new FileInputStream(f)); mainOptions.process(defs); } }
// in src/avrora/Main.java
private static void loadFile(String fname) throws IOException { checkFileExists(fname); File f = new File(fname); Properties defs = new Properties(); defs.load(new FileInputStream(f)); mainOptions.process(defs); }
// in src/avrora/actions/CFGAction.java
private void dumpDotCFG(ControlFlowGraph cfg) throws IOException { Printer p; if (FILE.isBlank()) p = Printer.STDOUT; else p = new Printer(new PrintStream(new FileOutputStream(FILE.get()))); p.startblock("digraph G"); if (COLOR_PROCEDURES.get() || GROUP_PROCEDURES.get() || COLLAPSE_PROCEDURES.get()) pmap = cfg.getProcedureMap(); dumpDotNodes(p); dumpDotEdges(p); p.endblock(); }
// in src/avrora/actions/DisassembleAction.java
private void disassembleFile(AbstractDisassembler da) throws IOException { String fname = FILE.get(); Main.checkFileExists(fname); FileInputStream fis = new FileInputStream(fname); byte[] buf = new byte[fis.available()]; fis.read(buf); for ( int cntr = 0; cntr < buf.length; ) { cntr += disassembleAndPrint(buf, cntr, da); } }
// in src/avrora/sim/platform/sensors/ReplaySensorData.java
private void getNextReading() throws IOException { int tt = st.nextToken(); if ( tt == StreamTokenizer.TT_EOF ) return; if ( tt != StreamTokenizer.TT_NUMBER ) throw Util.failure("sensor data format error: expected number as sensor reading"); currentReading = (int)st.nval & 0x3ff; }
// in src/avrora/sim/platform/sensors/ReplaySensorData.java
private void scheduleNextChange() throws IOException { int tt = st.nextToken(); if ( tt == StreamTokenizer.TT_EOF ) return; if ( tt != StreamTokenizer.TT_NUMBER ) throw Util.failure("sensor data format error: expected number as time value"); clock.insertEvent(change, (long)(st.nval * clock.getHZ())); }
// in src/avrora/sim/platform/SPIForwarder.java
private void receive(SPI.Frame frame) throws IOException { out.write(frame.data); }
// in src/avrora/sim/radio/noise.java
private void parse(BufferedReader f) throws IOException { String line; while ((line = f.readLine()) != null) { parseLine(line); } f.close(); }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
public StringBuffer cleanCode(String inFile) throws IOException { try { //Status.begin("Preprocessing"); StringBuffer out = new StringBuffer(200000); BufferedReader in = new BufferedReader(new FileReader(inFile)); cleanFile(in, out); //Status.success(); return out; } catch (IOException e) { // rethrow IO exceptions (e.g. file not found) //Status.error(e); throw e; } catch (Throwable e) { //Status.error(e); throw Util.unexpected(e); } }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
private void cleanFile(BufferedReader in, StringBuffer out) throws IOException { line_count = 0; String line = nextLine(in); //clean up first section line = readHeader(in, out, line); while (line != null) { String section = getSectionName(line); if (section != null) { // read the whole section line = readSection(in, out, section); } else { // ignore this line if it is between sections line = nextLine(in); } } }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
private String readHeader(BufferedReader in, StringBuffer out, String line) throws IOException { while (line != null) { if (line.indexOf("Disassembly of section") != -1) { break; } if (line.indexOf("main.exe") != -1) out.append("program \"main.exe\":\n\n"); Iterator i = sectlist.iterator(); while (i.hasNext()) { String s = (String)i.next(); if (line.indexOf(s) != -1) printSectionHeader(s, out, line); } line = nextLine(in); } return line; }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
private String readSection(BufferedReader in, StringBuffer out, String section) throws IOException { if (sections.contains(section)) return convertSection(in, out, section); else return ignoreSection(in, out, section); }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
private String ignoreSection(BufferedReader in, StringBuffer out, String section) throws IOException { append(out, "; section ", section, " removed"); String line = nextLine(in); while (line != null) { append(out, "; ", line, "\n"); if (getSectionName(line) != null) return line; line = nextLine(in); } return line; }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
private String convertSection(BufferedReader in, StringBuffer out, String section) throws IOException { // add the start of the section name append(out, "\nstart ", section, ":\n"); // read the next line String line = nextLine(in); while (line != null) { // beginning of new section if (getSectionName(line) != null) return line; // ignore "..." in output if (line.indexOf("...") != -1) { line = nextLine(in); out.append("; ..."); } if (line.indexOf("Address ") != -1) { line = line.substring(0, line.indexOf("Address ")); line += nextLine(in); } if (isLabel(line)) { out.append("label 0x"); StringTokenizer st = new StringTokenizer(line); out.append(st.nextToken()); String name = st.nextToken().replaceAll("[<,>]", "\""); append(out, " ", name, "\n"); } else { String tok; StringTokenizer st = new StringTokenizer(line); if (st.hasMoreTokens()) { tok = st.nextToken(); out.append(StringUtil.rightJustify("0x" + tok, 10)); while (st.hasMoreTokens()) { tok = st.nextToken(); if (tok.matches("\\p{XDigit}\\p{XDigit}")) append(out, " 0x", tok); else if (tok.charAt(0) == '<') append(out, "; ", tok); // workaround for objdump 2.16.1 bug else if (tok.startsWith("0x0x")) append(out, " ", tok.substring(2, tok.length())); else append(out, " ", tok); } out.append('\n'); } } line = nextLine(in); } return line; }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
private String nextLine(BufferedReader in) throws IOException { line_count++; return in.readLine(); }
// in src/avrora/syntax/elf/ELFParser.java
private void loadSymbolTables(Program p, RandomAccessFile fis) throws IOException { SourceMapping map = new SourceMapping(p); p.setSourceMapping(map); if (SYMBOLS.get()) { symbolTables = ELFLoader.readSymbolTables(fis, header, sht); Iterator i = symbolTables.iterator(); while (i.hasNext()) { ELFSymbolTable stab = (ELFSymbolTable)i.next(); addSymbols(map, stab, stab.getStringTable()); } } }
// in src/avrora/syntax/elf/ELFParser.java
private Program loadSections(RandomAccessFile fis) throws IOException { // load each section ELFDataInputStream is = new ELFDataInputStream(header, fis); Program p = createProgram(); for (int cntr = 0; cntr < pht.entries.length; cntr++) { ELFProgramHeaderTable.Entry32 e = pht.entries[cntr]; if (e.isLoadable() && e.p_filesz > 0) { fis.seek(e.p_offset); byte[] sect = is.read_section(e.p_offset, e.p_filesz); p.writeProgramBytes(sect, e.p_paddr); if (e.isExecutable()) disassembleSection(sect, e, p); } } return p; }
// in src/cck/parser/SimpleCharStream.java
protected void FillBuff() throws IOException { if (maxNextCharInd == available) { if (available == bufsize) { if (tokenBegin > 2048) { bufpos = maxNextCharInd = 0; available = tokenBegin; } else if (tokenBegin < 0) bufpos = maxNextCharInd = 0; else ExpandBuff(false); } else if (available > tokenBegin) available = bufsize; else if (tokenBegin - available < 2048) ExpandBuff(true); else available = tokenBegin; } try { int i; if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1) { inputStream.close(); throw new IOException(); } else maxNextCharInd += i; } catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; } }
// in src/cck/parser/SimpleCharStream.java
public char BeginToken() throws IOException { tokenBegin = -1; char c = readChar(); tokenBegin = bufpos; return c; }
// in src/cck/parser/SimpleCharStream.java
public char readChar() throws IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; return buffer[bufpos]; } if (++bufpos >= maxNextCharInd) FillBuff(); char c = buffer[bufpos]; UpdateLineColumn(c); return c; }
// in src/cck/elf/ELFHeader.java
public void read(RandomAccessFile fs) throws IOException, FormatError { // read the indentification string if ( fs.length() < EI_NIDENT ) throw new FormatError(); for ( int index = 0; index < EI_NIDENT; ) index += fs.read(e_ident, index, EI_NIDENT - index); checkIdent(); ELFDataInputStream is = new ELFDataInputStream(this, fs); e_type = is.read_Elf32_Half(); e_machine = is.read_Elf32_Half(); e_version = is.read_Elf32_Word(); e_entry = is.read_Elf32_Addr(); e_phoff = is.read_Elf32_Off(); e_shoff = is.read_Elf32_Off(); e_flags = is.read_Elf32_Word(); e_ehsize = is.read_Elf32_Half(); e_phentsize = is.read_Elf32_Half(); e_phnum = is.read_Elf32_Half(); e_shentsize = is.read_Elf32_Half(); e_shnum = is.read_Elf32_Half(); e_shstrndx = is.read_Elf32_Half(); }
// in src/cck/elf/ELFStringTable.java
public void read(RandomAccessFile f) throws IOException { if ( data.length == 0 ) return; f.seek(entry.sh_offset); for ( int read = 0; read < data.length; ) { read += f.read(data, read, data.length - read); } }
// in src/cck/elf/ELFLoader.java
public static ELFHeader readELFHeader(RandomAccessFile fis) throws IOException, ELFHeader.FormatError { ELFHeader header = new ELFHeader(); header.read(fis); return header; }
// in src/cck/elf/ELFLoader.java
public static ELFProgramHeaderTable readPHT(RandomAccessFile fis, ELFHeader header) throws IOException { ELFProgramHeaderTable pht = new ELFProgramHeaderTable(header); pht.read(fis); return pht; }
// in src/cck/elf/ELFLoader.java
public static ELFSectionHeaderTable readSHT(RandomAccessFile fis, ELFHeader header) throws IOException { ELFSectionHeaderTable sht = new ELFSectionHeaderTable(header); sht.read(fis); // read the ELF string table that contains the section names if ( header.e_shstrndx < sht.entries.length ) { ELFSectionHeaderTable.Entry32 e = sht.entries[header.e_shstrndx]; ELFStringTable srttab = new ELFStringTable(header, e); srttab.read(fis); sht.setStringTable(srttab); } return sht; }
// in src/cck/elf/ELFLoader.java
public static List readSymbolTables(RandomAccessFile fis, ELFHeader header, ELFSectionHeaderTable sht) throws IOException { List symbolTables = new LinkedList(); for (int cntr = 0; cntr < sht.entries.length; cntr++) { ELFSectionHeaderTable.Entry32 e1 = sht.entries[cntr]; if (e1.isSymbolTable()) { ELFSymbolTable stab = new ELFSymbolTable(header, e1); stab.read(fis); symbolTables.add(stab); ELFSectionHeaderTable.Entry32 strent = sht.entries[e1.sh_link]; if (strent.isStringTable()) { ELFStringTable str = new ELFStringTable(header, strent); str.read(fis); stab.setStringTable(str); } } } return symbolTables; }
// in src/cck/elf/ELFDataInputStream.java
public byte[] read_section(int off, int length) throws IOException { byte[] buffer = new byte[length]; file.seek(off); for ( int cntr = 0; cntr < length; ) { cntr += file.read(buffer, cntr, length - cntr); } return buffer; }
// in src/cck/elf/ELFDataInputStream.java
public byte read_Elf32_byte() throws IOException { return (byte)read_1(); }
// in src/cck/elf/ELFDataInputStream.java
public int read_Elf32_uchar() throws IOException { return read_1(); }
// in src/cck/elf/ELFDataInputStream.java
public int read_Elf32_Addr() throws IOException { return read_4(); }
// in src/cck/elf/ELFDataInputStream.java
public short read_Elf32_Half() throws IOException { return (short)read_2(); }
// in src/cck/elf/ELFDataInputStream.java
public int read_Elf32_Off() throws IOException { return read_4(); }
// in src/cck/elf/ELFDataInputStream.java
public int read_Elf32_SWord() throws IOException { return read_4(); }
// in src/cck/elf/ELFDataInputStream.java
public int read_Elf32_Word() throws IOException { return read_4(); }
// in src/cck/elf/ELFDataInputStream.java
private int read_1() throws IOException { return file.read() & 0xff; }
// in src/cck/elf/ELFDataInputStream.java
private int read_2() throws IOException { int b1 = read_1(); int b2 = read_1(); if ( bigEndian ) return asShort(b2, b1); return asShort(b1, b2); }
// in src/cck/elf/ELFDataInputStream.java
private int read_4() throws IOException { int b1 = read_1(); int b2 = read_1(); int b3 = read_1(); int b4 = read_1(); if ( bigEndian ) return asInt(b4, b3, b2, b1); return asInt(b1, b2, b3, b4); }
// in src/cck/elf/ELFProgramHeaderTable.java
public void read(RandomAccessFile fis) throws IOException { if ( entries.length == 0 ) return; // seek to the beginning of the table fis.seek(header.e_phoff); ELFDataInputStream is = new ELFDataInputStream(header, fis); // read each entry for ( int cntr = 0; cntr < entries.length; cntr++ ) { Entry32 e = new Entry32(); e.p_type = is.read_Elf32_Word(); e.p_offset = is.read_Elf32_Off(); e.p_vaddr = is.read_Elf32_Addr(); e.p_paddr = is.read_Elf32_Addr(); e.p_filesz = is.read_Elf32_Word(); e.p_memsz = is.read_Elf32_Word(); e.p_flags = is.read_Elf32_Word(); e.p_align = is.read_Elf32_Word(); entries[cntr] = e; // read the rest of the entry (padding) for ( int pad = 32; pad < header.e_phentsize; pad++) fis.read(); } }
// in src/cck/elf/ELFSymbolTable.java
public void read(RandomAccessFile f) throws IOException { // seek to the beginning of the section f.seek(entry.sh_offset); // create the elf data input stream ELFDataInputStream is = new ELFDataInputStream(header, f); // read each of the entries for ( int cntr = 0; cntr < entries.length; cntr++ ) { Entry e = new Entry(); e.st_name = is.read_Elf32_Word(); e.st_value = is.read_Elf32_Addr(); e.st_size = is.read_Elf32_Word(); e.st_info = is.read_Elf32_uchar(); e.st_other = is.read_Elf32_uchar(); e.st_shndx = is.read_Elf32_Half(); entries[cntr] = e; for ( int pad = 16; pad < entry.sh_entsize; pad++ ) f.read(); } }
// in src/cck/elf/ELFSectionHeaderTable.java
public void read(RandomAccessFile fis) throws IOException { if ( entries.length == 0 ) return; // seek to the beginning of the section header table fis.seek(header.e_shoff); ELFDataInputStream is = new ELFDataInputStream(header, fis); // load each of the section header entries for ( int cntr = 0; cntr < entries.length; cntr++ ) { Entry32 e = new Entry32(); e.sh_name = is.read_Elf32_Word(); e.sh_type = is.read_Elf32_Word(); e.sh_flags = is.read_Elf32_Word(); e.sh_addr = is.read_Elf32_Addr(); e.sh_offset = is.read_Elf32_Off(); e.sh_size = is.read_Elf32_Word(); e.sh_link = is.read_Elf32_Word(); e.sh_info = is.read_Elf32_Word(); e.sh_addralign = is.read_Elf32_Word(); e.sh_entsize = is.read_Elf32_Word(); entries[cntr] = e; for ( int pad = 40; pad < header.e_shentsize; pad++ ) fis.read(); } }
// in src/cck/util/Options.java
public void loadFile(String fname) throws IOException { //checkFileExists(fname); File f = new File(fname); Properties defs = new Properties(); defs.load(new FileInputStream(f)); process(defs); }
// in src/cck/text/SectionFile.java
public void write(byte[] b) throws IOException { readHeader(); super.write(b); }
// in src/cck/text/SectionFile.java
public void write(byte[] b, int off, int len) throws IOException { readHeader(); super.write(b, off, len); }
// in src/cck/text/SectionFile.java
public void write(int b) throws IOException { readHeader(); super.write(b); }
// in src/cck/text/SectionFile.java
public void writeLine(String s) throws IOException { readHeader(); super.write(s.getBytes()); super.write('\n'); }
// in src/cck/text/SectionFile.java
public void close() throws IOException { readHeader(); discardSection(); readFooter(); template.close(); super.close(); File old = new File(file_name); old.delete(); new File(file_name + ".new").renameTo(old); }
// in src/cck/text/SectionFile.java
private void readHeader() throws IOException { if (header_done) return; while (true) { String line = template.readLine(); if (line == null) throw new IOException("no section delimiter found"); super.write(line.getBytes()); super.write('\n'); if (line.equals(start_delimiter)) break; } header_done = true; }
// in src/cck/text/SectionFile.java
private void discardSection() throws IOException { while (true) { String line = template.readLine(); if (line == null) break; if (line.equals(end_delimiter)) { super.write(line.getBytes()); super.write('\n'); break; } } }
// in src/cck/text/SectionFile.java
private void readFooter() throws IOException { while (true) { String line = template.readLine(); if (line == null) break; super.write(line.getBytes()); super.write('\n'); } }
// in src/jintgen/isdl/parser/SimpleCharStream.java
protected void FillBuff() throws IOException { if (maxNextCharInd == available) { if (available == bufsize) { if (tokenBegin > 2048) { bufpos = maxNextCharInd = 0; available = tokenBegin; } else if (tokenBegin < 0) bufpos = maxNextCharInd = 0; else ExpandBuff(false); } else if (available > tokenBegin) available = bufsize; else if ((tokenBegin - available) < 2048) ExpandBuff(true); else available = tokenBegin; } int i; try { if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1) { inputStream.close(); throw new IOException(); } else maxNextCharInd += i; } catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; } }
// in src/jintgen/isdl/parser/SimpleCharStream.java
public char BeginToken() throws IOException { tokenBegin = -1; char c = readChar(); tokenBegin = bufpos; return c; }
// in src/jintgen/isdl/parser/SimpleCharStream.java
public char readChar() throws IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; return buffer[bufpos]; } if (++bufpos >= maxNextCharInd) FillBuff(); char c = buffer[bufpos]; UpdateLineColumn(c); return (c); }
// in src/jintgen/gen/InterpreterGenerator.java
public void generate() throws IOException { initStatics(); List<String> impl = new LinkedList<String>(); impl.add(tr("$visitor")); Printer printer = newAbstractClassPrinter("interpreter", null, tr("$state"), impl, tr("The <code>$interpreter</code> class contains the code for executing each of the " + "instructions for the \"$1\" architecture. It extends the $state class, which " + "is code written by the user that defines the state associated with the interpreter. ", arch.name)); setPrinter(printer); javaCodePrinter = new JavaCodePrinter(); startblock(tr("public $interpreter(avrora.sim.Simulator sim) ", arch.name)); println("super(sim);"); endblock(); println(""); generateUtilities(); generatePolyMethods(); for (SubroutineDecl d : arch.subroutines) visit(d); for (InstrDecl d : arch.instructions) visit(d); endblock(); close(); }
// in src/jintgen/gen/Generator.java
protected SectionFile createSectionFile(String fname, String sect) throws IOException { Main.checkFileExists(fname); return new SectionFile(fname, sect); }
// in src/jintgen/gen/Generator.java
protected Printer newClassPrinter(String name, List<String> imports, String sup, List<String> impl, String jdoc) throws IOException { return newJavaPrinter(name, imports, sup, "class", impl, jdoc); }
// in src/jintgen/gen/Generator.java
protected Printer newAbstractClassPrinter(String name, List<String> imports, String sup, List<String> impl, String jdoc) throws IOException { return newJavaPrinter(name, imports, sup, "abstract class", impl, jdoc); }
// in src/jintgen/gen/Generator.java
protected Printer newInterfacePrinter(String name, List<String> imports, String sup, String jdoc) throws IOException { return newJavaPrinter(name, imports, sup, "interface", null, jdoc); }
// in src/jintgen/gen/InstrIRGenerator.java
private void generateVisitor() throws IOException { setPrinter(newInterfacePrinter("visitor", null, null, tr("The <code>$visitor</code> interface allows user code that implements " + "the interface to easily dispatch on the type of an instruction without casting using " + "the visitor pattern."))); for (InstrDecl d : arch.instructions ) emitVisitMethod(d); p.endblock(); close(); }
// in src/jintgen/gen/InstrIRGenerator.java
private void generateInstrClasses() throws IOException { LinkedList<String> imports = new LinkedList<String>(); imports.add("avrora.arch.AbstractArchitecture"); imports.add("avrora.arch.AbstractInstr"); LinkedList<String> impl = new LinkedList<String>(); impl.add("AbstractInstr"); setPrinter(newAbstractClassPrinter("instr", imports, null, impl, tr("The <code>$instr</code> class is a container (almost a namespace) for " + "all of the instructions in this architecture. Each inner class represents an instruction " + "in the architecture and also extends the outer class."))); generateJavaDoc("The <code>accept()</code> method accepts an instruction visitor and " + "calls the appropriate <code>visit()</code> method for this instruction.\n" + "@param v the instruction visitor to accept"); println("public abstract void accept($visitor v);"); generateJavaDoc("The <code>accept()</code> method accepts an addressing mode visitor " + "and calls the appropriate <code>visit_*()</code> method for this instruction's addressing " + "mode.\n" + "@param v the addressing mode visitor to accept"); startblock("public void accept($addrvisitor v)"); println("// the default implementation of accept() is empty"); endblock(); generateJavaDoc("The <code>toString()</code> method converts this instruction to a string " + "representation. For instructions with operands, this method will render the operands " + "in the appropriate syntax as declared in the architecture description.\n" + "@return a string representation of this instruction"); startblock("public String toString()"); println("// the default implementation of toString() simply returns the name"); println("return name;"); endblock(); generateJavaDoc("The <code>name</code> field stores a reference to the name of the instruction as a " + "string."); println("public final String name;"); generateJavaDoc("The <code>size</code> field stores the size of the instruction in bytes."); println("public final int size;"); generateJavaDoc("The <code>getSize()</code> method returns the size of this instruction in bytes."); startblock("public int getSize()"); println("return size;"); endblock(); println(""); generateJavaDoc("The <code>getName()</code> method returns the name of this instruction."); startblock("public String getName()"); println("return name;"); endblock(); println(""); generateJavaDoc("The <code>getArchitecture()</code> method returns the architecture of this instruction."); startblock("public AbstractArchitecture getArchitecture()"); println("return null;"); endblock(); println(""); generateJavaDoc(tr("The default constructor for the <code>$instr</code> class accepts a " + "string name and a size for each instruction.\n" + "@param name the string name of the instruction\n" + "@param size the size of the instruction in bytes")); startblock("protected $instr(String name, int size)"); println("this.name = name;"); println("this.size = size;"); endblock(); println(""); generateSuperClasses(); for (InstrDecl d : arch.instructions) emitClass(d); endblock(); close(); }
// in src/jintgen/gen/InstrIRGenerator.java
private void generateEnumerations() throws IOException { setPrinter(newClassPrinter("symbol", hashMapImport, null, null, tr("The <code>$symbol</code> class represents a symbol (or an enumeration as " + "declared in the instruction set description) relevant to the instruction set architecture. " + "For example register names, status bit names, etc are given here. This class provides a " + "type-safe enumeration for such symbolic names."))); generateEnumHeader(); for ( EnumDecl d : arch.enums ) { generateEnumClass(d); } endblock(); close(); }
// in src/jintgen/gen/InstrIRGenerator.java
private void generateOperandClasses() throws IOException { setPrinter(newAbstractClassPrinter("operand", hashMapImport, null, null, tr("The <code>$operand</code> interface represents operands that are allowed to " + "instructions in this architecture. Inner classes of this interface enumerate the possible " + "operand types to instructions and their constructors allow for dynamic checking of " + "correctness constraints as expressed in the instruction set description."))); int cntr = 1; for ( OperandTypeDecl d : arch.operandTypes ) { println("public static final byte $1_val = $2;", d.name, cntr++); } generateJavaDoc("The <code>op_type</code> field stores a code that determines the type of " + "the operand. This code can be used to dispatch on the type of the operand by switching " + "on the code."); println("public final byte op_type;"); generateJavaDoc("The <code>accept()</code> method implements the visitor pattern for operand " + "types, allowing a user to double-dispatch on the type of an operand."); p.println(tr("public abstract void accept($opvisitor v);")); generateJavaDoc("The default constructor for the <code>$operand</code> class simply stores the " + "type of the operand in a final field."); startblock("protected $operand(byte t)"); println("op_type = t;"); endblock(); generateJavaDoc(tr("The <code>$operand.Int</code> class is the super class of operands that can " + "take on integer values. It implements rendering the operand as an integer literal.")); startblock("abstract static class Int extends $operand"); println("public final int value;"); startblock("Int(byte t, int val)"); println("super(t);"); println("this.value = val;"); endblock(); startblock("public String toString()"); println("return Integer.toString(value);"); endblock(); endblock(); println(""); generateJavaDoc(tr("The <code>$operand.Sym</code> class is the super class of operands that can " + "take on symbolic (enumerated) values. It implements rendering the operand as " + "the name of the corresponding enumeration type.")); startblock("abstract static class Sym extends $operand"); println("public final $symbol value;"); startblock("Sym(byte t, $symbol sym)"); println("super(t);"); println("if ( sym == null ) throw new Error();"); println("this.value = sym;"); endblock(); startblock("public String toString()"); println("return value.symbol;"); endblock(); endblock(); println(""); generateJavaDoc(tr("The <code>$operand.Addr</code> class is the super class of operands that represent " + "an address. It implements rendering the operand as a hexadecimal number.")); startblock("abstract static class Addr extends $operand"); println("public final int value;"); startblock("Addr(byte t, int addr)"); println("super(t);"); println("this.value = addr;"); endblock(); startblock("public String toString()"); println("String hs = Integer.toHexString(value);"); println("StringBuffer buf = new StringBuffer(\"0x\");"); println("for ( int cntr = hs.length(); cntr < 4; cntr++ ) buf.append('0');"); println("buf.append(hs);"); println("return buf.toString();"); endblock(); endblock(); println(""); generateJavaDoc(tr("The <code>$operand.Rel</code> class is the super class of operands that represent " + "an address that is computed relative to the program counter. It implements rendering " + "the operand as the PC plus an offset.")); startblock("abstract static class Rel extends $operand"); println("public final int value;"); println("public final int relative;"); startblock("Rel(byte t, int addr, int rel)"); println("super(t);"); println("this.value = addr;"); println("this.relative = rel;"); endblock(); startblock("public String toString()"); println("if ( relative >= 0 ) return \".+\"+relative;"); println("else return \".\"+relative;"); endblock(); endblock(); println(""); for ( OperandTypeDecl d : arch.operandTypes ) generateOperandType(d); endblock(); close(); // generate visitor class Printer vprinter = newInterfacePrinter("opvisitor", hashMapImport, null, tr("The <code>$opvisitor</code> interface allows clients to use the Visitor pattern to " + "resolve the types of operands to instructions.")); // generate the visit methods explicitly declared operand types for ( OperandTypeDecl d : arch.operandTypes ) vprinter.println(tr("public void visit($operand.$1 o);", d.name)); vprinter.endblock(); vprinter.close(); }
// in src/jintgen/gen/InstrIRGenerator.java
private void generateBuilder() throws IOException { setPrinter(newAbstractClassPrinter("builder", hashMapImport, null, null, null)); println("public abstract $instr build(int size, $addr am);"); println("static final HashMap builders = new HashMap();"); startblock("static $builder add(String name, $builder b)"); println("builders.put(name, b);"); println("return b;"); endblock(); for ( InstrDecl d : arch.instructions ) { startblock("public static class $1_builder extends $builder", d.innerClassName); startblock("public $instr build(int size, $addr am)"); if ( DGUtil.addrModeClassExists(d)) println("return new $instr.$1(size, ($addr.$2)am);", d.innerClassName, addrModeName(d)); else println("return new $instr.$1(size);", d.innerClassName); endblock(); endblock(); } for ( InstrDecl d : arch.instructions ) { println("public static final $builder $1 = add($2, new $1_builder());", d.innerClassName, d.name); } startblock("public static int checkValue(int val, int low, int high)"); startblock("if ( val < low || val > high )"); println("throw new Error();"); endblock(); println("return val;"); endblock(); endblock(); close(); }
// in src/jintgen/gen/InstrIRGenerator.java
void generateAddrModeClasses() throws IOException { setPrinter(newInterfacePrinter("addr", hashMapImport, null, tr("The <code>$addr</code> class represents an addressing mode for this architecture. An " + "addressing mode fixes the number and type of operands, the syntax, and the encoding format " + "of the instruction."))); println("public void accept($instr i, $addrvisitor v);"); for ( AddrModeSetDecl as : arch.addrSets ) { startblock("public interface $1 extends $addr", as.name); for ( AddrModeDecl.Operand o : as.unionOperands ) println("public $operand get_$1();", o.name); endblock(); } List<AddrModeDecl> list = new LinkedList<AddrModeDecl>(); for ( AddrModeDecl am : arch.addrModes ) list.add(am); for ( InstrDecl id : arch.instructions ) { // for each addressing mode declared locally if ( id.addrMode.localDecl != null && DGUtil.addrModeClassExists(id) ) list.add(id.addrMode.localDecl); } for ( AddrModeDecl am : list ) emitAddrMode(am); endblock(); close(); emitAddrModeVisitor(list); }
// in src/jintgen/gen/InstrIRGenerator.java
private void emitAddrModeVisitor(List<AddrModeDecl> list) throws IOException { setPrinter(newInterfacePrinter("addrvisitor", hashMapImport, null, tr("The <code>$addrvisitor</code> interface implements the visitor pattern for addressing modes."))); for ( AddrModeDecl am : list ) { print("public void visit_$1", javaName(am.name.image)); printParams(nameTypeList("$instr", "i", am.operands)); println(";"); } endblock(); close(); }
74
            
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { Util.userError("GDBServer could not create socket on port "+port, e.getMessage()); }
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/types/SensorSimulation.java
catch ( IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/sensors/ReplaySensorData.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/Simulation.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/util/InterruptScheduler.java
catch ( IOException e ) { throw Util.unexpected(e); }
// in src/avrora/sim/util/InterruptScheduler.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/radio/TopologyStatic.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { return pos + 1; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(0, active0, active1, active2); return 1; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(1, active0, active1, active2); return 2; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(2, active0, active1, active2); return 3; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(3, active0, active1, active2); return 4; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(4, active0, active1, 0L); return 5; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(5, active0, 0L, 0L); return 6; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { return curPos; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { return curPos; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); return matchedToken; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e1) { continue EOFLoop; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e1) { }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
catch (IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
catch (IOException e) { // rethrow IO exceptions (e.g. file not found) //Status.error(e); throw e; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { return pos + 1; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(0, active0, active1, active2); return 1; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(1, active0, active1, active2); return 2; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(2, active0, active1, active2); return 3; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(3, active0, active1, active2); return 4; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(4, 0L, active1, active2); return 5; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(5, 0L, 0L, active2); return 6; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(6, 0L, 0L, active2); return 7; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { return curPos; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { return curPos; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); return matchedToken; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e1) { continue EOFLoop; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e1) { }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
catch (IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; }
// in src/cck/parser/SimpleCharStream.java
catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { return pos + 1; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(0, active0, active1); return 1; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(1, active0, active1); return 2; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(2, active0, active1); return 3; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(3, active0, active1); return 4; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(4, active0, active1); return 5; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(5, active0, active1); return 6; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(6, active0, active1); return 7; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(7, active0, active1); return 8; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(8, active0, active1); return 9; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(9, active0, active1); return 10; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjStopStringLiteralDfa_0(10, active0, 0L); return 11; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { return curPos; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { return 1; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { return curPos; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { return 1; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; return matchedToken; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e1) { continue EOFLoop; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e1) { }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
catch (IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; }
// in src/jintgen/isdl/parser/SimpleCharStream.java
catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; }
26
            
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/GDBServer.java
catch ( IOException e ) { throw Util.failure("Unexpected IOException: "+e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/monitors/EnergyMonitor.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/types/SensorSimulation.java
catch ( IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/sensors/ReplaySensorData.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SerialForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/platform/SPIForwarder.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/Simulation.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/util/InterruptScheduler.java
catch ( IOException e ) { throw Util.unexpected(e); }
// in src/avrora/sim/util/InterruptScheduler.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/sim/radio/TopologyStatic.java
catch (IOException e) { throw Util.unexpected(e); }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
catch (IOException e) { // rethrow IO exceptions (e.g. file not found) //Status.error(e); throw e; }
// in src/cck/parser/SimpleCharStream.java
catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; }
// in src/jintgen/isdl/parser/SimpleCharStream.java
catch (IOException e) { --bufpos; backup(0); if (tokenBegin == -1) tokenBegin = bufpos; throw e; }
0
unknown (Lib) IllegalAccessException 0 0 0 1
            
// in src/cck/util/ClassMap.java
catch (IllegalAccessException e) { Util.userError("Illegal access to class", clname); }
0 0
runtime (Domain) ImmediateRequired
public static class ImmediateRequired extends RuntimeException {

        public final LegacyOperand operand;

        ImmediateRequired(LegacyOperand o) {
            super("immediate required");
            operand = o;
        }
    }
2
            
// in src/avrora/arch/legacy/LegacyInstr.java
private static int IMM(LegacyOperand o) { LegacyOperand.Constant c = o.asConstant(); if (c == null) throw new ImmediateRequired(o); return c.getValue(); }
// in src/avrora/arch/legacy/LegacyInstr.java
private static int WORD(LegacyOperand o) { LegacyOperand.Constant c = o.asConstant(); if (c == null) throw new ImmediateRequired(o); return c.getValueAsWord(); }
0 0 1
            
// in src/avrora/syntax/Module.java
catch (LegacyInstr.ImmediateRequired e) { ERROR.ConstantExpected((SyntacticOperand)e.operand); }
0 0
unknown (Lib) InstantiationException 0 0 0 1
            
// in src/cck/util/ClassMap.java
catch (InstantiationException e) { Util.userError("The specified class does not have a default constructor", clname); }
0 0
runtime (Domain) InternalError
public static class InternalError extends Error {
        private String category;

        public InternalError(String param) {
            super(param);
            category = "Internal Error";
        }

        public InternalError(String c, String param) {
            super(param);
            category = c;
        }

        public void report() {
            Terminal.print(Terminal.ERROR_COLOR, category);
            Terminal.print(": " + param + '\n');
            printStackTrace();
        }
    }
1
            
// in src/cck/util/Util.java
public static void enforce(boolean b, String s) { if ( !b ) throw new InternalError(s); }
0 0 0 0 0
unknown (Lib) InterruptedException 0 0 7
            
// in src/avrora/sim/clock/RippleSynchronizer.java
private void waitFor(long time, WaitLink link) throws InterruptedException { if (time <= link.time) { waitForLink(link); return; } WaitLink prev = link; for ( link = link.next; ; link = link.next ) { // search for this wait link assert link != null; if ( time < link.time) { // we met a link that has a greater time than this one. WaitLink nlink = insertLink(time, prev, link); waitForLink(nlink); return; } else if (time == link.time) { // this notifier just met the link exactly in time waitForLink(link); return; } // skip this link prev = link; } }
// in src/avrora/sim/clock/RippleSynchronizer.java
private void waitForLink(WaitLink nlink) throws InterruptedException { assert nlink.numPassed >= 1; while (nlink.numPassed < goal) { RippleSynchronizer.this.wait(); } }
// in src/avrora/sim/clock/RippleSynchronizer.java
public void join() throws InterruptedException { Iterator threadIterator = threadMap.keySet().iterator(); while (threadIterator.hasNext()) { SimulatorThread thread = (SimulatorThread)threadIterator.next(); thread.join(); } }
// in src/avrora/sim/clock/Synchronizer.java
public void join() throws InterruptedException { thread.join(); }
// in src/avrora/sim/clock/BarrierSynchronizer.java
public void join() throws InterruptedException { Iterator threadIterator = threadMap.keySet().iterator(); while (threadIterator.hasNext()) { SimulatorThread thread = (SimulatorThread)threadIterator.next(); thread.join(); } }
// in src/avrora/sim/clock/StepSynchronizer.java
public void join() throws InterruptedException { if ( thread != null ) thread.join(); }
// in src/avrora/sim/Simulation.java
public synchronized void join() throws InterruptedException { synchronizer.join(); }
7
            
// in src/avrora/gui/SimTimeEvents.java
catch (InterruptedException e) { //do nothing }
// in src/avrora/gui/AvroraGui.java
catch (InterruptedException except) { //If interrupted, do nothing }
// in src/avrora/sim/clock/RippleSynchronizer.java
catch (InterruptedException e) { throw Util.unimplemented(); }
// in src/avrora/sim/clock/BarrierSynchronizer.java
catch (InterruptedException e) { throw Util.unexpected(e); }
// in src/avrora/sim/clock/BarrierSynchronizer.java
catch ( InterruptedException e) { throw Util.unexpected(e); }
// in src/avrora/sim/clock/StepSynchronizer.java
catch ( InterruptedException e) { // do nothing. }
// in src/avrora/stack/Analyzer.java
catch (InterruptedException e) { throw Util.unexpected(e); }
4
            
// in src/avrora/sim/clock/RippleSynchronizer.java
catch (InterruptedException e) { throw Util.unimplemented(); }
// in src/avrora/sim/clock/BarrierSynchronizer.java
catch (InterruptedException e) { throw Util.unexpected(e); }
// in src/avrora/sim/clock/BarrierSynchronizer.java
catch ( InterruptedException e) { throw Util.unexpected(e); }
// in src/avrora/stack/Analyzer.java
catch (InterruptedException e) { throw Util.unexpected(e); }
0
runtime (Domain) InvalidImmediate
public static class InvalidImmediate extends InvalidOperand {

        /**
         * The <code>low</code> field stores the lowest value that is allowed for this operand.
         */
        public final int low;

        /**
         * The <code>high</code> field stores the highest value that is allowed for this operand.
         */
        public final int high;

        /**
         * The <code>value</code> field stores the actual value that was passed during the attempeted
         * construction of this instruction.
         */
        public final int value;

        public InvalidImmediate(int num, int v, int l, int h) {
            super(num, "value out of required range [" + l + ", " + h + ']');
            low = l;
            high = h;
            value = v;
        }
    }
1
            
// in src/avrora/arch/legacy/LegacyInstr.java
private static int checkImm(int num, int val, int low, int high) { if (val < low || val > high) throw new InvalidImmediate(num, val, low, high); return val; }
0 0 2
            
// in src/avrora/arch/legacy/LegacyDisassembler.java
catch ( LegacyInstr.InvalidImmediate e ) { return null; }
// in src/avrora/syntax/Module.java
catch (LegacyInstr.InvalidImmediate e) { ERROR.ConstantOutOfRange(instr.operands[e.number - 1], e.value, StringUtil.interval(e.low, e.high)); }
0 0
checked (Domain) InvalidInstruction
public static class InvalidInstruction extends Exception {

        InvalidInstruction(int pc) {
            super("Invalid instruction at " + pc);
        }
    }public class InvalidInstruction extends Exception {
        public final int pc;
        public final int word1;

        InvalidInstruction(int word1, int pc) {
            super("Invalid Instruction at "+ StringUtil.addrToString(pc));
            this.pc = pc;
            this.word1 = word1;
        }
    }public static class InvalidInstruction extends Exception {
        InvalidInstruction(int pc)  {
            super("Invalid instruction at "+pc);
        }
    }
3
            
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyRegister getReg(LegacyRegister[] table, int index) throws InvalidInstruction { if ( index < 0 || index >= table.length ) { throw new InvalidInstruction(getWord(0), pc); } LegacyRegister reg = table[index]; if ( reg == null ) { throw new InvalidInstruction(getWord(0), pc); } return reg; }
// in src/avrora/arch/legacy/LegacyDisassembler.java
LegacyInstr decode_root(int word1) throws InvalidInstruction { LegacyInstr i = null; i = decode_root0(word1); if ( i != null ) return i; i = decode_root1(word1); if ( i != null ) return i; throw new InvalidInstruction(word1, pc); }
0 159
            
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyRegister getReg(LegacyRegister[] table, int index) throws InvalidInstruction { if ( index < 0 || index >= table.length ) { throw new InvalidInstruction(getWord(0), pc); } LegacyRegister reg = table[index]; if ( reg == null ) { throw new InvalidInstruction(getWord(0), pc); } return reg; }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BST_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00008) != 0x00000 ) { return null; } int rr = 0; int bit = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:12] -> // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.BST(pc, getReg(GPR_table, rr), bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BLD_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00008) != 0x00000 ) { return null; } int rr = 0; int bit = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:12] -> // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.BLD(pc, getReg(GPR_table, rr), bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_0(int word1) throws InvalidInstruction { // get value of bits logical[6:6] int value = (word1 >> 9) & 0x00001; switch ( value ) { case 0x00001: return decode_BST_0(word1); case 0x00000: return decode_BLD_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRPL_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRPL(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRGE_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRGE(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRTC_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRTC(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRNE_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRNE(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRVC_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRVC(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRID_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRID(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRHC_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRHC(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRCC_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRCC(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_1(int word1) throws InvalidInstruction { // get value of bits logical[13:15] int value = (word1) & 0x00007; switch ( value ) { case 0x00002: return decode_BRPL_0(word1); case 0x00004: return decode_BRGE_0(word1); case 0x00006: return decode_BRTC_0(word1); case 0x00001: return decode_BRNE_0(word1); case 0x00003: return decode_BRVC_0(word1); case 0x00007: return decode_BRID_0(word1); case 0x00005: return decode_BRHC_0(word1); case 0x00000: return decode_BRCC_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBRS_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00008) != 0x00000 ) { return null; } int rr = 0; int bit = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:12] -> // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.SBRS(pc, getReg(GPR_table, rr), bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBRC_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00008) != 0x00000 ) { return null; } int rr = 0; int bit = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:12] -> // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.SBRC(pc, getReg(GPR_table, rr), bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_2(int word1) throws InvalidInstruction { // get value of bits logical[6:6] int value = (word1 >> 9) & 0x00001; switch ( value ) { case 0x00001: return decode_SBRS_0(word1); case 0x00000: return decode_SBRC_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRMI_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRMI(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRLT_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRLT(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRTS_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRTS(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BREQ_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BREQ(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRVS_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRVS(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRIE_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRIE(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRHS_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRHS(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BRCS_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:5] -> // logical[6:12] -> target[6:0] target |= ((word1 >> 3) & 0x0007F); // logical[13:15] -> return new LegacyInstr.BRCS(pc, relative(target, 6)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_3(int word1) throws InvalidInstruction { // get value of bits logical[13:15] int value = (word1) & 0x00007; switch ( value ) { case 0x00002: return decode_BRMI_0(word1); case 0x00004: return decode_BRLT_0(word1); case 0x00006: return decode_BRTS_0(word1); case 0x00001: return decode_BREQ_0(word1); case 0x00003: return decode_BRVS_0(word1); case 0x00007: return decode_BRIE_0(word1); case 0x00005: return decode_BRHS_0(word1); case 0x00000: return decode_BRCS_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_4(int word1) throws InvalidInstruction { // get value of bits logical[4:5] int value = (word1 >> 10) & 0x00003; switch ( value ) { case 0x00002: return decode_0(word1); case 0x00001: return decode_1(word1); case 0x00003: return decode_2(word1); case 0x00000: return decode_3(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBCI_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:3] -> // logical[4:7] -> imm[7:4] imm |= ((word1 >> 8) & 0x0000F) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.SBCI(pc, getReg(HGPR_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ST_1(int word1) throws InvalidInstruction { // this method decodes ST when ar == Y int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.ST(pc, LegacyRegister.Y, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ST_2(int word1) throws InvalidInstruction { // this method decodes ST when ar == Z int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.ST(pc, LegacyRegister.Z, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_5(int word1) throws InvalidInstruction { // get value of bits logical[12:15] int value = (word1) & 0x0000F; switch ( value ) { case 0x00008: return decode_ST_1(word1); case 0x00000: return decode_ST_2(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LD_1(int word1) throws InvalidInstruction { // this method decodes LD when ar == Y int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LD(pc, getReg(GPR_table, rd), LegacyRegister.Y); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LD_2(int word1) throws InvalidInstruction { // this method decodes LD when ar == Z int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LD(pc, getReg(GPR_table, rd), LegacyRegister.Z); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_6(int word1) throws InvalidInstruction { // get value of bits logical[12:15] int value = (word1) & 0x0000F; switch ( value ) { case 0x00008: return decode_LD_1(word1); case 0x00000: return decode_LD_2(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_7(int word1) throws InvalidInstruction { // get value of bits logical[4:6] int value = (word1 >> 9) & 0x00007; switch ( value ) { case 0x00001: return decode_5(word1); case 0x00000: return decode_6(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_OUT_0(int word1) throws InvalidInstruction { int ior = 0; int rr = 0; // logical[0:4] -> // logical[5:6] -> ior[5:4] ior |= ((word1 >> 9) & 0x00003) << 4; // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> ior[3:0] ior |= (word1 & 0x0000F); return new LegacyInstr.OUT(pc, ior, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_IN_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:4] -> // logical[5:6] -> imm[5:4] imm |= ((word1 >> 9) & 0x00003) << 4; // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.IN(pc, getReg(GPR_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_8(int word1) throws InvalidInstruction { // get value of bits logical[4:4] int value = (word1 >> 11) & 0x00001; switch ( value ) { case 0x00001: return decode_OUT_0(word1); case 0x00000: return decode_IN_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CPI_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:3] -> // logical[4:7] -> imm[7:4] imm |= ((word1 >> 8) & 0x0000F) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.CPI(pc, getReg(HGPR_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ANDI_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:3] -> // logical[4:7] -> imm[7:4] imm |= ((word1 >> 8) & 0x0000F) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.ANDI(pc, getReg(HGPR_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_RJMP_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:3] -> // logical[4:15] -> target[11:0] target |= (word1 & 0x00FFF); return new LegacyInstr.RJMP(pc, relative(target, 11)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_OR_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.OR(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_EOR_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.EOR(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_MOV_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.MOV(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_AND_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.AND(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_9(int word1) throws InvalidInstruction { // get value of bits logical[4:5] int value = (word1 >> 10) & 0x00003; switch ( value ) { case 0x00002: return decode_OR_0(word1); case 0x00001: return decode_EOR_0(word1); case 0x00003: return decode_MOV_0(word1); case 0x00000: return decode_AND_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_RCALL_0(int word1) throws InvalidInstruction { int target = 0; // logical[0:3] -> // logical[4:15] -> target[11:0] target |= (word1 & 0x00FFF); return new LegacyInstr.RCALL(pc, relative(target, 11)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBI_0(int word1) throws InvalidInstruction { int ior = 0; int bit = 0; // logical[0:7] -> // logical[8:12] -> ior[4:0] ior |= ((word1 >> 3) & 0x0001F); // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.SBI(pc, ior, bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBIC_0(int word1) throws InvalidInstruction { int ior = 0; int bit = 0; // logical[0:7] -> // logical[8:12] -> ior[4:0] ior |= ((word1 >> 3) & 0x0001F); // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.SBIC(pc, ior, bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBIS_0(int word1) throws InvalidInstruction { int ior = 0; int bit = 0; // logical[0:7] -> // logical[8:12] -> ior[4:0] ior |= ((word1 >> 3) & 0x0001F); // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.SBIS(pc, ior, bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CBI_0(int word1) throws InvalidInstruction { int ior = 0; int bit = 0; // logical[0:7] -> // logical[8:12] -> ior[4:0] ior |= ((word1 >> 3) & 0x0001F); // logical[13:15] -> bit[2:0] bit |= (word1 & 0x00007); return new LegacyInstr.CBI(pc, ior, bit); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_10(int word1) throws InvalidInstruction { // get value of bits logical[6:7] int value = (word1 >> 8) & 0x00003; switch ( value ) { case 0x00002: return decode_SBI_0(word1); case 0x00001: return decode_SBIC_0(word1); case 0x00003: return decode_SBIS_0(word1); case 0x00000: return decode_CBI_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBIW_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:7] -> // logical[8:9] -> imm[5:4] imm |= ((word1 >> 6) & 0x00003) << 4; // logical[10:11] -> rd[1:0] rd |= ((word1 >> 4) & 0x00003); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.SBIW(pc, getReg(RDL_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ADIW_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:7] -> // logical[8:9] -> imm[5:4] imm |= ((word1 >> 6) & 0x00003) << 4; // logical[10:11] -> rd[1:0] rd |= ((word1 >> 4) & 0x00003); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.ADIW(pc, getReg(RDL_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_11(int word1) throws InvalidInstruction { // get value of bits logical[7:7] int value = (word1 >> 8) & 0x00001; switch ( value ) { case 0x00001: return decode_SBIW_0(word1); case 0x00000: return decode_ADIW_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ASR_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00001 ) { return null; } int rd = 0; // logical[0:6] -> // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> return new LegacyInstr.ASR(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLI_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLI(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SES_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SES(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SPM_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.SPM(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLC_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLC(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_WDR_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.WDR(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLV_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLV(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ICALL_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.ICALL(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_RET_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.RET(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_12(int word1) throws InvalidInstruction { // get value of bits logical[15:15] int value = (word1) & 0x00001; switch ( value ) { case 0x00001: return decode_ICALL_0(word1); case 0x00000: return decode_RET_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SEV_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SEV(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SEI_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SEI(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLS_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLS(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_EICALL_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.EICALL(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_RETI_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.RETI(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_13(int word1) throws InvalidInstruction { // get value of bits logical[15:15] int value = (word1) & 0x00001; switch ( value ) { case 0x00001: return decode_EICALL_0(word1); case 0x00000: return decode_RETI_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SEN_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SEN(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLH_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLH(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLZ_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLZ(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LPM_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.LPM(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SET_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SET(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_EIJMP_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.EIJMP(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SEZ_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SEZ(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_14(int word1) throws InvalidInstruction { // get value of bits logical[15:15] int value = (word1) & 0x00001; switch ( value ) { case 0x00001: return decode_EIJMP_0(word1); case 0x00000: return decode_SEZ_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ELPM_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.ELPM(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLT_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLT(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_BREAK_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.BREAK(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SLEEP_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.SLEEP(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CLN_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.CLN(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SEH_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SEH(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_IJMP_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.IJMP(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SEC_0(int word1) throws InvalidInstruction { // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> // logical[12:15] -> return new LegacyInstr.SEC(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_15(int word1) throws InvalidInstruction { // get value of bits logical[15:15] int value = (word1) & 0x00001; switch ( value ) { case 0x00001: return decode_IJMP_0(word1); case 0x00000: return decode_SEC_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_16(int word1) throws InvalidInstruction { // get value of bits logical[7:11] int value = (word1 >> 4) & 0x0001F; switch ( value ) { case 0x0000F: return decode_CLI_0(word1); case 0x00004: return decode_SES_0(word1); case 0x0001E: return decode_SPM_0(word1); case 0x00008: return decode_CLC_0(word1); case 0x0001A: return decode_WDR_0(word1); case 0x0000B: return decode_CLV_0(word1); case 0x00010: return decode_12(word1); case 0x00003: return decode_SEV_0(word1); case 0x00007: return decode_SEI_0(word1); case 0x0000C: return decode_CLS_0(word1); case 0x00011: return decode_13(word1); case 0x00002: return decode_SEN_0(word1); case 0x0000D: return decode_CLH_0(word1); case 0x00009: return decode_CLZ_0(word1); case 0x0001C: return decode_LPM_0(word1); case 0x00006: return decode_SET_0(word1); case 0x00001: return decode_14(word1); case 0x0001D: return decode_ELPM_0(word1); case 0x0000E: return decode_CLT_0(word1); case 0x00019: return decode_BREAK_0(word1); case 0x00018: return decode_SLEEP_0(word1); case 0x0000A: return decode_CLN_0(word1); case 0x00005: return decode_SEH_0(word1); case 0x00000: return decode_15(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_JMP_0(int word1) throws InvalidInstruction { int word2 = getWord(1); int target = 0; // logical[0:6] -> // logical[7:11] -> target[21:17] target |= ((word1 >> 4) & 0x0001F) << 17; // logical[12:14] -> // logical[15:15] -> target[16:16] target |= (word1 & 0x00001) << 16; // logical[16:31] -> target[15:0] target |= (word2 & 0x0FFFF); return new LegacyInstr.JMP(pc, target); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_INC_0(int word1) throws InvalidInstruction { int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.INC(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SWAP_0(int word1) throws InvalidInstruction { int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.SWAP(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_17(int word1) throws InvalidInstruction { // get value of bits logical[15:15] int value = (word1) & 0x00001; switch ( value ) { case 0x00001: return decode_INC_0(word1); case 0x00000: return decode_SWAP_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ROR_0(int word1) throws InvalidInstruction { int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.ROR(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LSR_0(int word1) throws InvalidInstruction { int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LSR(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_18(int word1) throws InvalidInstruction { // get value of bits logical[15:15] int value = (word1) & 0x00001; switch ( value ) { case 0x00001: return decode_ROR_0(word1); case 0x00000: return decode_LSR_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CALL_0(int word1) throws InvalidInstruction { int word2 = getWord(1); int target = 0; // logical[0:6] -> // logical[7:11] -> target[21:17] target |= ((word1 >> 4) & 0x0001F) << 17; // logical[12:14] -> // logical[15:15] -> target[16:16] target |= (word1 & 0x00001) << 16; // logical[16:31] -> target[15:0] target |= (word2 & 0x0FFFF); return new LegacyInstr.CALL(pc, target); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_DEC_0(int word1) throws InvalidInstruction { if ( (word1 & 0x00001) != 0x00000 ) { return null; } int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.DEC(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_NEG_0(int word1) throws InvalidInstruction { int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.NEG(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_COM_0(int word1) throws InvalidInstruction { int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.COM(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_19(int word1) throws InvalidInstruction { // get value of bits logical[15:15] int value = (word1) & 0x00001; switch ( value ) { case 0x00001: return decode_NEG_0(word1); case 0x00000: return decode_COM_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_20(int word1) throws InvalidInstruction { // get value of bits logical[12:14] int value = (word1 >> 1) & 0x00007; switch ( value ) { case 0x00002: return decode_ASR_0(word1); case 0x00004: return decode_16(word1); case 0x00006: return decode_JMP_0(word1); case 0x00001: return decode_17(word1); case 0x00003: return decode_18(word1); case 0x00007: return decode_CALL_0(word1); case 0x00005: return decode_DEC_0(word1); case 0x00000: return decode_19(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_21(int word1) throws InvalidInstruction { // get value of bits logical[6:6] int value = (word1 >> 9) & 0x00001; switch ( value ) { case 0x00001: return decode_11(word1); case 0x00000: return decode_20(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_MUL_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.MUL(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STPD_2(int word1) throws InvalidInstruction { // this method decodes STPD when ar == Z int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.STPD(pc, LegacyRegister.Z, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_PUSH_0(int word1) throws InvalidInstruction { int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.PUSH(pc, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STPI_0(int word1) throws InvalidInstruction { // this method decodes STPI when ar == X int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.STPI(pc, LegacyRegister.X, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STPI_1(int word1) throws InvalidInstruction { // this method decodes STPI when ar == Y int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.STPI(pc, LegacyRegister.Y, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STPI_2(int word1) throws InvalidInstruction { // this method decodes STPI when ar == Z int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.STPI(pc, LegacyRegister.Z, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STPD_0(int word1) throws InvalidInstruction { // this method decodes STPD when ar == X int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.STPD(pc, LegacyRegister.X, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STPD_1(int word1) throws InvalidInstruction { // this method decodes STPD when ar == Y int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.STPD(pc, LegacyRegister.Y, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ST_0(int word1) throws InvalidInstruction { // this method decodes ST when ar == X int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.ST(pc, LegacyRegister.X, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STS_0(int word1) throws InvalidInstruction { int word2 = getWord(1); int addr = 0; int rr = 0; // logical[0:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> // logical[16:31] -> addr[15:0] addr |= (word2 & 0x0FFFF); return new LegacyInstr.STS(pc, addr, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_22(int word1) throws InvalidInstruction { // get value of bits logical[12:15] int value = (word1) & 0x0000F; switch ( value ) { case 0x00002: return decode_STPD_2(word1); case 0x0000F: return decode_PUSH_0(word1); case 0x0000D: return decode_STPI_0(word1); case 0x00009: return decode_STPI_1(word1); case 0x00001: return decode_STPI_2(word1); case 0x0000E: return decode_STPD_0(word1); case 0x0000A: return decode_STPD_1(word1); case 0x0000C: return decode_ST_0(word1); case 0x00000: return decode_STS_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_POP_0(int word1) throws InvalidInstruction { int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.POP(pc, getReg(GPR_table, rd)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LPMD_0(int word1) throws InvalidInstruction { int rd = 0; int z = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LPMD(pc, getReg(GPR_table, rd), getReg(Z_table, z)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ELPMPI_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.ELPMPI(pc, getReg(GPR_table, rd), getReg(Z_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LD_0(int word1) throws InvalidInstruction { // this method decodes LD when ar == X int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LD(pc, getReg(GPR_table, rd), LegacyRegister.X); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDPD_2(int word1) throws InvalidInstruction { // this method decodes LDPD when ar == Z int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LDPD(pc, getReg(GPR_table, rd), LegacyRegister.Z); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDPI_0(int word1) throws InvalidInstruction { // this method decodes LDPI when ar == X int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LDPI(pc, getReg(GPR_table, rd), LegacyRegister.X); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDPI_1(int word1) throws InvalidInstruction { // this method decodes LDPI when ar == Y int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LDPI(pc, getReg(GPR_table, rd), LegacyRegister.Y); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ELPMD_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.ELPMD(pc, getReg(GPR_table, rd), getReg(Z_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDPI_2(int word1) throws InvalidInstruction { // this method decodes LDPI when ar == Z int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LDPI(pc, getReg(GPR_table, rd), LegacyRegister.Z); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDPD_0(int word1) throws InvalidInstruction { // this method decodes LDPD when ar == X int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LDPD(pc, getReg(GPR_table, rd), LegacyRegister.X); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDPD_1(int word1) throws InvalidInstruction { // this method decodes LDPD when ar == Y int rd = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LDPD(pc, getReg(GPR_table, rd), LegacyRegister.Y); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LPMPI_0(int word1) throws InvalidInstruction { int rd = 0; int z = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> return new LegacyInstr.LPMPI(pc, getReg(GPR_table, rd), getReg(Z_table, z)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDS_0(int word1) throws InvalidInstruction { int word2 = getWord(1); int rd = 0; int addr = 0; // logical[0:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:15] -> // logical[16:31] -> addr[15:0] addr |= (word2 & 0x0FFFF); return new LegacyInstr.LDS(pc, getReg(GPR_table, rd), addr); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_23(int word1) throws InvalidInstruction { // get value of bits logical[12:15] int value = (word1) & 0x0000F; switch ( value ) { case 0x0000F: return decode_POP_0(word1); case 0x00004: return decode_LPMD_0(word1); case 0x00007: return decode_ELPMPI_0(word1); case 0x0000C: return decode_LD_0(word1); case 0x00002: return decode_LDPD_2(word1); case 0x0000D: return decode_LDPI_0(word1); case 0x00009: return decode_LDPI_1(word1); case 0x00006: return decode_ELPMD_0(word1); case 0x00001: return decode_LDPI_2(word1); case 0x0000E: return decode_LDPD_0(word1); case 0x0000A: return decode_LDPD_1(word1); case 0x00005: return decode_LPMPI_0(word1); case 0x00000: return decode_LDS_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_24(int word1) throws InvalidInstruction { // get value of bits logical[6:6] int value = (word1 >> 9) & 0x00001; switch ( value ) { case 0x00001: return decode_22(word1); case 0x00000: return decode_23(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_25(int word1) throws InvalidInstruction { // get value of bits logical[4:5] int value = (word1 >> 10) & 0x00003; switch ( value ) { case 0x00002: return decode_10(word1); case 0x00001: return decode_21(word1); case 0x00003: return decode_MUL_0(word1); case 0x00000: return decode_24(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ORI_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:3] -> // logical[4:7] -> imm[7:4] imm |= ((word1 >> 8) & 0x0000F) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.ORI(pc, getReg(HGPR_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SUB_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.SUB(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CP_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.CP(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ADC_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.ADC(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CPSE_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.CPSE(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_26(int word1) throws InvalidInstruction { // get value of bits logical[4:5] int value = (word1 >> 10) & 0x00003; switch ( value ) { case 0x00002: return decode_SUB_0(word1); case 0x00001: return decode_CP_0(word1); case 0x00003: return decode_ADC_0(word1); case 0x00000: return decode_CPSE_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDI_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:3] -> // logical[4:7] -> imm[7:4] imm |= ((word1 >> 8) & 0x0000F) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.LDI(pc, getReg(HGPR_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SUBI_0(int word1) throws InvalidInstruction { int rd = 0; int imm = 0; // logical[0:3] -> // logical[4:7] -> imm[7:4] imm |= ((word1 >> 8) & 0x0000F) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> imm[3:0] imm |= (word1 & 0x0000F); return new LegacyInstr.SUBI(pc, getReg(HGPR_table, rd), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_SBC_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.SBC(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_CPC_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.CPC(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_ADD_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:5] -> // logical[6:6] -> rr[4:4] rr |= ((word1 >> 9) & 0x00001) << 4; // logical[7:7] -> rd[4:4] rd |= ((word1 >> 8) & 0x00001) << 4; // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.ADD(pc, getReg(GPR_table, rd), getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_MULS_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:7] -> // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.MULS(pc, getReg(HGPR_table, rd), getReg(HGPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_MOVW_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:7] -> // logical[8:11] -> rd[3:0] rd |= ((word1 >> 4) & 0x0000F); // logical[12:15] -> rr[3:0] rr |= (word1 & 0x0000F); return new LegacyInstr.MOVW(pc, getReg(EGPR_table, rd), getReg(EGPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_FMULSU_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> rd[2:0] rd |= ((word1 >> 4) & 0x00007); // logical[12:12] -> // logical[13:15] -> rr[2:0] rr |= (word1 & 0x00007); return new LegacyInstr.FMULSU(pc, getReg(MGPR_table, rd), getReg(MGPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_FMULS_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> rd[2:0] rd |= ((word1 >> 4) & 0x00007); // logical[12:12] -> // logical[13:15] -> rr[2:0] rr |= (word1 & 0x00007); return new LegacyInstr.FMULS(pc, getReg(MGPR_table, rd), getReg(MGPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_27(int word1) throws InvalidInstruction { // get value of bits logical[12:12] int value = (word1 >> 3) & 0x00001; switch ( value ) { case 0x00001: return decode_FMULSU_0(word1); case 0x00000: return decode_FMULS_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_FMUL_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> rd[2:0] rd |= ((word1 >> 4) & 0x00007); // logical[12:12] -> // logical[13:15] -> rr[2:0] rr |= (word1 & 0x00007); return new LegacyInstr.FMUL(pc, getReg(MGPR_table, rd), getReg(MGPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_MULSU_0(int word1) throws InvalidInstruction { int rd = 0; int rr = 0; // logical[0:7] -> // logical[8:8] -> // logical[9:11] -> rd[2:0] rd |= ((word1 >> 4) & 0x00007); // logical[12:12] -> // logical[13:15] -> rr[2:0] rr |= (word1 & 0x00007); return new LegacyInstr.MULSU(pc, getReg(MGPR_table, rd), getReg(MGPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_28(int word1) throws InvalidInstruction { // get value of bits logical[12:12] int value = (word1 >> 3) & 0x00001; switch ( value ) { case 0x00001: return decode_FMUL_0(word1); case 0x00000: return decode_MULSU_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_29(int word1) throws InvalidInstruction { // get value of bits logical[8:8] int value = (word1 >> 7) & 0x00001; switch ( value ) { case 0x00001: return decode_27(word1); case 0x00000: return decode_28(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_NOP_0(int word1) throws InvalidInstruction { if ( (word1 & 0x000FF) != 0x00000 ) { return null; } // logical[0:7] -> // logical[8:15] -> return new LegacyInstr.NOP(pc); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_30(int word1) throws InvalidInstruction { // get value of bits logical[6:7] int value = (word1 >> 8) & 0x00003; switch ( value ) { case 0x00002: return decode_MULS_0(word1); case 0x00001: return decode_MOVW_0(word1); case 0x00003: return decode_29(word1); case 0x00000: return decode_NOP_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_31(int word1) throws InvalidInstruction { // get value of bits logical[4:5] int value = (word1 >> 10) & 0x00003; switch ( value ) { case 0x00002: return decode_SBC_0(word1); case 0x00001: return decode_CPC_0(word1); case 0x00003: return decode_ADD_0(word1); case 0x00000: return decode_30(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_root0(int word1) throws InvalidInstruction { // get value of bits logical[0:3] int value = (word1 >> 12) & 0x0000F; switch ( value ) { case 0x0000F: return decode_4(word1); case 0x00004: return decode_SBCI_0(word1); case 0x00008: return decode_7(word1); case 0x0000B: return decode_8(word1); case 0x00003: return decode_CPI_0(word1); case 0x00007: return decode_ANDI_0(word1); case 0x0000C: return decode_RJMP_0(word1); case 0x00002: return decode_9(word1); case 0x0000D: return decode_RCALL_0(word1); case 0x00009: return decode_25(word1); case 0x00006: return decode_ORI_0(word1); case 0x00001: return decode_26(word1); case 0x0000E: return decode_LDI_0(word1); case 0x00005: return decode_SUBI_0(word1); case 0x00000: return decode_31(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_STD_0(int word1) throws InvalidInstruction { int ar = 0; int imm = 0; int rr = 0; // logical[0:1] -> // logical[2:2] -> imm[5] imm = Arithmetic.setBit(imm, 5, Arithmetic.getBit(word1, 13)); // logical[3:3] -> // logical[4:5] -> imm[4:3] imm |= ((word1 >> 10) & 0x00003) << 3; // logical[6:6] -> // logical[7:11] -> rr[4:0] rr |= ((word1 >> 4) & 0x0001F); // logical[12:12] -> ar[0] ar = Arithmetic.setBit(ar, 0, Arithmetic.getBit(word1, 3)); // logical[13:15] -> imm[2:0] imm |= (word1 & 0x00007); return new LegacyInstr.STD(pc, getReg(YZ_table, ar), imm, getReg(GPR_table, rr)); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_LDD_0(int word1) throws InvalidInstruction { int rd = 0; int ar = 0; int imm = 0; // logical[0:1] -> // logical[2:2] -> imm[5] imm = Arithmetic.setBit(imm, 5, Arithmetic.getBit(word1, 13)); // logical[3:3] -> // logical[4:5] -> imm[4:3] imm |= ((word1 >> 10) & 0x00003) << 3; // logical[6:6] -> // logical[7:11] -> rd[4:0] rd |= ((word1 >> 4) & 0x0001F); // logical[12:12] -> ar[0] ar = Arithmetic.setBit(ar, 0, Arithmetic.getBit(word1, 3)); // logical[13:15] -> imm[2:0] imm |= (word1 & 0x00007); return new LegacyInstr.LDD(pc, getReg(GPR_table, rd), getReg(YZ_table, ar), imm); }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_32(int word1) throws InvalidInstruction { // get value of bits logical[6:6] int value = (word1 >> 9) & 0x00001; switch ( value ) { case 0x00001: return decode_STD_0(word1); case 0x00000: return decode_LDD_0(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_33(int word1) throws InvalidInstruction { // get value of bits logical[3:3] int value = (word1 >> 12) & 0x00001; switch ( value ) { case 0x00000: return decode_32(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
private LegacyInstr decode_root1(int word1) throws InvalidInstruction { // get value of bits logical[0:1] int value = (word1 >> 14) & 0x00003; switch ( value ) { case 0x00002: return decode_33(word1); default: return null; } }
// in src/avrora/arch/legacy/LegacyDisassembler.java
LegacyInstr decode_root(int word1) throws InvalidInstruction { LegacyInstr i = null; i = decode_root0(word1); if ( i != null ) return i; i = decode_root1(word1); if ( i != null ) return i; throw new InvalidInstruction(word1, pc); }
1
            
// in src/avrora/arch/legacy/LegacyDisassembler.java
catch ( InvalidInstruction e ) { return null; }
0 0
runtime (Domain) InvalidOperand
public static class InvalidOperand extends RuntimeException {
        /**
         * The <code>number</code> field of the <code>InvalidOperand</code> instance records which operand
         * this error refers to. For example, if the first operand was the source of the problem, then this
         * field will be set to 1.
         */
        public final int number;

        InvalidOperand(int num, String msg) {
            super("invalid operand #" + num + ": " + msg);
            number = num;
        }
    }
0 0 0 0 0 0
runtime (Domain) InvalidRegister
public static class InvalidRegister extends InvalidOperand {
        /**
         * The <code>set</code> field records the expected register set for the operand.
         */
        public final LegacyRegister.Set set;

        /**
         * The <code>register</code> field records the offending register that was found not to be in the
         * expected register set.
         */
        public final LegacyRegister register;

        public InvalidRegister(int num, LegacyRegister reg, LegacyRegister.Set s) {
            super(num, "must be one of " + s.contents);
            set = s;
            register = reg;
        }
    }
1
            
// in src/avrora/arch/legacy/LegacyInstr.java
private static LegacyRegister checkReg(int num, LegacyRegister reg, LegacyRegister.Set set) { if (set.contains(reg)) return reg; throw new InvalidRegister(num, reg, set); }
0 0 1
            
// in src/avrora/syntax/Module.java
catch (LegacyInstr.InvalidRegister e) { ERROR.IncorrectRegister(instr.operands[e.number - 1], e.register, e.set.toString()); }
0 0
runtime (Domain) LookaheadSuccess
private static class LookaheadSuccess extends Error {

    }private static final class LookaheadSuccess extends Error {

    }
0 0 0 15
            
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
catch (LookaheadSuccess ls) { }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (LookaheadSuccess ls) { return true; }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (LookaheadSuccess ls) { }
0 0
unknown (Lib) NoSuchElementException 6
            
// in src/avrora/sim/mcu/MCUProperties.java
public int getPin(String n) { Integer i = (Integer)pinAssignments.get(n); if ( i == null ) throw new NoSuchElementException(StringUtil.quote(n)+" pin not found"); return i.intValue(); }
// in src/avrora/sim/mcu/MCUProperties.java
public int getInterrupt(String n) { Integer i = (Integer)interruptAssignments.get(n); if ( i == null ) throw new NoSuchElementException(StringUtil.quote(n)+" interrupt not found"); return i.intValue(); }
// in src/avrora/sim/mcu/RegisterLayout.java
public int getIOReg(String n) { RegisterInfo i = (RegisterInfo)ioregAssignments.get(n); if ( i == null ) throw new NoSuchElementException(StringUtil.quote(n)+" IO register not found"); return i.ior_num; }
// in src/avrora/sim/clock/ClockDomain.java
public Clock getClock(String name) { Clock clock = (Clock)clockMap.get(name); if ( clock == null ) throw new NoSuchElementException(StringUtil.quote(name)+" clock not found"); return clock; }
// in src/avrora/sim/Simulation.java
public Object next() { if ( cursor >= nodes.length ) throw new NoSuchElementException(); Object o = nodes[cursor]; cursor++; scan(); return o; }
// in src/cck/stat/Sequence.java
public int next() { if (frag == currentFrag) { // we are in the last fragment, did we run off the end? if (cursor >= offset) { throw new NoSuchElementException(); } } else { // we are in an old (complete) fragment if (cursor >= fragSize) { frag = (int[]) fiter.next(); cursor = 0; } } return frag[cursor++]; }
0 0 2
            
// in src/avrora/sim/radio/TopologyStatic.java
catch (NoSuchElementException e) { throw Util.failure("Error reading topology tokens"); }
// in src/avrora/sim/radio/noise.java
catch (NoSuchElementException e) { throw Util.failure("Error reading Noise file"); }
2
            
// in src/avrora/sim/radio/TopologyStatic.java
catch (NoSuchElementException e) { throw Util.failure("Error reading topology tokens"); }
// in src/avrora/sim/radio/noise.java
catch (NoSuchElementException e) { throw Util.failure("Error reading Noise file"); }
0
runtime (Domain) NoSuchInstructionException
public static class NoSuchInstructionException extends Util.Error {
        public final int badPc;

        protected NoSuchInstructionException(int pc) {
            super("Program error", "attempt to execute non-existant instruction at " + StringUtil.addrToString(pc));
            this.badPc = pc;
        }
    }
1
            
// in src/avrora/sim/CodeSegment.java
public void accept(LegacyInstrVisitor v) { throw new InterpreterError.NoSuchInstructionException(interpreter.getState().getPC()); }
0 0 0 0 0
unknown (Lib) NumberFormatException 0 0 0 2
            
// in src/avrora/monitors/GDBServer.java
catch (NumberFormatException nfe) { // just ignore and go on }
// in src/cck/util/Option.java
catch (NumberFormatException e) { // in case of NumberFormatException parseError(name, "interval", val); }
0 0
unknown (Lib) OutOfMemoryError 0 0 0 2
            
// in src/avrora/gui/GraphEvents.java
catch (OutOfMemoryError e) { //Note that it's possible to get an out of memory exception //elsewhere, but "most probably" it will be here Terminal.println("RAN OUT OF HEAP SPACE FOR MONITOR"); Terminal.println("SIZE OF MONITORS VECTOR AT THE TIME: " + Integer.toString(privateNumbers[i].size())); }
// in src/avrora/stack/Analyzer.java
catch (OutOfMemoryError ome) { // free the reserved memory reserve = null; long check = System.currentTimeMillis(); buildTime = check - start; outOfMemory(); graph.deleteStateSets(); }
0 0
runtime (Domain) PCAlignmentException
public static class PCAlignmentException extends Util.Error {
        public final int badPc;

        protected PCAlignmentException(int pc) {
            super("Program error", "PC misaligned at " + StringUtil.addrToString(pc));
            this.badPc = pc;
        }
    }
0 0 0 0 0 0
runtime (Domain) PCOutOfBoundsException
public static class PCOutOfBoundsException extends Util.Error {
        public final int badPc;

        protected PCOutOfBoundsException(int pc) {
            super("Program error", "PC out of bounds at " + StringUtil.addrToString(pc));
            this.badPc = pc;
        }
    }
0 0 0 0 0 0
runtime (Domain) ParseException
public class ParseException extends AbstractParseException {

    /**
     * This constructor is used by the method "generateParseException" in the generated parser.  Calling this
     * constructor generates a new object of this type with the fields "currentToken",
     * "expectedTokenSequences", and "tokenImage" set.  The boolean flag "specialConstructor" is also set to
     * true to indicate that this constructor was used to create this object. This constructor calls its super
     * class with the empty string to force the "toString" method of parent class "Throwable" to print the
     * error message in the form: ParseException: <result of getMessage>
     */
    public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal) {
        super("");
        specialConstructor = true;
        currentToken = currentTokenVal;
        expectedTokenSequences = expectedTokenSequencesVal;
        tokenImage = tokenImageVal;
    }

    /**
     * The following constructors are for use by you for whatever purpose you can think of.  Constructing the
     * exception in this manner makes the exception behave in the normal way - i.e., as documented in the
     * class "Throwable".  The fields "errorToken", "expectedTokenSequences", and "tokenImage" do not contain
     * relevant information.  The JavaCC generated code does not use these constructors.
     */

    public ParseException() {
        specialConstructor = false;
    }


    /**
     * This method has the standard behavior when this object has been created using the standard
     * constructors. Otherwise, it uses "currentToken" and "expectedTokenSequences" to generate a parse error
     * message and returns it. If this object has been created due to a parse error, and you do not catch it
     * (it gets thrown from the parser), then this method is called during the printing of the final stack
     * trace, and hence the correct error message gets displayed.
     */
    public String getMessage() {
        if (!specialConstructor) {
            return super.getMessage();
        }
        String expected = "";
        int maxSize = 0;
        for (int i = 0; i < expectedTokenSequences.length; i++) {
            if (maxSize < expectedTokenSequences[i].length) {
                maxSize = expectedTokenSequences[i].length;
            }
            for (int j = 0; j < expectedTokenSequences[i].length; j++) {
                expected += tokenImage[expectedTokenSequences[i][j]] + ' ';
            }
            if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
                expected += "...";
            }
            expected += eol + "    ";
        }
        String retval = "Encountered \"";
        Token tok = ((Token)currentToken).next;
        Token next = tok;
        for (int i = 0; i < maxSize; i++) {
            if (i != 0) retval += " ";
            if (tok.kind == 0) {
                retval += tokenImage[0];
                break;
            }
            retval += add_escapes(tok.image);
            tok = tok.next;
        }
        retval += "\" at line " + next.beginLine + ", column " + next.beginColumn;
        retval += '.' + eol;
        if (expectedTokenSequences.length == 1) {
            retval += "Was expecting:" + eol + "    ";
        } else {
            retval += "Was expecting one of:" + eol + "    ";
        }
        retval += expected;
        return retval;
    }

    /**
     * Used to convert raw characters to their escaped version when these raw version cannot be used as part
     * of an ASCII string literal.
     */
    protected String add_escapes(String str) {
        StringBuffer retval = new StringBuffer();
        char ch;
        for (int i = 0; i < str.length(); i++) {
            switch (str.charAt(i)) {
                case 0:
                    continue;
                case '\b':
                    retval.append("\\b");
                    continue;
                case '\t':
                    retval.append("\\t");
                    continue;
                case '\n':
                    retval.append("\\n");
                    continue;
                case '\f':
                    retval.append("\\f");
                    continue;
                case '\r':
                    retval.append("\\r");
                    continue;
                case '\"':
                    retval.append("\\\"");
                    continue;
                case '\'':
                    retval.append("\\\'");
                    continue;
                case '\\':
                    retval.append("\\\\");
                    continue;
                default:
                    if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
                        String s = "0000" + Integer.toString(ch, 16);
                        retval.append("\\u" + s.substring(s.length() - 4, s.length()));
                    } else {
                        retval.append(ch);
                    }
            }
        }
        return retval.toString();
    }

}public class ParseException extends AbstractParseException {

    /**
     * This constructor is used by the method "generateParseException" in the generated parser.  Calling this
     * constructor generates a new object of this type with the fields "currentToken",
     * "expectedTokenSequences", and "tokenImage" set.  The boolean flag "specialConstructor" is also set to
     * true to indicate that this constructor was used to create this object. This constructor calls its super
     * class with the empty string to force the "toString" method of parent class "Throwable" to print the
     * error message in the form: ParseException: <result of getMessage>
     */
    public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal) {
        super(currentTokenVal, expectedTokenSequencesVal, tokenImageVal);
    }

    /**
     * The following constructors are for use by you for whatever purpose you can think of.  Constructing the
     * exception in this manner makes the exception behave in the normal way - i.e., as documented in the
     * class "Throwable".  The fields "errorToken", "expectedTokenSequences", and "tokenImage" do not contain
     * relevant information.  The JavaCC generated code does not use these constructors.
     */

    public ParseException() {
    }

    /**
     * This method has the standard behavior when this object has been created using the standard
     * constructors. Otherwise, it uses "currentToken" and "expectedTokenSequences" to generate a parse error
     * message and returns it. If this object has been created due to a parse error, and you do not catch it
     * (it gets thrown from the parser), then this method is called during the printing of the final stack
     * trace, and hence the correct error message gets displayed.
     */
    public String getMessage() {
        if (!specialConstructor) {
            return super.getMessage();
        }
        String expected = "";
        int maxSize = 0;
        for (int i = 0; i < expectedTokenSequences.length; i++) {
            if (maxSize < expectedTokenSequences[i].length) {
                maxSize = expectedTokenSequences[i].length;
            }
            for (int j = 0; j < expectedTokenSequences[i].length; j++) {
                expected += tokenImage[expectedTokenSequences[i][j]] + ' ';
            }
            if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
                expected += "...";
            }
            expected += eol + "    ";
        }
        String retval = "Encountered \"";
        Token tok = ((Token)currentToken).next;
        Token next = tok;
        for (int i = 0; i < maxSize; i++) {
            if (i != 0) retval += " ";
            if (tok.kind == 0) {
                retval += tokenImage[0];
                break;
            }
            retval += add_escapes(tok.image);
            tok = tok.next;
        }
        retval += "\" at line " + next.beginLine + ", column " + next.beginColumn;
        retval += '.' + eol;
        if (expectedTokenSequences.length == 1) {
            retval += "Was expecting:" + eol + "    ";
        } else {
            retval += "Was expecting one of:" + eol + "    ";
        }
        retval += expected;
        return retval;
    }

}public class ParseException extends Exception {

    /**
     * This constructor is used by the method "generateParseException" in the generated parser.  Calling this
     * constructor generates a new object of this type with the fields "currentToken",
     * "expectedTokenSequences", and "tokenImage" set.  The boolean flag "specialConstructor" is also set to
     * true to indicate that this constructor was used to create this object. This constructor calls its super
     * class with the empty string to force the "toString" method of parent class "Throwable" to print the
     * error message in the form: ParseException: <result of getMessage>
     */
    public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal) {
        super("");
        specialConstructor = true;
        currentToken = currentTokenVal;
        expectedTokenSequences = expectedTokenSequencesVal;
        tokenImage = tokenImageVal;
    }

    /**
     * The following constructors are for use by you for whatever purpose you can think of.  Constructing the
     * exception in this manner makes the exception behave in the normal way - i.e., as documented in the
     * class "Throwable".  The fields "errorToken", "expectedTokenSequences", and "tokenImage" do not contain
     * relevant information.  The JavaCC generated code does not use these constructors.
     */

    public ParseException() {
        specialConstructor = false;
    }

    public ParseException(String message) {
        super(message);
        specialConstructor = false;
    }

    /**
     * This variable determines which constructor was used to create this object and thereby affects the
     * semantics of the "getMessage" method (see below).
     */
    protected boolean specialConstructor;

    /**
     * This is the last token that has been consumed successfully.  If this object has been created due to a
     * parse error, the token followng this token will (therefore) be the first error token.
     */
    public Token currentToken;

    /**
     * Each entry in this array is an array of integers.  Each array of integers represents a sequence of
     * tokens (by their ordinal values) that is expected at this point of the parse.
     */
    public int[][] expectedTokenSequences;

    /**
     * This is a reference to the "tokenImage" array of the generated parser within which the parse error
     * occurred. This array is defined in the generated ...Constants interface.
     */
    public String[] tokenImage;

    /**
     * This method has the standard behavior when this object has been created using the standard
     * constructors. Otherwise, it uses "currentToken" and "expectedTokenSequences" to generate a parse error
     * message and returns it. If this object has been created due to a parse error, and you do not catch it
     * (it gets thrown from the parser), then this method is called during the printing of the final stack
     * trace, and hence the correct error message gets displayed.
     */
    public String getMessage() {
        if (!specialConstructor) {
            return super.getMessage();
        }
        String expected = "";
        int maxSize = 0;
        for (int i = 0; i < expectedTokenSequences.length; i++) {
            if (maxSize < expectedTokenSequences[i].length) {
                maxSize = expectedTokenSequences[i].length;
            }
            for (int j = 0; j < expectedTokenSequences[i].length; j++) {
                expected += tokenImage[expectedTokenSequences[i][j]] + ' ';
            }
            if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
                expected += "...";
            }
            expected += eol + "    ";
        }
        String retval = "Encountered \"";
        Token tok = currentToken.next;
        for (int i = 0; i < maxSize; i++) {
            if (i != 0) retval += " ";
            if (tok.kind == 0) {
                retval += tokenImage[0];
                break;
            }
            retval += add_escapes(tok.image);
            tok = tok.next;
        }
        retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
        retval += '.' + eol;
        if (expectedTokenSequences.length == 1) {
            retval += "Was expecting:" + eol + "    ";
        } else {
            retval += "Was expecting one of:" + eol + "    ";
        }
        retval += expected;
        return retval;
    }

    /**
     * The end of line string for this machine.
     */
    protected String eol = System.getProperty("line.separator", "\n");

    /**
     * Used to convert raw characters to their escaped version when these raw version cannot be used as part
     * of an ASCII string literal.
     */
    protected String add_escapes(String str) {
        StringBuffer retval = new StringBuffer();
        char ch;
        for (int i = 0; i < str.length(); i++) {
            switch (str.charAt(i)) {
                case 0:
                    continue;
                case '\b':
                    retval.append("\\b");
                    continue;
                case '\t':
                    retval.append("\\t");
                    continue;
                case '\n':
                    retval.append("\\n");
                    continue;
                case '\f':
                    retval.append("\\f");
                    continue;
                case '\r':
                    retval.append("\\r");
                    continue;
                case '\"':
                    retval.append("\\\"");
                    continue;
                case '\'':
                    retval.append("\\\'");
                    continue;
                case '\\':
                    retval.append("\\\\");
                    continue;
                default:
                    if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
                        String s = "0000" + Integer.toString(ch, 16);
                        retval.append("\\u" + s.substring(s.length() - 4, s.length()));
                    } else {
                        retval.append(ch);
                    }
            }
        }
        return retval.toString();
    }

}
69
            
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Statement() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LABEL: Label(); break; case INTEGER_LITERAL: Item(); break; default: jj_la1[4] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Item() throws ParseException { Token addr; addr = jj_consume_token(INTEGER_LITERAL); jj_consume_token(154); rawModule.setAddress(addr); RawData(); rawModule.setAddress(addr); switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case ADIW: case AND: case ANDI: case ASR: case BCLR: case BLD: case BRBC: case BRBS: case BRCC: case BRCS: case BREAK: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case BST: case CALL: case CBI: case CBR: case CLC: case CLH: case CLI: case CLN: case CLR: case CLS: case CLT: case CLV: case CLZ: case COM: case CP: case CPC: case CPI: case CPSE: case DEC: case EICALL: case EIJMP: case ELPM: case EOR: case FMUL: case FMULS: case FMULSU: case ICALL: case IJMP: case IN: case INC: case JMP: case LD: case LDD: case LDI: case LDS: case LPM: case LSL: case LSR: case MOV: case MOVW: case MUL: case MULS: case MULSU: case NEG: case NOP: case OR: case ORI: case OUT: case POP: case PUSH: case RCALL: case RET: case RETI: case RJMP: case ROL: case ROR: case SBC: case SBCI: case SBI: case SBIC: case SBIS: case SBIW: case SBR: case SBRC: case SBRS: case SEC: case SEH: case SEI: case SEN: case SER: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case ST: case STD: case STS: case SUB: case SUBI: case SWAP: case TST: case WDR: Instruction(); break; case WORD: Data(); break; default: jj_la1[5] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void RawData() throws ParseException { if (jj_2_1(3)) { Raw4(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: Raw2(); break; default: jj_la1[6] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Instruction() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case AND: case CP: case CPC: case CPSE: case EOR: case FMUL: case FMULS: case FMULSU: case MOV: case MOVW: case MUL: case MULS: case MULSU: case OR: case SBC: case SUB: InstrGPRGPR(); break; case ASR: case CLR: case COM: case DEC: case INC: case LSL: case LSR: case NEG: case POP: case PUSH: case ROL: case ROR: case SER: case SWAP: case TST: InstrGPR(); break; case ADIW: case ANDI: case BLD: case BST: case CBR: case CPI: case ORI: case SBCI: case SBIW: case SBR: case SBRC: case SBRS: case SUBI: InstrGPRIMM(); break; case IN: InstrInput(); break; case OUT: InstrOutput(); break; case BCLR: case BRCC: case BRCS: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case CALL: case JMP: case RCALL: case RJMP: InstrIMM(); break; case BRBC: case BRBS: case CBI: case SBI: case SBIC: case SBIS: InstrIMMIMM(); break; case BREAK: case CLC: case CLH: case CLI: case CLN: case CLS: case CLT: case CLV: case CLZ: case EICALL: case EIJMP: case ICALL: case IJMP: case NOP: case RET: case RETI: case SEC: case SEH: case SEI: case SEN: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case WDR: InstrBARE(); break; case ELPM: case LD: case LDD: case LDI: case LDS: case LPM: InstrLoad(); break; case ST: case STD: case STS: InstrStore(); break; default: jj_la1[7] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeGPRGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: t = jj_consume_token(ADD); break; case ADC: t = jj_consume_token(ADC); break; case SUB: t = jj_consume_token(SUB); break; case SBC: t = jj_consume_token(SBC); break; case AND: t = jj_consume_token(AND); break; case OR: t = jj_consume_token(OR); break; case EOR: t = jj_consume_token(EOR); break; case MUL: t = jj_consume_token(MUL); break; case MULS: t = jj_consume_token(MULS); break; case MULSU: t = jj_consume_token(MULSU); break; case FMUL: t = jj_consume_token(FMUL); break; case FMULS: t = jj_consume_token(FMULS); break; case FMULSU: t = jj_consume_token(FMULSU); break; case CPSE: t = jj_consume_token(CPSE); break; case CP: t = jj_consume_token(CP); break; case CPC: t = jj_consume_token(CPC); break; case MOV: t = jj_consume_token(MOV); break; case MOVW: t = jj_consume_token(MOVW); break; default: jj_la1[8] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case COM: t = jj_consume_token(COM); break; case NEG: t = jj_consume_token(NEG); break; case INC: t = jj_consume_token(INC); break; case DEC: t = jj_consume_token(DEC); break; case TST: t = jj_consume_token(TST); break; case CLR: t = jj_consume_token(CLR); break; case SER: t = jj_consume_token(SER); break; case PUSH: t = jj_consume_token(PUSH); break; case POP: t = jj_consume_token(POP); break; case LSL: t = jj_consume_token(LSL); break; case LSR: t = jj_consume_token(LSR); break; case ROL: t = jj_consume_token(ROL); break; case ROR: t = jj_consume_token(ROR); break; case ASR: t = jj_consume_token(ASR); break; case SWAP: t = jj_consume_token(SWAP); break; default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeGPRIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADIW: t = jj_consume_token(ADIW); break; case SUBI: t = jj_consume_token(SUBI); break; case SBCI: t = jj_consume_token(SBCI); break; case SBIW: t = jj_consume_token(SBIW); break; case ANDI: t = jj_consume_token(ANDI); break; case ORI: t = jj_consume_token(ORI); break; case SBR: t = jj_consume_token(SBR); break; case CBR: t = jj_consume_token(CBR); break; case CPI: t = jj_consume_token(CPI); break; case SBRC: t = jj_consume_token(SBRC); break; case SBRS: t = jj_consume_token(SBRS); break; case BST: t = jj_consume_token(BST); break; case BLD: t = jj_consume_token(BLD); break; default: jj_la1[10] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case RJMP: t = jj_consume_token(RJMP); break; case JMP: t = jj_consume_token(JMP); break; case RCALL: t = jj_consume_token(RCALL); break; case CALL: t = jj_consume_token(CALL); break; case BREQ: t = jj_consume_token(BREQ); break; case BRNE: t = jj_consume_token(BRNE); break; case BRCS: t = jj_consume_token(BRCS); break; case BRCC: t = jj_consume_token(BRCC); break; case BRSH: t = jj_consume_token(BRSH); break; case BRLO: t = jj_consume_token(BRLO); break; case BRMI: t = jj_consume_token(BRMI); break; case BRPL: t = jj_consume_token(BRPL); break; case BRGE: t = jj_consume_token(BRGE); break; case BRLT: t = jj_consume_token(BRLT); break; case BRHS: t = jj_consume_token(BRHS); break; case BRHC: t = jj_consume_token(BRHC); break; case BRTS: t = jj_consume_token(BRTS); break; case BRTC: t = jj_consume_token(BRTC); break; case BRVS: t = jj_consume_token(BRVS); break; case BRVC: t = jj_consume_token(BRVC); break; case BRIE: t = jj_consume_token(BRIE); break; case BRID: t = jj_consume_token(BRID); break; case BSET: t = jj_consume_token(BSET); break; case BCLR: t = jj_consume_token(BCLR); break; default: jj_la1[11] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeIMMIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case SBIC: t = jj_consume_token(SBIC); break; case SBIS: t = jj_consume_token(SBIS); break; case BRBS: t = jj_consume_token(BRBS); break; case BRBC: t = jj_consume_token(BRBC); break; case SBI: t = jj_consume_token(SBI); break; case CBI: t = jj_consume_token(CBI); break; default: jj_la1[12] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLoad() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LDI: InstrLDI(); break; case LD: InstrLD_variant(); break; case LDD: InstrLDD(); break; case LDS: InstrLDS(); break; case ELPM: case LPM: InstrLPM_variant(); break; default: jj_la1[13] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLD_variant() throws ParseException { if (jj_2_2(5)) { InstrLDPI(); } else if (jj_2_3(4)) { InstrLDPD(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LD: InstrLD(); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLPM_variant() throws ParseException { if (jj_2_4(5)) { InstrLPMGPRGPRP(); } else if (jj_2_5(3)) { InstrLPMGPRGPR(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ELPM: case LPM: InstrLPMBARE(); break; default: jj_la1[15] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeLPM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LPM: t = jj_consume_token(LPM); break; case ELPM: t = jj_consume_token(ELPM); break; default: jj_la1[16] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrStore() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrST_variant(); break; case STD: InstrSTD(); break; case STS: InstrSTS(); break; default: jj_la1[17] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrST_variant() throws ParseException { if (jj_2_6(3)) { InstrST(); } else if (jj_2_7(3)) { InstrSTPI(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrSTPD(); break; default: jj_la1[18] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrBARE() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IJMP: t = jj_consume_token(IJMP); break; case ICALL: t = jj_consume_token(ICALL); break; case RET: t = jj_consume_token(RET); break; case RETI: t = jj_consume_token(RETI); break; case SEC: t = jj_consume_token(SEC); break; case CLC: t = jj_consume_token(CLC); break; case SEN: t = jj_consume_token(SEN); break; case CLN: t = jj_consume_token(CLN); break; case SEZ: t = jj_consume_token(SEZ); break; case CLZ: t = jj_consume_token(CLZ); break; case SEI: t = jj_consume_token(SEI); break; case CLI: t = jj_consume_token(CLI); break; case SES: t = jj_consume_token(SES); break; case CLS: t = jj_consume_token(CLS); break; case SEV: t = jj_consume_token(SEV); break; case CLV: t = jj_consume_token(CLV); break; case SET: t = jj_consume_token(SET); break; case CLT: t = jj_consume_token(CLT); break; case SEH: t = jj_consume_token(SEH); break; case CLH: t = jj_consume_token(CLH); break; case NOP: t = jj_consume_token(NOP); break; case SLEEP: t = jj_consume_token(SLEEP); break; case WDR: t = jj_consume_token(WDR); break; case BREAK: t = jj_consume_token(BREAK); break; case SPM: t = jj_consume_token(SPM); break; case EIJMP: t = jj_consume_token(EIJMP); break; case EICALL: t = jj_consume_token(EICALL); break; default: jj_la1[19] = jj_gen; jj_consume_token(-1); throw new ParseException(); } module.addInstruction(t.image, t); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public SyntacticOperand.Expr Const() throws ParseException { Expr e; if (jj_2_8(2147483647)) { e = RelExpr(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case IDENTIFIER: e = Term(); break; default: jj_la1[20] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } return module.newOperand(e); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Expr Term() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IDENTIFIER: tok = jj_consume_token(IDENTIFIER); e = new Expr.Variable(tok); break; case INTEGER_LITERAL: tok = jj_consume_token(INTEGER_LITERAL); e = new Expr.Constant(tok); break; default: jj_la1[21] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token BinOp() throws ParseException { Token tok; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 157: tok = jj_consume_token(157); break; case 158: tok = jj_consume_token(158); break; default: jj_la1[22] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return tok; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Module() throws ParseException { label_1: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case ADIW: case AND: case ANDI: case ASR: case BCLR: case BLD: case BRBC: case BRBS: case BRCC: case BRCS: case BREAK: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case BST: case CALL: case CBI: case CBR: case CLC: case CLH: case CLI: case CLN: case CLR: case CLS: case CLT: case CLV: case CLZ: case COM: case CP: case CPC: case CPI: case CPSE: case DEC: case EICALL: case EIJMP: case ELPM: case EOR: case FMUL: case FMULS: case FMULSU: case ICALL: case IJMP: case IN: case INC: case JMP: case LD: case LDD: case LDI: case LDS: case LPM: case LSL: case LSR: case MOV: case MOVW: case MUL: case MULS: case MULSU: case NEG: case NOP: case OR: case ORI: case OUT: case POP: case PUSH: case RCALL: case RET: case RETI: case RJMP: case ROL: case ROR: case SBC: case SBCI: case SBI: case SBIC: case SBIS: case SBIW: case SBR: case SBRC: case SBRS: case SEC: case SEH: case SEI: case SEN: case SER: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case ST: case STD: case STS: case SUB: case SUBI: case SWAP: case TST: case WDR: case IDENTIFIER: case 149: case 151: case 152: case 153: case 154: case 155: case 156: case 157: case 159: case 160: case 161: case 162: case 163: break; default: jj_la1[0] = jj_gen; break label_1; } Statement(); } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 0: jj_consume_token(0); break; case 158: ExitDirective(); break; default: jj_la1[1] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Statement() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 149: case 151: case 152: case 153: case 154: case 155: case 156: case 157: case 159: case 160: case 161: case 162: case 163: Directive(); break; case ADD: case ADC: case ADIW: case AND: case ANDI: case ASR: case BCLR: case BLD: case BRBC: case BRBS: case BRCC: case BRCS: case BREAK: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case BST: case CALL: case CBI: case CBR: case CLC: case CLH: case CLI: case CLN: case CLR: case CLS: case CLT: case CLV: case CLZ: case COM: case CP: case CPC: case CPI: case CPSE: case DEC: case EICALL: case EIJMP: case ELPM: case EOR: case FMUL: case FMULS: case FMULSU: case ICALL: case IJMP: case IN: case INC: case JMP: case LD: case LDD: case LDI: case LDS: case LPM: case LSL: case LSR: case MOV: case MOVW: case MUL: case MULS: case MULSU: case NEG: case NOP: case OR: case ORI: case OUT: case POP: case PUSH: case RCALL: case RET: case RETI: case RJMP: case ROL: case ROR: case SBC: case SBCI: case SBI: case SBIC: case SBIS: case SBIW: case SBR: case SBRC: case SBRS: case SEC: case SEH: case SEI: case SEN: case SER: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case ST: case STD: case STS: case SUB: case SUBI: case SWAP: case TST: case WDR: Instruction(); break; case IDENTIFIER: Label(); break; default: jj_la1[2] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Directive() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 149: EquDirective(); break; case 151: OrgDirective(); break; case 152: ReserveDirective(); break; case 153: case 154: case 155: DataDirective(); break; case 156: DefDirective(); break; case 157: IncludeDirective(); break; case 159: NoListDirective(); break; case 160: ListDirective(); break; case 161: case 162: case 163: SegDirective(); break; default: jj_la1[3] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Instruction() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case AND: case CP: case CPC: case CPSE: case EOR: case FMUL: case FMULS: case FMULSU: case MOV: case MOVW: case MUL: case MULS: case MULSU: case OR: case SBC: case SUB: InstrGPRGPR(); break; case ASR: case CLR: case COM: case DEC: case INC: case LSL: case LSR: case NEG: case POP: case PUSH: case ROL: case ROR: case SER: case SWAP: case TST: InstrGPR(); break; case ADIW: case ANDI: case BLD: case BST: case CBR: case CPI: case ORI: case SBCI: case SBIW: case SBR: case SBRC: case SBRS: case SUBI: InstrGPRIMM(); break; case BCLR: case BRCC: case BRCS: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case CALL: case JMP: case RCALL: case RJMP: InstrIMM(); break; case BRBC: case BRBS: case CBI: case SBI: case SBIC: case SBIS: InstrIMMIMM(); break; case BREAK: case CLC: case CLH: case CLI: case CLN: case CLS: case CLT: case CLV: case CLZ: case EICALL: case EIJMP: case ICALL: case IJMP: case NOP: case RET: case RETI: case SEC: case SEH: case SEI: case SEN: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case WDR: InstrBARE(); break; case ELPM: case LD: case LDD: case LDI: case LDS: case LPM: InstrLoad(); break; case ST: case STD: case STS: InstrStore(); break; case IN: InstrInput(); break; case OUT: InstrOutput(); break; default: jj_la1[4] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeGPRGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: t = jj_consume_token(ADD); break; case ADC: t = jj_consume_token(ADC); break; case SUB: t = jj_consume_token(SUB); break; case SBC: t = jj_consume_token(SBC); break; case AND: t = jj_consume_token(AND); break; case OR: t = jj_consume_token(OR); break; case EOR: t = jj_consume_token(EOR); break; case MUL: t = jj_consume_token(MUL); break; case MULS: t = jj_consume_token(MULS); break; case MULSU: t = jj_consume_token(MULSU); break; case FMUL: t = jj_consume_token(FMUL); break; case FMULS: t = jj_consume_token(FMULS); break; case FMULSU: t = jj_consume_token(FMULSU); break; case CPSE: t = jj_consume_token(CPSE); break; case CP: t = jj_consume_token(CP); break; case CPC: t = jj_consume_token(CPC); break; case MOV: t = jj_consume_token(MOV); break; case MOVW: t = jj_consume_token(MOVW); break; default: jj_la1[5] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case COM: t = jj_consume_token(COM); break; case NEG: t = jj_consume_token(NEG); break; case INC: t = jj_consume_token(INC); break; case DEC: t = jj_consume_token(DEC); break; case TST: t = jj_consume_token(TST); break; case CLR: t = jj_consume_token(CLR); break; case SER: t = jj_consume_token(SER); break; case PUSH: t = jj_consume_token(PUSH); break; case POP: t = jj_consume_token(POP); break; case LSL: t = jj_consume_token(LSL); break; case LSR: t = jj_consume_token(LSR); break; case ROL: t = jj_consume_token(ROL); break; case ROR: t = jj_consume_token(ROR); break; case ASR: t = jj_consume_token(ASR); break; case SWAP: t = jj_consume_token(SWAP); break; default: jj_la1[6] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeGPRIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADIW: t = jj_consume_token(ADIW); break; case SUBI: t = jj_consume_token(SUBI); break; case SBCI: t = jj_consume_token(SBCI); break; case SBIW: t = jj_consume_token(SBIW); break; case ANDI: t = jj_consume_token(ANDI); break; case ORI: t = jj_consume_token(ORI); break; case SBR: t = jj_consume_token(SBR); break; case CBR: t = jj_consume_token(CBR); break; case CPI: t = jj_consume_token(CPI); break; case SBRC: t = jj_consume_token(SBRC); break; case SBRS: t = jj_consume_token(SBRS); break; case BST: t = jj_consume_token(BST); break; case BLD: t = jj_consume_token(BLD); break; default: jj_la1[7] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case RJMP: t = jj_consume_token(RJMP); break; case JMP: t = jj_consume_token(JMP); break; case RCALL: t = jj_consume_token(RCALL); break; case CALL: t = jj_consume_token(CALL); break; case BREQ: t = jj_consume_token(BREQ); break; case BRNE: t = jj_consume_token(BRNE); break; case BRCS: t = jj_consume_token(BRCS); break; case BRCC: t = jj_consume_token(BRCC); break; case BRSH: t = jj_consume_token(BRSH); break; case BRLO: t = jj_consume_token(BRLO); break; case BRMI: t = jj_consume_token(BRMI); break; case BRPL: t = jj_consume_token(BRPL); break; case BRGE: t = jj_consume_token(BRGE); break; case BRLT: t = jj_consume_token(BRLT); break; case BRHS: t = jj_consume_token(BRHS); break; case BRHC: t = jj_consume_token(BRHC); break; case BRTS: t = jj_consume_token(BRTS); break; case BRTC: t = jj_consume_token(BRTC); break; case BRVS: t = jj_consume_token(BRVS); break; case BRVC: t = jj_consume_token(BRVC); break; case BRIE: t = jj_consume_token(BRIE); break; case BRID: t = jj_consume_token(BRID); break; case BSET: t = jj_consume_token(BSET); break; case BCLR: t = jj_consume_token(BCLR); break; default: jj_la1[8] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeIMMIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case SBIC: t = jj_consume_token(SBIC); break; case SBIS: t = jj_consume_token(SBIS); break; case BRBS: t = jj_consume_token(BRBS); break; case BRBC: t = jj_consume_token(BRBC); break; case SBI: t = jj_consume_token(SBI); break; case CBI: t = jj_consume_token(CBI); break; default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLoad() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LDI: InstrLDI(); break; case LD: InstrLD_variant(); break; case LDD: InstrLDD(); break; case LDS: InstrLDS(); break; case ELPM: case LPM: InstrLPM_variant(); break; default: jj_la1[10] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLD_variant() throws ParseException { if (jj_2_1(5)) { InstrLDPI(); } else if (jj_2_2(4)) { InstrLDPD(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LD: InstrLD(); break; default: jj_la1[11] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLPM_variant() throws ParseException { if (jj_2_3(5)) { InstrLPMGPRGPRP(); } else if (jj_2_4(3)) { InstrLPMGPRGPR(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ELPM: case LPM: InstrLPMBARE(); break; default: jj_la1[12] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeLPM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LPM: t = jj_consume_token(LPM); break; case ELPM: t = jj_consume_token(ELPM); break; default: jj_la1[13] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrStore() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrST_variant(); break; case STD: InstrSTD(); break; case STS: InstrSTS(); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrST_variant() throws ParseException { if (jj_2_5(3)) { InstrST(); } else if (jj_2_6(3)) { InstrSTPI(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrSTPD(); break; default: jj_la1[15] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrBARE() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IJMP: t = jj_consume_token(IJMP); break; case ICALL: t = jj_consume_token(ICALL); break; case RET: t = jj_consume_token(RET); break; case RETI: t = jj_consume_token(RETI); break; case SEC: t = jj_consume_token(SEC); break; case CLC: t = jj_consume_token(CLC); break; case SEN: t = jj_consume_token(SEN); break; case CLN: t = jj_consume_token(CLN); break; case SEZ: t = jj_consume_token(SEZ); break; case CLZ: t = jj_consume_token(CLZ); break; case SEI: t = jj_consume_token(SEI); break; case CLI: t = jj_consume_token(CLI); break; case SES: t = jj_consume_token(SES); break; case CLS: t = jj_consume_token(CLS); break; case SEV: t = jj_consume_token(SEV); break; case CLV: t = jj_consume_token(CLV); break; case SET: t = jj_consume_token(SET); break; case CLT: t = jj_consume_token(CLT); break; case SEH: t = jj_consume_token(SEH); break; case CLH: t = jj_consume_token(CLH); break; case NOP: t = jj_consume_token(NOP); break; case SLEEP: t = jj_consume_token(SLEEP); break; case WDR: t = jj_consume_token(WDR); break; case BREAK: t = jj_consume_token(BREAK); break; case SPM: t = jj_consume_token(SPM); break; case EIJMP: t = jj_consume_token(EIJMP); break; case EICALL: t = jj_consume_token(EICALL); break; default: jj_la1[16] = jj_gen; jj_consume_token(-1); throw new ParseException(); } module.addInstruction(t.image, t); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void DataDirective() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 153: ByteDirective(); break; case 154: WordDirective(); break; case 155: DoubleWordDirective(); break; default: jj_la1[17] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void SegDirective() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 161: jj_consume_token(161); module.enterDataSegment(); break; case 162: jj_consume_token(162); module.enterProgramSegment(); break; case 163: jj_consume_token(163); module.enterEEPROMSegment(); break; default: jj_la1[18] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr Data() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case LOW: case HIGH: case LO8: case HI8: case BYTE2: case BYTE3: case BYTE4: case LWRD: case HWRD: case PAGE: case EXP2: case LOG2: case IDENTIFIER: case 147: case 179: case 180: case 181: e = Expr(); break; case STRING_LITERAL: tok = jj_consume_token(STRING_LITERAL); e = new Expr.StringLiteral(tok); break; default: jj_la1[20] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr EqExpr() throws ParseException { Token tok; Expr e, er; e = RelExpr(); label_8: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 169: case 170: break; default: jj_la1[26] = jj_gen; break label_8; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 169: tok = jj_consume_token(169); break; case 170: tok = jj_consume_token(170); break; default: jj_la1[27] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = RelExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr RelExpr() throws ParseException { Token tok; Expr e, er; e = ShiftExpr(); label_9: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 171: case 172: case 173: case 174: break; default: jj_la1[28] = jj_gen; break label_9; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 171: tok = jj_consume_token(171); break; case 172: tok = jj_consume_token(172); break; case 173: tok = jj_consume_token(173); break; case 174: tok = jj_consume_token(174); break; default: jj_la1[29] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = ShiftExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr ShiftExpr() throws ParseException { Token tok; Expr e, er; e = AddExpr(); label_10: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 175: case 176: break; default: jj_la1[30] = jj_gen; break label_10; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 175: tok = jj_consume_token(175); break; case 176: tok = jj_consume_token(176); break; default: jj_la1[31] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = AddExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr AddExpr() throws ParseException { Token tok; Expr e, er; e = MulExpr(); label_11: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 146: case 147: break; default: jj_la1[32] = jj_gen; break label_11; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 146: tok = jj_consume_token(146); break; case 147: tok = jj_consume_token(147); break; default: jj_la1[33] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = MulExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr MulExpr() throws ParseException { Token tok; Expr e, er; e = UnaryExpr(); label_12: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 177: case 178: break; default: jj_la1[34] = jj_gen; break label_12; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 177: tok = jj_consume_token(177); break; case 178: tok = jj_consume_token(178); break; default: jj_la1[35] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = UnaryExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr UnaryExpr() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 147: case 179: case 180: switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 179: tok = jj_consume_token(179); break; case 180: tok = jj_consume_token(180); break; case 147: tok = jj_consume_token(147); break; default: jj_la1[36] = jj_gen; jj_consume_token(-1); throw new ParseException(); } e = UnaryExpr(); e = new Expr.UnOp(tok, e); break; case INTEGER_LITERAL: case LOW: case HIGH: case LO8: case HI8: case BYTE2: case BYTE3: case BYTE4: case LWRD: case HWRD: case PAGE: case EXP2: case LOG2: case IDENTIFIER: case 181: e = Term(); break; default: jj_la1[37] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr Term() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IDENTIFIER: tok = jj_consume_token(IDENTIFIER); e = new Expr.Variable(tok); break; case LOW: case HIGH: case LO8: case HI8: case BYTE2: case BYTE3: case BYTE4: case LWRD: case HWRD: case PAGE: case EXP2: case LOG2: e = Func(); break; case INTEGER_LITERAL: tok = jj_consume_token(INTEGER_LITERAL); e = new Expr.Constant(tok); break; case 181: jj_consume_token(181); e = Expr(); jj_consume_token(182); break; default: jj_la1[38] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token FuncName() throws ParseException { Token tok; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LOW: tok = jj_consume_token(LOW); break; case HIGH: tok = jj_consume_token(HIGH); break; case LO8: tok = jj_consume_token(LO8); break; case HI8: tok = jj_consume_token(HI8); break; case BYTE2: tok = jj_consume_token(BYTE2); break; case BYTE3: tok = jj_consume_token(BYTE3); break; case BYTE4: tok = jj_consume_token(BYTE4); break; case LWRD: tok = jj_consume_token(LWRD); break; case HWRD: tok = jj_consume_token(HWRD); break; case PAGE: tok = jj_consume_token(PAGE); break; case EXP2: tok = jj_consume_token(EXP2); break; case LOG2: tok = jj_consume_token(LOG2); break; default: jj_la1[39] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return tok; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void Item() throws ParseException { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INSTRUCTION: case PSEUDO: Instruction(); break; case ENUM: Enum(); break; case ENUM_SUB: EnumSubset(); break; case FORMAT: FormatDecl(); break; case OPERAND_TYPE: OperandTypeDecl(); break; case SUBROUTINE: case INLINE: case EXTERNAL: Subroutine(); break; case ADDR_MODE: AddrModeDecl(); break; case ADDR_SET: AddrSetDecl(); break; case GLOBAL: Global(); break; default: jj_la1[1] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public Token Value() throws ParseException { Token t; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case STRING_LITERAL: t = jj_consume_token(STRING_LITERAL); break; case IDENTIFIER: t = jj_consume_token(IDENTIFIER); break; case BOOLEAN_LITERAL: t = jj_consume_token(BOOLEAN_LITERAL); break; case INTEGER_LITERAL: t = jj_consume_token(INTEGER_LITERAL); break; default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void AddrModeDecl() throws ParseException { Token n; AddrModeDecl amd; Property p; List<AddrModeDecl.Operand> o; FormatDecl e; jj_consume_token(ADDR_MODE); n = jj_consume_token(IDENTIFIER); o = Operands(); amd = new AddrModeDecl(n, o); jj_consume_token(LBRACKET); label_6: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ENCODING: case PROPERTY: break; default: jj_la1[10] = jj_gen; break label_6; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PROPERTY: p = Property(null); amd.addProperty(p); break; case ENCODING: e = Encoding(n); amd.addEncoding(e); break; default: jj_la1[11] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACKET); arch.addAddressingMode(amd); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void OperandTypeDecl() throws ParseException { Token n; OperandTypeDecl d; jj_consume_token(OPERAND_TYPE); n = jj_consume_token(IDENTIFIER); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 79: d = SimpleOperandType(n); break; case LBRACKET: d = CompoundOperandType(n); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } arch.addOperand(d); }
// in src/jintgen/isdl/parser/ISDLParser.java
public OperandTypeDecl SimpleOperandType(Token n) throws ParseException { TypeRef t; Token b, l = null, h = null; OperandTypeDecl d; jj_consume_token(79); b = jj_consume_token(INTEGER_LITERAL); jj_consume_token(80); jj_consume_token(78); t = Type(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 79: jj_consume_token(79); l = jj_consume_token(INTEGER_LITERAL); jj_consume_token(COMMA); h = jj_consume_token(INTEGER_LITERAL); jj_consume_token(80); break; default: jj_la1[15] = jj_gen; } d = new OperandTypeDecl.Value(n, b, t, l, h); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LBRACKET: OperandBody(d); break; case SEMI: jj_consume_token(SEMI); break; default: jj_la1[16] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return d; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void OperandBody(OperandTypeDecl td) throws ParseException { jj_consume_token(LBRACKET); label_8: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case READ: case WRITE: case 81: break; default: jj_la1[17] = jj_gen; break label_8; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case READ: ReadMethod(td); break; case WRITE: WriteMethod(td); break; case 81: SubOperand(td); break; default: jj_la1[18] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACKET); }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl Format(Token n) throws ParseException { Token pr = null; FormatDecl d; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PRIORITY: jj_consume_token(PRIORITY); pr = jj_consume_token(INTEGER_LITERAL); break; default: jj_la1[19] = jj_gen; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: d = DerivedFormat(pr, n); break; case LBRACKET: d = NewFormat(pr, n); break; default: jj_la1[20] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return d; }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl DerivedFormat(Token pr, Token n) throws ParseException { Token p; List<FormatDecl.Substitution> l = new LinkedList<FormatDecl.Substitution>(); p = jj_consume_token(IDENTIFIER); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case WHERE: jj_consume_token(WHERE); l = SubstitutionList(); break; case SEMI: jj_consume_token(SEMI); break; default: jj_la1[21] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return new FormatDecl.Derived(n, pr, p, l); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void Subroutine() throws ParseException { boolean i = false; Token m; TypeRef r; List<SubroutineDecl.Parameter> f; List<Stmt> l = new LinkedList<Stmt>(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case SUBROUTINE: case INLINE: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INLINE: jj_consume_token(INLINE); i = true; break; default: jj_la1[25] = jj_gen; } jj_consume_token(SUBROUTINE); m = jj_consume_token(IDENTIFIER); jj_consume_token(LPAREN); f = Params(); jj_consume_token(RPAREN); jj_consume_token(78); r = Type(); Block(l); arch.addSubroutine(new SubroutineDecl(i, m, f, r, l)); break; case EXTERNAL: jj_consume_token(EXTERNAL); jj_consume_token(SUBROUTINE); m = jj_consume_token(IDENTIFIER); jj_consume_token(LPAREN); f = Params(); jj_consume_token(RPAREN); jj_consume_token(78); r = Type(); jj_consume_token(SEMI); arch.addSubroutine(new SubroutineDecl(i, m, f, r, null)); break; default: jj_la1[26] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Term() throws ParseException { Expr e; if (jj_2_1(2)) { e = CallExpr(); } else if (jj_2_2(2)) { e = DotExpr(); } else { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: e = VarUse(); break; case INTEGER_LITERAL: case BOOLEAN_LITERAL: e = Literal(); break; case READ: e = ReadExpr(); break; case LPAREN: jj_consume_token(LPAREN); e = Expr(); jj_consume_token(RPAREN); break; default: jj_la1[30] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } label_13: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 79: break; default: jj_la1[31] = jj_gen; break label_13; } e = Index(e); } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 78: e = Conversion(e); break; default: jj_la1[32] = jj_gen; } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Literal() throws ParseException { Token t; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: t = jj_consume_token(INTEGER_LITERAL); return new Literal.IntExpr(t); case BOOLEAN_LITERAL: t = jj_consume_token(BOOLEAN_LITERAL); return new Literal.BoolExpr(t); default: jj_la1[33] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public Stmt Statement() throws ParseException { Stmt s; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LOCAL: s = LocalDecl(); break; case IF: s = IfStatement(); break; default: jj_la1[36] = jj_gen; if (jj_2_3(2147483647)) { s = Assignment(); } else { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: s = CallStmt(); break; case RETURN: s = ReturnStmt(); break; case WRITE: s = WriteStmt(); break; default: jj_la1[37] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } return s; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void SingleStatement(List<Stmt> l) throws ParseException { Stmt s; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case READ: case WRITE: case LOCAL: case IF: case RETURN: case BOOLEAN_LITERAL: case LPAREN: case ADD: case SUB: case NOT: case B_COMP: case IDENTIFIER: s = Statement(); l.add(s); break; case LBRACKET: Block(l); break; default: jj_la1[40] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Index(Expr e) throws ParseException { Expr et; Token t1, t2; jj_consume_token(79); if (jj_2_4(2)) { t1 = jj_consume_token(INTEGER_LITERAL); jj_consume_token(78); t2 = jj_consume_token(INTEGER_LITERAL); e = new FixedRangeExpr(e, t1, t2); } else { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case READ: case BOOLEAN_LITERAL: case LPAREN: case ADD: case SUB: case NOT: case B_COMP: case IDENTIFIER: et = Expr(); e = new IndexExpr(e, et); break; default: jj_la1[42] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(80); return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Equ_Expr() throws ParseException { Expr e, et; Token tok; e = Rel_Expr(); label_21: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case EQUAL: case NOTEQUAL: break; default: jj_la1[49] = jj_gen; break label_21; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case EQUAL: tok = jj_consume_token(EQUAL); break; case NOTEQUAL: tok = jj_consume_token(NOTEQUAL); break; default: jj_la1[50] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Rel_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Rel_Expr() throws ParseException { Expr e, et; Token tok; e = Shift_Expr(); label_22: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LESS: case LESSEQ: case GREATER: case GREATEREQ: break; default: jj_la1[51] = jj_gen; break label_22; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LESS: tok = jj_consume_token(LESS); break; case GREATER: tok = jj_consume_token(GREATER); break; case LESSEQ: tok = jj_consume_token(LESSEQ); break; case GREATEREQ: tok = jj_consume_token(GREATEREQ); break; default: jj_la1[52] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Shift_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Shift_Expr() throws ParseException { Expr e, et; Token tok; e = Add_Expr(); label_23: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case SHIFTLEFT: case SHIFTRIGHT: break; default: jj_la1[53] = jj_gen; break label_23; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case SHIFTLEFT: tok = jj_consume_token(SHIFTLEFT); break; case SHIFTRIGHT: tok = jj_consume_token(SHIFTRIGHT); break; default: jj_la1[54] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Add_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Add_Expr() throws ParseException { Expr e, et; Token tok; e = Mul_Expr(); label_24: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: case SUB: break; default: jj_la1[55] = jj_gen; break label_24; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: tok = jj_consume_token(ADD); break; case SUB: tok = jj_consume_token(SUB); break; default: jj_la1[56] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Mul_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Mul_Expr() throws ParseException { Expr e, et; Token tok; e = Un_Expr(); label_25: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case MUL: case DIV: case MOD: break; default: jj_la1[57] = jj_gen; break label_25; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case MUL: tok = jj_consume_token(MUL); break; case DIV: tok = jj_consume_token(DIV); break; case MOD: tok = jj_consume_token(MOD); break; default: jj_la1[58] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Un_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Un_Expr() throws ParseException { Expr e; Token tok; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: case SUB: case NOT: case B_COMP: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case B_COMP: tok = jj_consume_token(B_COMP); break; case NOT: tok = jj_consume_token(NOT); break; case SUB: tok = jj_consume_token(SUB); break; case ADD: tok = jj_consume_token(ADD); break; default: jj_la1[59] = jj_gen; jj_consume_token(-1); throw new ParseException(); } e = Term(); e = new UnOpExpr(tok, e); break; case INTEGER_LITERAL: case READ: case BOOLEAN_LITERAL: case LPAREN: case IDENTIFIER: e = Term(); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void SignDimension(HashMap<String, List> dims) throws ParseException { Token s; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: s = jj_consume_token(ADD); break; case SUB: s = jj_consume_token(SUB); break; default: jj_la1[63] = jj_gen; jj_consume_token(-1); throw new ParseException(); } List l = new LinkedList(); l.add(s); dims.put("sign", l); }
0 195
            
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Module() throws ParseException { Header(); label_1: while (true) { Section(); switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case START: break; default: jj_la1[0] = jj_gen; break label_1; } } jj_consume_token(0); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Header() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case PROGRAM: jj_consume_token(PROGRAM); jj_consume_token(STRING_LITERAL); jj_consume_token(154); break; default: jj_la1[1] = jj_gen; } label_2: while (true) { SectionDecl(); switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case SECTION: break; default: jj_la1[2] = jj_gen; break label_2; } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void SectionDecl() throws ParseException { Token name, vma, lma; jj_consume_token(SECTION); name = jj_consume_token(DOT_IDENTIFIER); jj_consume_token(SIZE); jj_consume_token(155); jj_consume_token(INTEGER_LITERAL); jj_consume_token(VMA); jj_consume_token(155); vma = jj_consume_token(INTEGER_LITERAL); jj_consume_token(LMA); jj_consume_token(155); lma = jj_consume_token(INTEGER_LITERAL); jj_consume_token(OFFSET); jj_consume_token(155); jj_consume_token(INTEGER_LITERAL); rawModule.newSection(name, vma, lma); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Section() throws ParseException { Token sect; jj_consume_token(START); sect = jj_consume_token(DOT_IDENTIFIER); jj_consume_token(154); rawModule.enterSection(sect); label_3: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case LABEL: break; default: jj_la1[3] = jj_gen; break label_3; } Statement(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Statement() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LABEL: Label(); break; case INTEGER_LITERAL: Item(); break; default: jj_la1[4] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Item() throws ParseException { Token addr; addr = jj_consume_token(INTEGER_LITERAL); jj_consume_token(154); rawModule.setAddress(addr); RawData(); rawModule.setAddress(addr); switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case ADIW: case AND: case ANDI: case ASR: case BCLR: case BLD: case BRBC: case BRBS: case BRCC: case BRCS: case BREAK: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case BST: case CALL: case CBI: case CBR: case CLC: case CLH: case CLI: case CLN: case CLR: case CLS: case CLT: case CLV: case CLZ: case COM: case CP: case CPC: case CPI: case CPSE: case DEC: case EICALL: case EIJMP: case ELPM: case EOR: case FMUL: case FMULS: case FMULSU: case ICALL: case IJMP: case IN: case INC: case JMP: case LD: case LDD: case LDI: case LDS: case LPM: case LSL: case LSR: case MOV: case MOVW: case MUL: case MULS: case MULSU: case NEG: case NOP: case OR: case ORI: case OUT: case POP: case PUSH: case RCALL: case RET: case RETI: case RJMP: case ROL: case ROR: case SBC: case SBCI: case SBI: case SBIC: case SBIS: case SBIW: case SBR: case SBRC: case SBRS: case SEC: case SEH: case SEI: case SEN: case SER: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case ST: case STD: case STS: case SUB: case SUBI: case SWAP: case TST: case WDR: Instruction(); break; case WORD: Data(); break; default: jj_la1[5] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void RawData() throws ParseException { if (jj_2_1(3)) { Raw4(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: Raw2(); break; default: jj_la1[6] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Raw2() throws ParseException { Token b1, b2; b1 = jj_consume_token(INTEGER_LITERAL); b2 = jj_consume_token(INTEGER_LITERAL); rawModule.addBytes(b1, b2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Raw4() throws ParseException { Token b1, b2, b3, b4; b1 = jj_consume_token(INTEGER_LITERAL); b2 = jj_consume_token(INTEGER_LITERAL); b3 = jj_consume_token(INTEGER_LITERAL); b4 = jj_consume_token(INTEGER_LITERAL); rawModule.addBytes(b1, b2, b3, b4); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Instruction() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case AND: case CP: case CPC: case CPSE: case EOR: case FMUL: case FMULS: case FMULSU: case MOV: case MOVW: case MUL: case MULS: case MULSU: case OR: case SBC: case SUB: InstrGPRGPR(); break; case ASR: case CLR: case COM: case DEC: case INC: case LSL: case LSR: case NEG: case POP: case PUSH: case ROL: case ROR: case SER: case SWAP: case TST: InstrGPR(); break; case ADIW: case ANDI: case BLD: case BST: case CBR: case CPI: case ORI: case SBCI: case SBIW: case SBR: case SBRC: case SBRS: case SUBI: InstrGPRIMM(); break; case IN: InstrInput(); break; case OUT: InstrOutput(); break; case BCLR: case BRCC: case BRCS: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case CALL: case JMP: case RCALL: case RJMP: InstrIMM(); break; case BRBC: case BRBS: case CBI: case SBI: case SBIC: case SBIS: InstrIMMIMM(); break; case BREAK: case CLC: case CLH: case CLI: case CLN: case CLS: case CLT: case CLV: case CLZ: case EICALL: case EIJMP: case ICALL: case IJMP: case NOP: case RET: case RETI: case SEC: case SEH: case SEI: case SEN: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case WDR: InstrBARE(); break; case ELPM: case LD: case LDD: case LDI: case LDS: case LPM: InstrLoad(); break; case ST: case STD: case STS: InstrStore(); break; default: jj_la1[7] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Data() throws ParseException { jj_consume_token(WORD); jj_consume_token(INTEGER_LITERAL); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrGPRGPR() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = OpcodeGPRGPR(); r1 = Register(); jj_consume_token(156); r2 = Register(); module.addInstruction(t.image, t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeGPRGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: t = jj_consume_token(ADD); break; case ADC: t = jj_consume_token(ADC); break; case SUB: t = jj_consume_token(SUB); break; case SBC: t = jj_consume_token(SBC); break; case AND: t = jj_consume_token(AND); break; case OR: t = jj_consume_token(OR); break; case EOR: t = jj_consume_token(EOR); break; case MUL: t = jj_consume_token(MUL); break; case MULS: t = jj_consume_token(MULS); break; case MULSU: t = jj_consume_token(MULSU); break; case FMUL: t = jj_consume_token(FMUL); break; case FMULS: t = jj_consume_token(FMULS); break; case FMULSU: t = jj_consume_token(FMULSU); break; case CPSE: t = jj_consume_token(CPSE); break; case CP: t = jj_consume_token(CP); break; case CPC: t = jj_consume_token(CPC); break; case MOV: t = jj_consume_token(MOV); break; case MOVW: t = jj_consume_token(MOVW); break; default: jj_la1[8] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrGPR() throws ParseException { Token t; SyntacticOperand.Register r1; t = OpcodeGPR(); r1 = Register(); module.addInstruction(t.image, t, r1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case COM: t = jj_consume_token(COM); break; case NEG: t = jj_consume_token(NEG); break; case INC: t = jj_consume_token(INC); break; case DEC: t = jj_consume_token(DEC); break; case TST: t = jj_consume_token(TST); break; case CLR: t = jj_consume_token(CLR); break; case SER: t = jj_consume_token(SER); break; case PUSH: t = jj_consume_token(PUSH); break; case POP: t = jj_consume_token(POP); break; case LSL: t = jj_consume_token(LSL); break; case LSR: t = jj_consume_token(LSR); break; case ROL: t = jj_consume_token(ROL); break; case ROR: t = jj_consume_token(ROR); break; case ASR: t = jj_consume_token(ASR); break; case SWAP: t = jj_consume_token(SWAP); break; default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrGPRIMM() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = OpcodeGPRIMM(); r1 = Register(); jj_consume_token(156); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeGPRIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADIW: t = jj_consume_token(ADIW); break; case SUBI: t = jj_consume_token(SUBI); break; case SBCI: t = jj_consume_token(SBCI); break; case SBIW: t = jj_consume_token(SBIW); break; case ANDI: t = jj_consume_token(ANDI); break; case ORI: t = jj_consume_token(ORI); break; case SBR: t = jj_consume_token(SBR); break; case CBR: t = jj_consume_token(CBR); break; case CPI: t = jj_consume_token(CPI); break; case SBRC: t = jj_consume_token(SBRC); break; case SBRS: t = jj_consume_token(SBRS); break; case BST: t = jj_consume_token(BST); break; case BLD: t = jj_consume_token(BLD); break; default: jj_la1[10] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrIMM() throws ParseException { Token t; SyntacticOperand.Expr c1; t = OpcodeIMM(); c1 = Const(); module.addInstruction(t.image, t, c1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case RJMP: t = jj_consume_token(RJMP); break; case JMP: t = jj_consume_token(JMP); break; case RCALL: t = jj_consume_token(RCALL); break; case CALL: t = jj_consume_token(CALL); break; case BREQ: t = jj_consume_token(BREQ); break; case BRNE: t = jj_consume_token(BRNE); break; case BRCS: t = jj_consume_token(BRCS); break; case BRCC: t = jj_consume_token(BRCC); break; case BRSH: t = jj_consume_token(BRSH); break; case BRLO: t = jj_consume_token(BRLO); break; case BRMI: t = jj_consume_token(BRMI); break; case BRPL: t = jj_consume_token(BRPL); break; case BRGE: t = jj_consume_token(BRGE); break; case BRLT: t = jj_consume_token(BRLT); break; case BRHS: t = jj_consume_token(BRHS); break; case BRHC: t = jj_consume_token(BRHC); break; case BRTS: t = jj_consume_token(BRTS); break; case BRTC: t = jj_consume_token(BRTC); break; case BRVS: t = jj_consume_token(BRVS); break; case BRVC: t = jj_consume_token(BRVC); break; case BRIE: t = jj_consume_token(BRIE); break; case BRID: t = jj_consume_token(BRID); break; case BSET: t = jj_consume_token(BSET); break; case BCLR: t = jj_consume_token(BCLR); break; default: jj_la1[11] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrIMMIMM() throws ParseException { Token t; SyntacticOperand.Expr c1, c2; t = OpcodeIMMIMM(); c1 = Const(); jj_consume_token(156); c2 = Const(); module.addInstruction(t.image, t, c1, c2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeIMMIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case SBIC: t = jj_consume_token(SBIC); break; case SBIS: t = jj_consume_token(SBIS); break; case BRBS: t = jj_consume_token(BRBS); break; case BRBC: t = jj_consume_token(BRBC); break; case SBI: t = jj_consume_token(SBI); break; case CBI: t = jj_consume_token(CBI); break; default: jj_la1[12] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLoad() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LDI: InstrLDI(); break; case LD: InstrLD_variant(); break; case LDD: InstrLDD(); break; case LDS: InstrLDS(); break; case ELPM: case LPM: InstrLPM_variant(); break; default: jj_la1[13] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLDI() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(LDI); r1 = Register(); jj_consume_token(156); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLD_variant() throws ParseException { if (jj_2_2(5)) { InstrLDPI(); } else if (jj_2_3(4)) { InstrLDPD(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LD: InstrLD(); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(LD); r1 = Register(); jj_consume_token(156); r2 = Register(); module.addInstruction("ld", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLDPI() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(LD); r1 = Register(); jj_consume_token(156); r2 = Register(); jj_consume_token(157); module.addInstruction("ldpi", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLDPD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(LD); r1 = Register(); jj_consume_token(156); jj_consume_token(158); r2 = Register(); module.addInstruction("ldpd", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLDD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; SyntacticOperand.Expr c1; t = jj_consume_token(LDD); r1 = Register(); jj_consume_token(156); r2 = Register(); jj_consume_token(157); c1 = Const(); module.addInstruction(t.image, t, r1, r2, c1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLDS() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(LDS); r1 = Register(); jj_consume_token(156); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLPM_variant() throws ParseException { if (jj_2_4(5)) { InstrLPMGPRGPRP(); } else if (jj_2_5(3)) { InstrLPMGPRGPR(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ELPM: case LPM: InstrLPMBARE(); break; default: jj_la1[15] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLPMGPRGPR() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = OpcodeLPM(); r1 = Register(); jj_consume_token(156); r2 = Register(); module.addInstruction(t.image + "d", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLPMGPRGPRP() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = OpcodeLPM(); r1 = Register(); jj_consume_token(156); r2 = Register(); jj_consume_token(157); module.addInstruction(t.image + "pi", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrLPMBARE() throws ParseException { Token t; t = OpcodeLPM(); module.addInstruction(t.image, t); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token OpcodeLPM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LPM: t = jj_consume_token(LPM); break; case ELPM: t = jj_consume_token(ELPM); break; default: jj_la1[16] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrStore() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrST_variant(); break; case STD: InstrSTD(); break; case STS: InstrSTS(); break; default: jj_la1[17] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrST_variant() throws ParseException { if (jj_2_6(3)) { InstrST(); } else if (jj_2_7(3)) { InstrSTPI(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrSTPD(); break; default: jj_la1[18] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrST() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(ST); r1 = Register(); jj_consume_token(156); r2 = Register(); module.addInstruction("st", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrSTPI() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(ST); r1 = Register(); jj_consume_token(157); jj_consume_token(156); r2 = Register(); module.addInstruction("stpi", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrSTPD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(ST); jj_consume_token(158); r1 = Register(); jj_consume_token(156); r2 = Register(); module.addInstruction("stpd", t, r1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrSTD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; SyntacticOperand.Expr c1; t = jj_consume_token(STD); r1 = Register(); jj_consume_token(157); c1 = Const(); jj_consume_token(156); r2 = Register(); module.addInstruction(t.image, t, r1, c1, r2); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrSTS() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(STS); c1 = Const(); jj_consume_token(156); r1 = Register(); module.addInstruction(t.image, t, c1, r1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrBARE() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IJMP: t = jj_consume_token(IJMP); break; case ICALL: t = jj_consume_token(ICALL); break; case RET: t = jj_consume_token(RET); break; case RETI: t = jj_consume_token(RETI); break; case SEC: t = jj_consume_token(SEC); break; case CLC: t = jj_consume_token(CLC); break; case SEN: t = jj_consume_token(SEN); break; case CLN: t = jj_consume_token(CLN); break; case SEZ: t = jj_consume_token(SEZ); break; case CLZ: t = jj_consume_token(CLZ); break; case SEI: t = jj_consume_token(SEI); break; case CLI: t = jj_consume_token(CLI); break; case SES: t = jj_consume_token(SES); break; case CLS: t = jj_consume_token(CLS); break; case SEV: t = jj_consume_token(SEV); break; case CLV: t = jj_consume_token(CLV); break; case SET: t = jj_consume_token(SET); break; case CLT: t = jj_consume_token(CLT); break; case SEH: t = jj_consume_token(SEH); break; case CLH: t = jj_consume_token(CLH); break; case NOP: t = jj_consume_token(NOP); break; case SLEEP: t = jj_consume_token(SLEEP); break; case WDR: t = jj_consume_token(WDR); break; case BREAK: t = jj_consume_token(BREAK); break; case SPM: t = jj_consume_token(SPM); break; case EIJMP: t = jj_consume_token(EIJMP); break; case EICALL: t = jj_consume_token(EICALL); break; default: jj_la1[19] = jj_gen; jj_consume_token(-1); throw new ParseException(); } module.addInstruction(t.image, t); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrInput() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(IN); r1 = Register(); jj_consume_token(156); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void InstrOutput() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(OUT); c1 = Const(); jj_consume_token(156); r1 = Register(); module.addInstruction(t.image, t, c1, r1); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public SyntacticOperand.Register Register() throws ParseException { Token tok; tok = jj_consume_token(IDENTIFIER); return module.newOperand(tok); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public void Label() throws ParseException { Token tok; Token v; jj_consume_token(LABEL); v = jj_consume_token(INTEGER_LITERAL); tok = jj_consume_token(STRING_LITERAL); jj_consume_token(154); rawModule.addQuotedLabelAt(v, tok); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public SyntacticOperand.Expr Const() throws ParseException { Expr e; if (jj_2_8(2147483647)) { e = RelExpr(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case IDENTIFIER: e = Term(); break; default: jj_la1[20] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } return module.newOperand(e); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Expr Term() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IDENTIFIER: tok = jj_consume_token(IDENTIFIER); e = new Expr.Variable(tok); break; case INTEGER_LITERAL: tok = jj_consume_token(INTEGER_LITERAL); e = new Expr.Constant(tok); break; default: jj_la1[21] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Expr RelExpr() throws ParseException { Token ltok; Token op; Token rtok; ltok = jj_consume_token(159); op = BinOp(); rtok = jj_consume_token(INTEGER_LITERAL); return new Expr.RelativeAddress(ltok, op, rtok); }
// in src/avrora/syntax/objdump/ObjDumpParser.java
public Token BinOp() throws ParseException { Token tok; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 157: tok = jj_consume_token(157); break; case 158: tok = jj_consume_token(158); break; default: jj_la1[22] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return tok; }
// in src/avrora/syntax/objdump/ObjDumpParser.java
private Token jj_consume_token(int kind) throws ParseException { Token oldToken; if ((oldToken = token).next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; if (token.kind == kind) { jj_gen++; if (++jj_gc > 100) { jj_gc = 0; for (int i = 0; i < jj_2_rtns.length; i++) { JJCalls c = jj_2_rtns[i]; while (c != null) { if (c.gen < jj_gen) c.first = null; c = c.next; } } } return token; } token = oldToken; jj_kind = kind; throw generateParseException(); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Module() throws ParseException { label_1: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case ADIW: case AND: case ANDI: case ASR: case BCLR: case BLD: case BRBC: case BRBS: case BRCC: case BRCS: case BREAK: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case BST: case CALL: case CBI: case CBR: case CLC: case CLH: case CLI: case CLN: case CLR: case CLS: case CLT: case CLV: case CLZ: case COM: case CP: case CPC: case CPI: case CPSE: case DEC: case EICALL: case EIJMP: case ELPM: case EOR: case FMUL: case FMULS: case FMULSU: case ICALL: case IJMP: case IN: case INC: case JMP: case LD: case LDD: case LDI: case LDS: case LPM: case LSL: case LSR: case MOV: case MOVW: case MUL: case MULS: case MULSU: case NEG: case NOP: case OR: case ORI: case OUT: case POP: case PUSH: case RCALL: case RET: case RETI: case RJMP: case ROL: case ROR: case SBC: case SBCI: case SBI: case SBIC: case SBIS: case SBIW: case SBR: case SBRC: case SBRS: case SEC: case SEH: case SEI: case SEN: case SER: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case ST: case STD: case STS: case SUB: case SUBI: case SWAP: case TST: case WDR: case IDENTIFIER: case 149: case 151: case 152: case 153: case 154: case 155: case 156: case 157: case 159: case 160: case 161: case 162: case 163: break; default: jj_la1[0] = jj_gen; break label_1; } Statement(); } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 0: jj_consume_token(0); break; case 158: ExitDirective(); break; default: jj_la1[1] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Statement() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 149: case 151: case 152: case 153: case 154: case 155: case 156: case 157: case 159: case 160: case 161: case 162: case 163: Directive(); break; case ADD: case ADC: case ADIW: case AND: case ANDI: case ASR: case BCLR: case BLD: case BRBC: case BRBS: case BRCC: case BRCS: case BREAK: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case BST: case CALL: case CBI: case CBR: case CLC: case CLH: case CLI: case CLN: case CLR: case CLS: case CLT: case CLV: case CLZ: case COM: case CP: case CPC: case CPI: case CPSE: case DEC: case EICALL: case EIJMP: case ELPM: case EOR: case FMUL: case FMULS: case FMULSU: case ICALL: case IJMP: case IN: case INC: case JMP: case LD: case LDD: case LDI: case LDS: case LPM: case LSL: case LSR: case MOV: case MOVW: case MUL: case MULS: case MULSU: case NEG: case NOP: case OR: case ORI: case OUT: case POP: case PUSH: case RCALL: case RET: case RETI: case RJMP: case ROL: case ROR: case SBC: case SBCI: case SBI: case SBIC: case SBIS: case SBIW: case SBR: case SBRC: case SBRS: case SEC: case SEH: case SEI: case SEN: case SER: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case ST: case STD: case STS: case SUB: case SUBI: case SWAP: case TST: case WDR: Instruction(); break; case IDENTIFIER: Label(); break; default: jj_la1[2] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Directive() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 149: EquDirective(); break; case 151: OrgDirective(); break; case 152: ReserveDirective(); break; case 153: case 154: case 155: DataDirective(); break; case 156: DefDirective(); break; case 157: IncludeDirective(); break; case 159: NoListDirective(); break; case 160: ListDirective(); break; case 161: case 162: case 163: SegDirective(); break; default: jj_la1[3] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Instruction() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: case ADC: case AND: case CP: case CPC: case CPSE: case EOR: case FMUL: case FMULS: case FMULSU: case MOV: case MOVW: case MUL: case MULS: case MULSU: case OR: case SBC: case SUB: InstrGPRGPR(); break; case ASR: case CLR: case COM: case DEC: case INC: case LSL: case LSR: case NEG: case POP: case PUSH: case ROL: case ROR: case SER: case SWAP: case TST: InstrGPR(); break; case ADIW: case ANDI: case BLD: case BST: case CBR: case CPI: case ORI: case SBCI: case SBIW: case SBR: case SBRC: case SBRS: case SUBI: InstrGPRIMM(); break; case BCLR: case BRCC: case BRCS: case BREQ: case BRGE: case BRHC: case BRHS: case BRID: case BRIE: case BRLO: case BRLT: case BRMI: case BRNE: case BRPL: case BRSH: case BRTC: case BRTS: case BRVC: case BRVS: case BSET: case CALL: case JMP: case RCALL: case RJMP: InstrIMM(); break; case BRBC: case BRBS: case CBI: case SBI: case SBIC: case SBIS: InstrIMMIMM(); break; case BREAK: case CLC: case CLH: case CLI: case CLN: case CLS: case CLT: case CLV: case CLZ: case EICALL: case EIJMP: case ICALL: case IJMP: case NOP: case RET: case RETI: case SEC: case SEH: case SEI: case SEN: case SES: case SET: case SEV: case SEZ: case SLEEP: case SPM: case WDR: InstrBARE(); break; case ELPM: case LD: case LDD: case LDI: case LDS: case LPM: InstrLoad(); break; case ST: case STD: case STS: InstrStore(); break; case IN: InstrInput(); break; case OUT: InstrOutput(); break; default: jj_la1[4] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrGPRGPR() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = OpcodeGPRGPR(); r1 = Register(); jj_consume_token(145); r2 = Register(); module.addInstruction(t.image, t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeGPRGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADD: t = jj_consume_token(ADD); break; case ADC: t = jj_consume_token(ADC); break; case SUB: t = jj_consume_token(SUB); break; case SBC: t = jj_consume_token(SBC); break; case AND: t = jj_consume_token(AND); break; case OR: t = jj_consume_token(OR); break; case EOR: t = jj_consume_token(EOR); break; case MUL: t = jj_consume_token(MUL); break; case MULS: t = jj_consume_token(MULS); break; case MULSU: t = jj_consume_token(MULSU); break; case FMUL: t = jj_consume_token(FMUL); break; case FMULS: t = jj_consume_token(FMULS); break; case FMULSU: t = jj_consume_token(FMULSU); break; case CPSE: t = jj_consume_token(CPSE); break; case CP: t = jj_consume_token(CP); break; case CPC: t = jj_consume_token(CPC); break; case MOV: t = jj_consume_token(MOV); break; case MOVW: t = jj_consume_token(MOVW); break; default: jj_la1[5] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrGPR() throws ParseException { Token t; SyntacticOperand.Register r1; t = OpcodeGPR(); r1 = Register(); module.addInstruction(t.image, t, r1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeGPR() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case COM: t = jj_consume_token(COM); break; case NEG: t = jj_consume_token(NEG); break; case INC: t = jj_consume_token(INC); break; case DEC: t = jj_consume_token(DEC); break; case TST: t = jj_consume_token(TST); break; case CLR: t = jj_consume_token(CLR); break; case SER: t = jj_consume_token(SER); break; case PUSH: t = jj_consume_token(PUSH); break; case POP: t = jj_consume_token(POP); break; case LSL: t = jj_consume_token(LSL); break; case LSR: t = jj_consume_token(LSR); break; case ROL: t = jj_consume_token(ROL); break; case ROR: t = jj_consume_token(ROR); break; case ASR: t = jj_consume_token(ASR); break; case SWAP: t = jj_consume_token(SWAP); break; default: jj_la1[6] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrGPRIMM() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = OpcodeGPRIMM(); r1 = Register(); jj_consume_token(145); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeGPRIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ADIW: t = jj_consume_token(ADIW); break; case SUBI: t = jj_consume_token(SUBI); break; case SBCI: t = jj_consume_token(SBCI); break; case SBIW: t = jj_consume_token(SBIW); break; case ANDI: t = jj_consume_token(ANDI); break; case ORI: t = jj_consume_token(ORI); break; case SBR: t = jj_consume_token(SBR); break; case CBR: t = jj_consume_token(CBR); break; case CPI: t = jj_consume_token(CPI); break; case SBRC: t = jj_consume_token(SBRC); break; case SBRS: t = jj_consume_token(SBRS); break; case BST: t = jj_consume_token(BST); break; case BLD: t = jj_consume_token(BLD); break; default: jj_la1[7] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrIMM() throws ParseException { Token t; SyntacticOperand.Expr c1; t = OpcodeIMM(); c1 = Const(); module.addInstruction(t.image, t, c1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case RJMP: t = jj_consume_token(RJMP); break; case JMP: t = jj_consume_token(JMP); break; case RCALL: t = jj_consume_token(RCALL); break; case CALL: t = jj_consume_token(CALL); break; case BREQ: t = jj_consume_token(BREQ); break; case BRNE: t = jj_consume_token(BRNE); break; case BRCS: t = jj_consume_token(BRCS); break; case BRCC: t = jj_consume_token(BRCC); break; case BRSH: t = jj_consume_token(BRSH); break; case BRLO: t = jj_consume_token(BRLO); break; case BRMI: t = jj_consume_token(BRMI); break; case BRPL: t = jj_consume_token(BRPL); break; case BRGE: t = jj_consume_token(BRGE); break; case BRLT: t = jj_consume_token(BRLT); break; case BRHS: t = jj_consume_token(BRHS); break; case BRHC: t = jj_consume_token(BRHC); break; case BRTS: t = jj_consume_token(BRTS); break; case BRTC: t = jj_consume_token(BRTC); break; case BRVS: t = jj_consume_token(BRVS); break; case BRVC: t = jj_consume_token(BRVC); break; case BRIE: t = jj_consume_token(BRIE); break; case BRID: t = jj_consume_token(BRID); break; case BSET: t = jj_consume_token(BSET); break; case BCLR: t = jj_consume_token(BCLR); break; default: jj_la1[8] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrIMMIMM() throws ParseException { Token t; SyntacticOperand.Expr c1, c2; t = OpcodeIMMIMM(); c1 = Const(); jj_consume_token(145); c2 = Const(); module.addInstruction(t.image, t, c1, c2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeIMMIMM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case SBIC: t = jj_consume_token(SBIC); break; case SBIS: t = jj_consume_token(SBIS); break; case BRBS: t = jj_consume_token(BRBS); break; case BRBC: t = jj_consume_token(BRBC); break; case SBI: t = jj_consume_token(SBI); break; case CBI: t = jj_consume_token(CBI); break; default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLoad() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LDI: InstrLDI(); break; case LD: InstrLD_variant(); break; case LDD: InstrLDD(); break; case LDS: InstrLDS(); break; case ELPM: case LPM: InstrLPM_variant(); break; default: jj_la1[10] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLDI() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(LDI); r1 = Register(); jj_consume_token(145); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLD_variant() throws ParseException { if (jj_2_1(5)) { InstrLDPI(); } else if (jj_2_2(4)) { InstrLDPD(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LD: InstrLD(); break; default: jj_la1[11] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(LD); r1 = Register(); jj_consume_token(145); r2 = Register(); module.addInstruction("ld", t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLDPI() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(LD); r1 = Register(); jj_consume_token(145); r2 = Register(); jj_consume_token(146); module.addInstruction("ldpi", t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLDPD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(LD); r1 = Register(); jj_consume_token(145); jj_consume_token(147); r2 = Register(); module.addInstruction("ldpd", t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLDD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; SyntacticOperand.Expr c1; t = jj_consume_token(LDD); r1 = Register(); jj_consume_token(145); r2 = Register(); jj_consume_token(146); c1 = Const(); module.addInstruction(t.image, t, r1, r2, c1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLDS() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(LDS); r1 = Register(); jj_consume_token(145); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLPM_variant() throws ParseException { if (jj_2_3(5)) { InstrLPMGPRGPRP(); } else if (jj_2_4(3)) { InstrLPMGPRGPR(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ELPM: case LPM: InstrLPMBARE(); break; default: jj_la1[12] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLPMGPRGPR() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = OpcodeLPM(); r1 = Register(); jj_consume_token(145); r2 = Register(); module.addInstruction(t.image + 'd', t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLPMGPRGPRP() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = OpcodeLPM(); r1 = Register(); jj_consume_token(145); r2 = Register(); jj_consume_token(146); module.addInstruction(t.image + "pi", t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrLPMBARE() throws ParseException { Token t; t = OpcodeLPM(); module.addInstruction(t.image, t); }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token OpcodeLPM() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LPM: t = jj_consume_token(LPM); break; case ELPM: t = jj_consume_token(ELPM); break; default: jj_la1[13] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrStore() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrST_variant(); break; case STD: InstrSTD(); break; case STS: InstrSTS(); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrST_variant() throws ParseException { if (jj_2_5(3)) { InstrST(); } else if (jj_2_6(3)) { InstrSTPI(); } else { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case ST: InstrSTPD(); break; default: jj_la1[15] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrST() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(ST); r1 = Register(); jj_consume_token(145); r2 = Register(); module.addInstruction("st", t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrSTPI() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(ST); r1 = Register(); jj_consume_token(146); jj_consume_token(145); r2 = Register(); module.addInstruction("stpi", t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrSTPD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; t = jj_consume_token(ST); jj_consume_token(147); r1 = Register(); jj_consume_token(145); r2 = Register(); module.addInstruction("stpd", t, r1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrSTD() throws ParseException { Token t; SyntacticOperand.Register r1, r2; SyntacticOperand.Expr c1; t = jj_consume_token(STD); r1 = Register(); jj_consume_token(146); c1 = Const(); jj_consume_token(145); r2 = Register(); module.addInstruction(t.image, t, r1, c1, r2); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrSTS() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(STS); c1 = Const(); jj_consume_token(145); r1 = Register(); module.addInstruction(t.image, t, c1, r1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrBARE() throws ParseException { Token t; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IJMP: t = jj_consume_token(IJMP); break; case ICALL: t = jj_consume_token(ICALL); break; case RET: t = jj_consume_token(RET); break; case RETI: t = jj_consume_token(RETI); break; case SEC: t = jj_consume_token(SEC); break; case CLC: t = jj_consume_token(CLC); break; case SEN: t = jj_consume_token(SEN); break; case CLN: t = jj_consume_token(CLN); break; case SEZ: t = jj_consume_token(SEZ); break; case CLZ: t = jj_consume_token(CLZ); break; case SEI: t = jj_consume_token(SEI); break; case CLI: t = jj_consume_token(CLI); break; case SES: t = jj_consume_token(SES); break; case CLS: t = jj_consume_token(CLS); break; case SEV: t = jj_consume_token(SEV); break; case CLV: t = jj_consume_token(CLV); break; case SET: t = jj_consume_token(SET); break; case CLT: t = jj_consume_token(CLT); break; case SEH: t = jj_consume_token(SEH); break; case CLH: t = jj_consume_token(CLH); break; case NOP: t = jj_consume_token(NOP); break; case SLEEP: t = jj_consume_token(SLEEP); break; case WDR: t = jj_consume_token(WDR); break; case BREAK: t = jj_consume_token(BREAK); break; case SPM: t = jj_consume_token(SPM); break; case EIJMP: t = jj_consume_token(EIJMP); break; case EICALL: t = jj_consume_token(EICALL); break; default: jj_la1[16] = jj_gen; jj_consume_token(-1); throw new ParseException(); } module.addInstruction(t.image, t); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrInput() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(IN); r1 = Register(); jj_consume_token(145); c1 = Const(); module.addInstruction(t.image, t, r1, c1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void InstrOutput() throws ParseException { Token t; SyntacticOperand.Register r1; SyntacticOperand.Expr c1; t = jj_consume_token(OUT); c1 = Const(); jj_consume_token(145); r1 = Register(); module.addInstruction(t.image, t, c1, r1); }
// in src/avrora/syntax/atmel/AtmelParser.java
public SyntacticOperand.Register Register() throws ParseException { Token tok; tok = jj_consume_token(IDENTIFIER); return module.newOperand(tok); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void Label() throws ParseException { Token tok; tok = jj_consume_token(IDENTIFIER); jj_consume_token(148); module.addLabel(tok); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void EquDirective() throws ParseException { Token tok; Expr e; jj_consume_token(149); tok = jj_consume_token(IDENTIFIER); jj_consume_token(150); e = Expr(); module.addConstant(tok, e); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void OrgDirective() throws ParseException { Token tok; jj_consume_token(151); tok = jj_consume_token(INTEGER_LITERAL); module.setOrigin(new Expr.Constant(tok)); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void ReserveDirective() throws ParseException { Expr e; jj_consume_token(152); e = Expr(); module.reserveBytes(e, null); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void DataDirective() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 153: ByteDirective(); break; case 154: WordDirective(); break; case 155: DoubleWordDirective(); break; default: jj_la1[17] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public void ByteDirective() throws ParseException { ExprList l; jj_consume_token(153); l = DataList(); module.addDataBytes(l); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void WordDirective() throws ParseException { ExprList l; jj_consume_token(154); l = DataList(); module.addDataWords(l); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void DoubleWordDirective() throws ParseException { ExprList l; jj_consume_token(155); l = DataList(); module.addDataDoubleWords(l); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void DefDirective() throws ParseException { Token name; SyntacticOperand.Register reg; jj_consume_token(156); name = jj_consume_token(IDENTIFIER); jj_consume_token(150); reg = Register(); module.addDefinition(name, reg.name); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void IncludeDirective() throws ParseException { Token file; jj_consume_token(157); file = jj_consume_token(STRING_LITERAL); module.includeFile(file); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void ExitDirective() throws ParseException { jj_consume_token(158); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void NoListDirective() throws ParseException { jj_consume_token(159); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void ListDirective() throws ParseException { jj_consume_token(160); }
// in src/avrora/syntax/atmel/AtmelParser.java
public void SegDirective() throws ParseException { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 161: jj_consume_token(161); module.enterDataSegment(); break; case 162: jj_consume_token(162); module.enterProgramSegment(); break; case 163: jj_consume_token(163); module.enterEEPROMSegment(); break; default: jj_la1[18] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/avrora/syntax/atmel/AtmelParser.java
public SyntacticOperand.Expr Const() throws ParseException { Expr e; e = Expr(); return module.newOperand(e); }
// in src/avrora/syntax/atmel/AtmelParser.java
public ExprList DataList() throws ParseException { ExprList list = new ExprList(); Expr e; e = Data(); list.add(e); label_2: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 145: break; default: jj_la1[19] = jj_gen; break label_2; } jj_consume_token(145); e = Data(); list.add(e); } return list; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr Data() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case LOW: case HIGH: case LO8: case HI8: case BYTE2: case BYTE3: case BYTE4: case LWRD: case HWRD: case PAGE: case EXP2: case LOG2: case IDENTIFIER: case 147: case 179: case 180: case 181: e = Expr(); break; case STRING_LITERAL: tok = jj_consume_token(STRING_LITERAL); e = new Expr.StringLiteral(tok); break; default: jj_la1[20] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr Expr() throws ParseException { Expr e; e = LorExpr(); return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr LorExpr() throws ParseException { Token tok; Expr e, er; e = LandExpr(); label_3: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 164: break; default: jj_la1[21] = jj_gen; break label_3; } tok = jj_consume_token(164); er = LandExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr LandExpr() throws ParseException { Token tok; Expr e, er; e = OrExpr(); label_4: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 165: break; default: jj_la1[22] = jj_gen; break label_4; } tok = jj_consume_token(165); er = OrExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr OrExpr() throws ParseException { Token tok; Expr e, er; e = XorExpr(); label_5: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 166: break; default: jj_la1[23] = jj_gen; break label_5; } tok = jj_consume_token(166); er = XorExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr XorExpr() throws ParseException { Token tok; Expr e, er; e = AndExpr(); label_6: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 167: break; default: jj_la1[24] = jj_gen; break label_6; } tok = jj_consume_token(167); er = AndExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr AndExpr() throws ParseException { Token tok; Expr e, er; e = EqExpr(); label_7: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 168: break; default: jj_la1[25] = jj_gen; break label_7; } tok = jj_consume_token(168); er = EqExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr EqExpr() throws ParseException { Token tok; Expr e, er; e = RelExpr(); label_8: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 169: case 170: break; default: jj_la1[26] = jj_gen; break label_8; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 169: tok = jj_consume_token(169); break; case 170: tok = jj_consume_token(170); break; default: jj_la1[27] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = RelExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr RelExpr() throws ParseException { Token tok; Expr e, er; e = ShiftExpr(); label_9: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 171: case 172: case 173: case 174: break; default: jj_la1[28] = jj_gen; break label_9; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 171: tok = jj_consume_token(171); break; case 172: tok = jj_consume_token(172); break; case 173: tok = jj_consume_token(173); break; case 174: tok = jj_consume_token(174); break; default: jj_la1[29] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = ShiftExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr ShiftExpr() throws ParseException { Token tok; Expr e, er; e = AddExpr(); label_10: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 175: case 176: break; default: jj_la1[30] = jj_gen; break label_10; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 175: tok = jj_consume_token(175); break; case 176: tok = jj_consume_token(176); break; default: jj_la1[31] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = AddExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr AddExpr() throws ParseException { Token tok; Expr e, er; e = MulExpr(); label_11: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 146: case 147: break; default: jj_la1[32] = jj_gen; break label_11; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 146: tok = jj_consume_token(146); break; case 147: tok = jj_consume_token(147); break; default: jj_la1[33] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = MulExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr MulExpr() throws ParseException { Token tok; Expr e, er; e = UnaryExpr(); label_12: while (true) { switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 177: case 178: break; default: jj_la1[34] = jj_gen; break label_12; } switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 177: tok = jj_consume_token(177); break; case 178: tok = jj_consume_token(178); break; default: jj_la1[35] = jj_gen; jj_consume_token(-1); throw new ParseException(); } er = UnaryExpr(); e = new Expr.BinOp(tok, e, er); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr UnaryExpr() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 147: case 179: case 180: switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case 179: tok = jj_consume_token(179); break; case 180: tok = jj_consume_token(180); break; case 147: tok = jj_consume_token(147); break; default: jj_la1[36] = jj_gen; jj_consume_token(-1); throw new ParseException(); } e = UnaryExpr(); e = new Expr.UnOp(tok, e); break; case INTEGER_LITERAL: case LOW: case HIGH: case LO8: case HI8: case BYTE2: case BYTE3: case BYTE4: case LWRD: case HWRD: case PAGE: case EXP2: case LOG2: case IDENTIFIER: case 181: e = Term(); break; default: jj_la1[37] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr Term() throws ParseException { Token tok; Expr e; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case IDENTIFIER: tok = jj_consume_token(IDENTIFIER); e = new Expr.Variable(tok); break; case LOW: case HIGH: case LO8: case HI8: case BYTE2: case BYTE3: case BYTE4: case LWRD: case HWRD: case PAGE: case EXP2: case LOG2: e = Func(); break; case INTEGER_LITERAL: tok = jj_consume_token(INTEGER_LITERAL); e = new Expr.Constant(tok); break; case 181: jj_consume_token(181); e = Expr(); jj_consume_token(182); break; default: jj_la1[38] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/avrora/syntax/atmel/AtmelParser.java
public Expr Func() throws ParseException { Token tok; Token l; Expr e; tok = FuncName(); jj_consume_token(181); e = Expr(); l = jj_consume_token(182); return new Expr.Func(tok, e, l); }
// in src/avrora/syntax/atmel/AtmelParser.java
public Token FuncName() throws ParseException { Token tok; switch (jj_ntk == -1 ? jj_ntk() : jj_ntk) { case LOW: tok = jj_consume_token(LOW); break; case HIGH: tok = jj_consume_token(HIGH); break; case LO8: tok = jj_consume_token(LO8); break; case HI8: tok = jj_consume_token(HI8); break; case BYTE2: tok = jj_consume_token(BYTE2); break; case BYTE3: tok = jj_consume_token(BYTE3); break; case BYTE4: tok = jj_consume_token(BYTE4); break; case LWRD: tok = jj_consume_token(LWRD); break; case HWRD: tok = jj_consume_token(HWRD); break; case PAGE: tok = jj_consume_token(PAGE); break; case EXP2: tok = jj_consume_token(EXP2); break; case LOG2: tok = jj_consume_token(LOG2); break; default: jj_la1[39] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return tok; }
// in src/avrora/syntax/atmel/AtmelParser.java
private Token jj_consume_token(int kind) throws ParseException { Token oldToken; if ((oldToken = token).next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; if (token.kind == kind) { jj_gen++; if (++jj_gc > 100) { jj_gc = 0; for (int i = 0; i < jj_2_rtns.length; i++) { JJCalls c = jj_2_rtns[i]; while (c != null) { if (c.gen < jj_gen) c.first = null; c = c.next; } } } return token; } token = oldToken; jj_kind = kind; throw generateParseException(); }
// in src/jintgen/isdl/parser/ISDLParser.java
public ArchDecl ArchDecl() throws ParseException { Token n; jj_consume_token(ARCHITECTURE); n = jj_consume_token(IDENTIFIER); arch = new ArchDecl(n); jj_consume_token(LBRACKET); label_1: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INSTRUCTION: case FORMAT: case ENUM: case ENUM_SUB: case OPERAND_TYPE: case ADDR_MODE: case ADDR_SET: case GLOBAL: case SUBROUTINE: case INLINE: case EXTERNAL: case PSEUDO: break; default: jj_la1[0] = jj_gen; break label_1; } Item(); } jj_consume_token(RBRACKET); return arch; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void Item() throws ParseException { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INSTRUCTION: case PSEUDO: Instruction(); break; case ENUM: Enum(); break; case ENUM_SUB: EnumSubset(); break; case FORMAT: FormatDecl(); break; case OPERAND_TYPE: OperandTypeDecl(); break; case SUBROUTINE: case INLINE: case EXTERNAL: Subroutine(); break; case ADDR_MODE: AddrModeDecl(); break; case ADDR_SET: AddrSetDecl(); break; case GLOBAL: Global(); break; default: jj_la1[1] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public void Instruction() throws ParseException { Token n; AddrModeUse am; List<Stmt> s = new LinkedList<Stmt>(); List<Property> p = new LinkedList<Property>(); FormatDecl e; boolean pseudo = false; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PSEUDO: jj_consume_token(PSEUDO); pseudo = true; break; default: jj_la1[2] = jj_gen; } jj_consume_token(INSTRUCTION); n = jj_consume_token(STRING_LITERAL); am = AddrModeUse(n); jj_consume_token(LBRACKET); label_2: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ENCODING: break; default: jj_la1[3] = jj_gen; break label_2; } e = Encoding(n); am.addEncoding(e); } label_3: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PROPERTY: break; default: jj_la1[4] = jj_gen; break label_3; } Property(p); } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case EXECUTE: s = Execute(s); break; default: jj_la1[5] = jj_gen; } jj_consume_token(RBRACKET); arch.addInstruction(new InstrDecl(pseudo, n, am, p, s)); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void Enum() throws ParseException { Token n; SymbolMapping m; jj_consume_token(ENUM); n = jj_consume_token(IDENTIFIER); m = new SymbolMapping(n); jj_consume_token(LBRACKET); MappingSetElem(m); label_4: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[6] = jj_gen; break label_4; } jj_consume_token(COMMA); MappingSetElem(m); } jj_consume_token(RBRACKET); arch.addEnum(new EnumDecl(n, m)); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void EnumSubset() throws ParseException { Token n; EnumTypeRef t; SymbolMapping m; jj_consume_token(ENUM_SUB); n = jj_consume_token(IDENTIFIER); jj_consume_token(78); t = EnumType(); m = new SymbolMapping(n); jj_consume_token(LBRACKET); MappingSetElem(m); label_5: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[7] = jj_gen; break label_5; } jj_consume_token(COMMA); MappingSetElem(m); } jj_consume_token(RBRACKET); arch.addEnum(new EnumDecl.Subset(n, t, m)); }
// in src/jintgen/isdl/parser/ISDLParser.java
public AddrModeUse AddrModeUse(Token n) throws ParseException { List<AddrModeDecl.Operand> o; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 78: jj_consume_token(78); n = jj_consume_token(IDENTIFIER); return new AddrModeUse(n, null); default: jj_la1[8] = jj_gen; o = Operands(); return new AddrModeUse(null, new AddrModeDecl(n, o)); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public Property Property(List<Property> pl) throws ParseException { Property p; Token name, v; TypeRef t; jj_consume_token(PROPERTY); name = jj_consume_token(IDENTIFIER); jj_consume_token(78); t = Type(); jj_consume_token(EQUALS); v = Value(); jj_consume_token(SEMI); p = new Property(name, t, v); if (pl != null) pl.add(p); return p; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Token Value() throws ParseException { Token t; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case STRING_LITERAL: t = jj_consume_token(STRING_LITERAL); break; case IDENTIFIER: t = jj_consume_token(IDENTIFIER); break; case BOOLEAN_LITERAL: t = jj_consume_token(BOOLEAN_LITERAL); break; case INTEGER_LITERAL: t = jj_consume_token(INTEGER_LITERAL); break; default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return t; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void Global() throws ParseException { Token n; TypeRef t; jj_consume_token(GLOBAL); n = jj_consume_token(IDENTIFIER); jj_consume_token(78); t = Type(); jj_consume_token(SEMI); arch.addGlobal(n, t); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void AddrModeDecl() throws ParseException { Token n; AddrModeDecl amd; Property p; List<AddrModeDecl.Operand> o; FormatDecl e; jj_consume_token(ADDR_MODE); n = jj_consume_token(IDENTIFIER); o = Operands(); amd = new AddrModeDecl(n, o); jj_consume_token(LBRACKET); label_6: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ENCODING: case PROPERTY: break; default: jj_la1[10] = jj_gen; break label_6; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PROPERTY: p = Property(null); amd.addProperty(p); break; case ENCODING: e = Encoding(n); amd.addEncoding(e); break; default: jj_la1[11] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACKET); arch.addAddressingMode(amd); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void AddrSetDecl() throws ParseException { Token n; List<Token> l = new LinkedList<Token>(); Token e; jj_consume_token(ADDR_SET); n = jj_consume_token(IDENTIFIER); jj_consume_token(LBRACKET); e = jj_consume_token(IDENTIFIER); l.add(e); label_7: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[12] = jj_gen; break label_7; } jj_consume_token(COMMA); e = jj_consume_token(IDENTIFIER); l.add(e); } jj_consume_token(RBRACKET); arch.addAddressingModeSet(new AddrModeSetDecl(n, l)); }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl Encoding(Token n) throws ParseException { FormatDecl d; FormatDecl.Cond ec; jj_consume_token(ENCODING); jj_consume_token(EQUALS); d = Format(n); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case WHEN: ec = EncodingCond(); d.setCond(ec); break; default: jj_la1[13] = jj_gen; } return d; }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl.Cond EncodingCond() throws ParseException { Token n; Expr e; jj_consume_token(WHEN); n = jj_consume_token(IDENTIFIER); jj_consume_token(EQUAL); e = Expr(); return new FormatDecl.Cond(n, e); }
// in src/jintgen/isdl/parser/ISDLParser.java
public List<Stmt> Execute(List<Stmt> s) throws ParseException { jj_consume_token(EXECUTE); Block(s); return s; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void FormatDecl() throws ParseException { Token n; FormatDecl d; jj_consume_token(FORMAT); n = jj_consume_token(IDENTIFIER); jj_consume_token(EQUALS); d = Format(n); arch.addEncoding(d); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void OperandTypeDecl() throws ParseException { Token n; OperandTypeDecl d; jj_consume_token(OPERAND_TYPE); n = jj_consume_token(IDENTIFIER); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 79: d = SimpleOperandType(n); break; case LBRACKET: d = CompoundOperandType(n); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } arch.addOperand(d); }
// in src/jintgen/isdl/parser/ISDLParser.java
public OperandTypeDecl SimpleOperandType(Token n) throws ParseException { TypeRef t; Token b, l = null, h = null; OperandTypeDecl d; jj_consume_token(79); b = jj_consume_token(INTEGER_LITERAL); jj_consume_token(80); jj_consume_token(78); t = Type(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 79: jj_consume_token(79); l = jj_consume_token(INTEGER_LITERAL); jj_consume_token(COMMA); h = jj_consume_token(INTEGER_LITERAL); jj_consume_token(80); break; default: jj_la1[15] = jj_gen; } d = new OperandTypeDecl.Value(n, b, t, l, h); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LBRACKET: OperandBody(d); break; case SEMI: jj_consume_token(SEMI); break; default: jj_la1[16] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return d; }
// in src/jintgen/isdl/parser/ISDLParser.java
public OperandTypeDecl CompoundOperandType(Token n) throws ParseException { OperandTypeDecl.Compound cd = new OperandTypeDecl.Compound(n); OperandBody(cd); return cd; }
// in src/jintgen/isdl/parser/ISDLParser.java
public void OperandBody(OperandTypeDecl td) throws ParseException { jj_consume_token(LBRACKET); label_8: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case READ: case WRITE: case 81: break; default: jj_la1[17] = jj_gen; break label_8; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case READ: ReadMethod(td); break; case WRITE: WriteMethod(td); break; case 81: SubOperand(td); break; default: jj_la1[18] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACKET); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void SubOperand(OperandTypeDecl td) throws ParseException { AddrModeDecl.Operand o; jj_consume_token(81); o = Operand(); td.addSubOperand(o); jj_consume_token(SEMI); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void ReadMethod(OperandTypeDecl td) throws ParseException { Token r; TypeRef tr; List<Stmt> s = new LinkedList<Stmt>(); r = jj_consume_token(READ); jj_consume_token(78); tr = Type(); Block(s); td.addReadDecl(r, tr, new CodeRegion(s)); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void WriteMethod(OperandTypeDecl td) throws ParseException { Token r; TypeRef tr; List<Stmt> s = new LinkedList<Stmt>(); r = jj_consume_token(WRITE); jj_consume_token(78); tr = Type(); Block(s); td.addWriteDecl(r, tr, new CodeRegion(s)); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void MappingSetElem(SymbolMapping m) throws ParseException { Token n, i; n = jj_consume_token(IDENTIFIER); jj_consume_token(EQUALS); i = jj_consume_token(INTEGER_LITERAL); m.add(n, i); }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl Format(Token n) throws ParseException { Token pr = null; FormatDecl d; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case PRIORITY: jj_consume_token(PRIORITY); pr = jj_consume_token(INTEGER_LITERAL); break; default: jj_la1[19] = jj_gen; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: d = DerivedFormat(pr, n); break; case LBRACKET: d = NewFormat(pr, n); break; default: jj_la1[20] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return d; }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl DerivedFormat(Token pr, Token n) throws ParseException { Token p; List<FormatDecl.Substitution> l = new LinkedList<FormatDecl.Substitution>(); p = jj_consume_token(IDENTIFIER); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case WHERE: jj_consume_token(WHERE); l = SubstitutionList(); break; case SEMI: jj_consume_token(SEMI); break; default: jj_la1[21] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return new FormatDecl.Derived(n, pr, p, l); }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl NewFormat(Token pr, Token n) throws ParseException { List<Expr> l; jj_consume_token(LBRACKET); l = ExprList(); jj_consume_token(RBRACKET); return new FormatDecl(n, pr, l); }
// in src/jintgen/isdl/parser/ISDLParser.java
public List<FormatDecl.Substitution> SubstitutionList() throws ParseException { List<FormatDecl.Substitution> l = new LinkedList<FormatDecl.Substitution>(); FormatDecl.Substitution s; jj_consume_token(LBRACKET); s = Substitution(); l.add(s); label_9: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[22] = jj_gen; break label_9; } jj_consume_token(COMMA); s = Substitution(); l.add(s); } jj_consume_token(RBRACKET); return l; }
// in src/jintgen/isdl/parser/ISDLParser.java
public FormatDecl.Substitution Substitution() throws ParseException { Token n; Expr e; n = jj_consume_token(IDENTIFIER); jj_consume_token(EQUALS); e = Expr(); return new FormatDecl.Substitution(n, e); }
// in src/jintgen/isdl/parser/ISDLParser.java
public List<AddrModeDecl.Operand> Operands() throws ParseException { AddrModeDecl.Operand o; List<AddrModeDecl.Operand> l = new LinkedList<AddrModeDecl.Operand>(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: o = Operand(); l.add(o); label_10: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[23] = jj_gen; break label_10; } jj_consume_token(COMMA); o = Operand(); l.add(o); } break; default: jj_la1[24] = jj_gen; } return l; }
// in src/jintgen/isdl/parser/ISDLParser.java
public AddrModeDecl.Operand Operand() throws ParseException { Token n; OperandTypeRef t; n = jj_consume_token(IDENTIFIER); jj_consume_token(78); t = OperandType(); return new AddrModeDecl.Operand(n, t); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void Subroutine() throws ParseException { boolean i = false; Token m; TypeRef r; List<SubroutineDecl.Parameter> f; List<Stmt> l = new LinkedList<Stmt>(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case SUBROUTINE: case INLINE: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INLINE: jj_consume_token(INLINE); i = true; break; default: jj_la1[25] = jj_gen; } jj_consume_token(SUBROUTINE); m = jj_consume_token(IDENTIFIER); jj_consume_token(LPAREN); f = Params(); jj_consume_token(RPAREN); jj_consume_token(78); r = Type(); Block(l); arch.addSubroutine(new SubroutineDecl(i, m, f, r, l)); break; case EXTERNAL: jj_consume_token(EXTERNAL); jj_consume_token(SUBROUTINE); m = jj_consume_token(IDENTIFIER); jj_consume_token(LPAREN); f = Params(); jj_consume_token(RPAREN); jj_consume_token(78); r = Type(); jj_consume_token(SEMI); arch.addSubroutine(new SubroutineDecl(i, m, f, r, null)); break; default: jj_la1[26] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public List<SubroutineDecl.Parameter> Params() throws ParseException { SubroutineDecl.Parameter p; List<SubroutineDecl.Parameter> l = new LinkedList<SubroutineDecl.Parameter>(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: p = Param(); l.add(p); label_11: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[27] = jj_gen; break label_11; } jj_consume_token(COMMA); p = Param(); l.add(p); } break; default: jj_la1[28] = jj_gen; } return l; }
// in src/jintgen/isdl/parser/ISDLParser.java
public SubroutineDecl.Parameter Param() throws ParseException { Token n; TypeRef t; n = jj_consume_token(IDENTIFIER); jj_consume_token(78); t = Type(); return new SubroutineDecl.Parameter(n, t); }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Expr() throws ParseException { Expr e; e = Cond_Or_Expr(); return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public List<Expr> ExprList() throws ParseException { List<Expr> l = new LinkedList<Expr>(); Expr e; e = Expr(); l.add(e); label_12: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[29] = jj_gen; break label_12; } jj_consume_token(COMMA); e = Expr(); l.add(e); } return l; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Term() throws ParseException { Expr e; if (jj_2_1(2)) { e = CallExpr(); } else if (jj_2_2(2)) { e = DotExpr(); } else { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: e = VarUse(); break; case INTEGER_LITERAL: case BOOLEAN_LITERAL: e = Literal(); break; case READ: e = ReadExpr(); break; case LPAREN: jj_consume_token(LPAREN); e = Expr(); jj_consume_token(RPAREN); break; default: jj_la1[30] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } label_13: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 79: break; default: jj_la1[31] = jj_gen; break label_13; } e = Index(e); } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 78: e = Conversion(e); break; default: jj_la1[32] = jj_gen; } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Conversion(Expr e) throws ParseException { TypeRef t; jj_consume_token(78); t = Type(); return new ConversionExpr(e, t); }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr VarUse() throws ParseException { Token t; t = jj_consume_token(IDENTIFIER); return new VarExpr(t); }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr DotExpr() throws ParseException { Token o, f; o = jj_consume_token(IDENTIFIER); jj_consume_token(82); f = jj_consume_token(IDENTIFIER); return new DotExpr(new VarExpr(o), f); }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Literal() throws ParseException { Token t; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: t = jj_consume_token(INTEGER_LITERAL); return new Literal.IntExpr(t); case BOOLEAN_LITERAL: t = jj_consume_token(BOOLEAN_LITERAL); return new Literal.BoolExpr(t); default: jj_la1[33] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr ReadExpr() throws ParseException { Token r, o; TypeRef t = null; r = jj_consume_token(READ); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 78: jj_consume_token(78); t = Type(); break; default: jj_la1[34] = jj_gen; } jj_consume_token(LPAREN); o = jj_consume_token(IDENTIFIER); jj_consume_token(RPAREN); return new ReadExpr(r, t, o); }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr CallExpr() throws ParseException { Token t; List<Expr> l; t = jj_consume_token(IDENTIFIER); l = Parameters(); return new CallExpr(t, l); }
// in src/jintgen/isdl/parser/ISDLParser.java
public List<Expr> Parameters() throws ParseException { List<Expr> l = new LinkedList<Expr>(); jj_consume_token(LPAREN); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case READ: case BOOLEAN_LITERAL: case LPAREN: case ADD: case SUB: case NOT: case B_COMP: case IDENTIFIER: l = ExprList(); break; default: jj_la1[35] = jj_gen; } jj_consume_token(RPAREN); return l; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Stmt Statement() throws ParseException { Stmt s; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LOCAL: s = LocalDecl(); break; case IF: s = IfStatement(); break; default: jj_la1[36] = jj_gen; if (jj_2_3(2147483647)) { s = Assignment(); } else { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case IDENTIFIER: s = CallStmt(); break; case RETURN: s = ReturnStmt(); break; case WRITE: s = WriteStmt(); break; default: jj_la1[37] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } return s; }
// in src/jintgen/isdl/parser/ISDLParser.java
public DeclStmt LocalDecl() throws ParseException { Token n; TypeRef t; Expr e; jj_consume_token(LOCAL); n = jj_consume_token(IDENTIFIER); jj_consume_token(78); t = Type(); jj_consume_token(EQUALS); e = Expr(); jj_consume_token(SEMI); return new DeclStmt(n, t, e); }
// in src/jintgen/isdl/parser/ISDLParser.java
public IfStmt IfStatement() throws ParseException { Expr c; List<Stmt> t = new LinkedList<Stmt>(), f = new LinkedList<Stmt>(); jj_consume_token(IF); jj_consume_token(LPAREN); c = Expr(); jj_consume_token(RPAREN); SingleStatement(t); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ELSE: jj_consume_token(ELSE); SingleStatement(f); break; default: jj_la1[38] = jj_gen; } return new IfStmt(c, t, f); }
// in src/jintgen/isdl/parser/ISDLParser.java
public CallStmt CallStmt() throws ParseException { Token t; List<Expr> l; t = jj_consume_token(IDENTIFIER); l = Parameters(); jj_consume_token(SEMI); return new CallStmt(t, l); }
// in src/jintgen/isdl/parser/ISDLParser.java
public ReturnStmt ReturnStmt() throws ParseException { Expr e; jj_consume_token(RETURN); e = Expr(); jj_consume_token(SEMI); return new ReturnStmt(e); }
// in src/jintgen/isdl/parser/ISDLParser.java
public WriteStmt WriteStmt() throws ParseException { Token w, o; TypeRef t = null; Expr e; w = jj_consume_token(WRITE); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 78: jj_consume_token(78); t = Type(); break; default: jj_la1[39] = jj_gen; } jj_consume_token(LPAREN); o = jj_consume_token(IDENTIFIER); jj_consume_token(COMMA); e = Expr(); jj_consume_token(RPAREN); jj_consume_token(SEMI); return new WriteStmt(w, t, o, e); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void SingleStatement(List<Stmt> l) throws ParseException { Stmt s; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case READ: case WRITE: case LOCAL: case IF: case RETURN: case BOOLEAN_LITERAL: case LPAREN: case ADD: case SUB: case NOT: case B_COMP: case IDENTIFIER: s = Statement(); l.add(s); break; case LBRACKET: Block(l); break; default: jj_la1[40] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }
// in src/jintgen/isdl/parser/ISDLParser.java
public AssignStmt Assignment() throws ParseException { Expr d; Expr e; d = Expr(); jj_consume_token(EQUALS); e = Expr(); jj_consume_token(SEMI); return new AssignStmt(d, e); }
// in src/jintgen/isdl/parser/ISDLParser.java
public List<Stmt> Block(List<Stmt> l) throws ParseException { Stmt s; jj_consume_token(LBRACKET); label_14: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case READ: case WRITE: case LOCAL: case IF: case RETURN: case BOOLEAN_LITERAL: case LPAREN: case ADD: case SUB: case NOT: case B_COMP: case IDENTIFIER: break; default: jj_la1[41] = jj_gen; break label_14; } s = Statement(); l.add(s); } jj_consume_token(RBRACKET); return l; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Index(Expr e) throws ParseException { Expr et; Token t1, t2; jj_consume_token(79); if (jj_2_4(2)) { t1 = jj_consume_token(INTEGER_LITERAL); jj_consume_token(78); t2 = jj_consume_token(INTEGER_LITERAL); e = new FixedRangeExpr(e, t1, t2); } else { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case INTEGER_LITERAL: case READ: case BOOLEAN_LITERAL: case LPAREN: case ADD: case SUB: case NOT: case B_COMP: case IDENTIFIER: et = Expr(); e = new IndexExpr(e, et); break; default: jj_la1[42] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(80); return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Cond_Or_Expr() throws ParseException { Expr e, et; Token tok; e = Cond_Xor_Expr(); label_15: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case OR: break; default: jj_la1[43] = jj_gen; break label_15; } tok = jj_consume_token(OR); et = Cond_Xor_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Cond_Xor_Expr() throws ParseException { Expr e, et; Token tok; e = Cond_And_Expr(); label_16: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case XOR: break; default: jj_la1[44] = jj_gen; break label_16; } tok = jj_consume_token(XOR); et = Cond_And_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Cond_And_Expr() throws ParseException { Expr e, et; Token tok; e = Or_Expr(); label_17: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case AND: break; default: jj_la1[45] = jj_gen; break label_17; } tok = jj_consume_token(AND); et = Or_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Or_Expr() throws ParseException { Expr e, et; Token tok; e = Xor_Expr(); label_18: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case B_OR: break; default: jj_la1[46] = jj_gen; break label_18; } tok = jj_consume_token(B_OR); et = Xor_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Xor_Expr() throws ParseException { Expr e, et; Token tok; e = And_Expr(); label_19: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case B_XOR: break; default: jj_la1[47] = jj_gen; break label_19; } tok = jj_consume_token(B_XOR); et = And_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr And_Expr() throws ParseException { Expr e, et; Token tok; e = Equ_Expr(); label_20: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case B_AND: break; default: jj_la1[48] = jj_gen; break label_20; } tok = jj_consume_token(B_AND); et = Equ_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Equ_Expr() throws ParseException { Expr e, et; Token tok; e = Rel_Expr(); label_21: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case EQUAL: case NOTEQUAL: break; default: jj_la1[49] = jj_gen; break label_21; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case EQUAL: tok = jj_consume_token(EQUAL); break; case NOTEQUAL: tok = jj_consume_token(NOTEQUAL); break; default: jj_la1[50] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Rel_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Rel_Expr() throws ParseException { Expr e, et; Token tok; e = Shift_Expr(); label_22: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LESS: case LESSEQ: case GREATER: case GREATEREQ: break; default: jj_la1[51] = jj_gen; break label_22; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LESS: tok = jj_consume_token(LESS); break; case GREATER: tok = jj_consume_token(GREATER); break; case LESSEQ: tok = jj_consume_token(LESSEQ); break; case GREATEREQ: tok = jj_consume_token(GREATEREQ); break; default: jj_la1[52] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Shift_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Shift_Expr() throws ParseException { Expr e, et; Token tok; e = Add_Expr(); label_23: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case SHIFTLEFT: case SHIFTRIGHT: break; default: jj_la1[53] = jj_gen; break label_23; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case SHIFTLEFT: tok = jj_consume_token(SHIFTLEFT); break; case SHIFTRIGHT: tok = jj_consume_token(SHIFTRIGHT); break; default: jj_la1[54] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Add_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Add_Expr() throws ParseException { Expr e, et; Token tok; e = Mul_Expr(); label_24: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: case SUB: break; default: jj_la1[55] = jj_gen; break label_24; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: tok = jj_consume_token(ADD); break; case SUB: tok = jj_consume_token(SUB); break; default: jj_la1[56] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Mul_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Mul_Expr() throws ParseException { Expr e, et; Token tok; e = Un_Expr(); label_25: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case MUL: case DIV: case MOD: break; default: jj_la1[57] = jj_gen; break label_25; } switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case MUL: tok = jj_consume_token(MUL); break; case DIV: tok = jj_consume_token(DIV); break; case MOD: tok = jj_consume_token(MOD); break; default: jj_la1[58] = jj_gen; jj_consume_token(-1); throw new ParseException(); } et = Un_Expr(); e = new BinOpExpr(e, tok, et); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public Expr Un_Expr() throws ParseException { Expr e; Token tok; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: case SUB: case NOT: case B_COMP: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case B_COMP: tok = jj_consume_token(B_COMP); break; case NOT: tok = jj_consume_token(NOT); break; case SUB: tok = jj_consume_token(SUB); break; case ADD: tok = jj_consume_token(ADD); break; default: jj_la1[59] = jj_gen; jj_consume_token(-1); throw new ParseException(); } e = Term(); e = new UnOpExpr(tok, e); break; case INTEGER_LITERAL: case READ: case BOOLEAN_LITERAL: case LPAREN: case IDENTIFIER: e = Term(); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return e; }
// in src/jintgen/isdl/parser/ISDLParser.java
public TypeRef Type() throws ParseException { Token t; HashMap<String, List> dims = new HashMap<String, List>(); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: case SUB: SignDimension(dims); break; default: jj_la1[61] = jj_gen; } t = jj_consume_token(IDENTIFIER); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case 82: SizeDimension(dims); break; default: jj_la1[62] = jj_gen; } if (jj_2_5(2)) { TypesDimension(dims, "types"); } else { } return new TypeRef(t, dims); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void SignDimension(HashMap<String, List> dims) throws ParseException { Token s; switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: s = jj_consume_token(ADD); break; case SUB: s = jj_consume_token(SUB); break; default: jj_la1[63] = jj_gen; jj_consume_token(-1); throw new ParseException(); } List l = new LinkedList(); l.add(s); dims.put("sign", l); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void SizeDimension(HashMap<String, List> dims) throws ParseException { Token w; jj_consume_token(82); w = jj_consume_token(INTEGER_LITERAL); List l = new LinkedList(); l.add(w); dims.put("size", l); }
// in src/jintgen/isdl/parser/ISDLParser.java
public void TypesDimension(HashMap<String, List> dims, String n) throws ParseException { List ty = new LinkedList(); TypeRef tr; jj_consume_token(LESS); switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case ADD: case SUB: case IDENTIFIER: tr = Type(); ty.add(tr); label_26: while (true) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case COMMA: break; default: jj_la1[64] = jj_gen; break label_26; } jj_consume_token(COMMA); tr = Type(); ty.add(tr); } break; default: jj_la1[65] = jj_gen; } jj_consume_token(GREATER); dims.put(n, ty); }
// in src/jintgen/isdl/parser/ISDLParser.java
public OperandTypeRef OperandType() throws ParseException { Token t; t = jj_consume_token(IDENTIFIER); return new OperandTypeRef(t); }
// in src/jintgen/isdl/parser/ISDLParser.java
public EnumTypeRef EnumType() throws ParseException { Token t; t = jj_consume_token(IDENTIFIER); return new EnumTypeRef(t); }
// in src/jintgen/isdl/parser/ISDLParser.java
private Token jj_consume_token(int kind) throws ParseException { Token oldToken; if ((oldToken = token).next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; if (token.kind == kind) { jj_gen++; if (++jj_gc > 100) { jj_gc = 0; for (int i = 0; i < jj_2_rtns.length; i++) { JJCalls c = jj_2_rtns[i]; while (c != null) { if (c.gen < jj_gen) c.first = null; c = c.next; } } } return token; } token = oldToken; jj_kind = kind; throw generateParseException(); }
// in src/jintgen/Main.java
private static ArchDecl loadArchitecture(String fname) throws FileNotFoundException, ParseException { Status.begin("Loading architecture description "+fname); checkFileExists(fname); File archfile = new File(fname); FileInputStream fis = new FileInputStream(archfile); ISDLParser parser = new ISDLParser(fis); ArchDecl a = parser.ArchDecl(); Status.success(); Status.begin("Verifying "+fname); new Verifier(a).verify(); Status.success(); return a; }
0 0 0
runtime (Domain) RegisterRequired
public static class RegisterRequired extends RuntimeException {

        public final LegacyOperand operand;

        RegisterRequired(LegacyOperand o) {
            super("register required");
            operand = o;
        }
    }
1
            
// in src/avrora/arch/legacy/LegacyInstr.java
private static LegacyRegister REG(LegacyOperand o) { LegacyOperand.Register r = o.asRegister(); if (r == null) throw new RegisterRequired(o); return r.getRegister(); }
0 0 1
            
// in src/avrora/syntax/Module.java
catch (LegacyInstr.RegisterRequired e) { ERROR.RegisterExpected((SyntacticOperand)e.operand); }
0 0
runtime (Lib) RuntimeException 2
            
// in src/jintgen/isdl/parser/ISDLParser.java
public void ReInit(InputStream stream, String encoding) { try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source.ReInit(jj_input_stream); token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 66; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); }
2
            
// in src/jintgen/isdl/parser/ISDLParser.java
catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }
0 0 0 0
runtime (Domain) SourceError
public class SourceError extends Util.Error {

    /**
     * The <code>point</code> field stores a reference to the point in the file
     * where the error occured.
     */
    public final SourcePoint point;

    /**
     * The <code>errorType</code> field stores a string representing the type
     * of the error.
     */
    protected final String errorType;

    /**
     * The <code>errparams</code> field stores a list of parameters to the error
     * that might represent the name of the missing variable, expected types, etc.
     */
    protected final String[] errparams;

    public static boolean REPORT_TYPE = false;

    /**
     * The default constructor for a source error accepts an error type, a program
     * point which indicates the location in a file where the error occured, a message,
     * and a list of parameters to the error (such as the name of a class or method
     * where the error occurred).
     *
     * @param type a string that indicates the type of error that occured such as
     *             "Undefined Variable"
     * @param p    the point in the file where the error occurred
     * @param msg  a short message reported to the user that explains the error
     * @param ps   a list of parameters to the error such as the name of the variable
     *             that is undeclared, etc.
     */
    public SourceError(String type, SourcePoint p, String msg, String[] ps) {
        super(msg, null);
        errorType = type;
        point = p;
        errparams = ps;
    }

    /**
     * The <code>report()</code> method generates a textual report of this error
     * for the user. For source errors, this method will report the file, line number,
     * and column number where this error occurred.
     */
    public void report() {
        SourcePoint pt = point == null ? new SourcePoint("*unknown*", 0, 0, 0, 0) : point;
        pt.report();
        Terminal.print(" ");
        Terminal.printRed(errorType);
        Terminal.print(": ");
        Terminal.print(message);
        Terminal.print("\n");
        if (STACKTRACES) {
            printStackTrace();
        }
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        return o instanceof String && errorType.equals(o);
    }

    /**
     * The <code>getErrorType()</code> method returns a string representing the type of the
     * error.
     *
     * @return a string that represents the type of the error
     */
    public String getErrorType() {
        return errorType;
    }

    /**
     * The <code>getErrorParams()</code> method returns a reference to the parameters to
     * the error.
     *
     * @return a reference to an array that contains the parameters to the error, if any
     */
    public String[] getErrorParams() {
        return errparams;
    }
}
4
            
// in src/cck/parser/ErrorReporter.java
public void error(String type, SourcePoint p, String report) { throw new SourceError(type, p, report, StringUtil.EMPTY_STRING_ARRAY); }
// in src/cck/parser/ErrorReporter.java
public void error(String type, SourcePoint p, String report, String p1) { String[] ps = {p1}; throw new SourceError(type, p, report, ps); }
// in src/cck/parser/ErrorReporter.java
public void error(String type, SourcePoint p, String report, String p1, String p2) { String[] ps = {p1, p2}; throw new SourceError(type, p, report, ps); }
// in src/cck/parser/ErrorReporter.java
public void error(String type, SourcePoint p, String report, String p1, String p2, String p3) { String[] ps = {p1, p2, p3}; throw new SourceError(type, p, report, ps); }
0 0 0 0 0
runtime (Domain) SourceException
public class SourceException extends SourceError {

    /**
     * The <code>trace</code> field stores a reference to the stack trace corresponding
     * to where the source exception ocurred.
     */
    public final StackTrace trace;

    /**
     * The default constructor for a source error accepts an error type, a program
     * point which indicates the location in a file where the error occured, a message,
     * and a list of parameters to the error (such as the name of a class or method
     * where the error occurred).
     *
     * @param type a string that indicates the type of error that occured such as
     *             "Undefined Variable"
     * @param p    the point in the file where the error occurred
     * @param msg  a short message reported to the user that explains the error
     * @param ps   a list of parameters to the error such as the name of the variable
     *             that is undeclared, etc.
     */
    public SourceException(String type, StackTrace p, String msg, String[] ps) {
        super(type, p == null ? null : p.getSourcePoint(), msg, null);
        trace = p;
    }

    /**
     * The <code>report()</code> method generates a textual report of this error
     * for the user. For source errors, this method will report the file, line number,
     * and column number where this error occurred.
     */
    public void report() {
        Terminal.print("");
        Terminal.printRed(errorType);
        Terminal.println(": " + message + ' ');
        for (StackTrace tr = trace; tr != null; tr = tr.prev) {
            Terminal.print("\t");
            Terminal.print("in ");
            Terminal.printGreen(tr.getMethod() + ' ');
            SourcePoint p = tr.getSourcePoint();
            if (p != null) p.report();
            Terminal.nextln();
        }
    }

}
0 0 0 0 0 0
checked (Lib) Throwable 0 0 1
            
// in src/cck/util/Util.java
public void rethrow() throws Throwable { throw thrown; }
9
            
// in src/avrora/actions/SimAction.java
catch (Throwable t) { exitSimulation(t); Runtime.getRuntime().removeShutdownHook(shutdownThread); }
// in src/avrora/actions/SimAction.java
catch (Throwable t) { Terminal.printRed("Simulation terminated with unexpected exception"); Terminal.print(": "); t.printStackTrace(); }
// in src/avrora/sim/clock/StepSynchronizer.java
catch ( Throwable t) { reportExit(sim, t); removeSimulator(threads[cntr]); }
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
catch (Throwable e) { //Status.error(e); throw Util.unexpected(e); }
// in src/avrora/syntax/RawModule.java
catch (Throwable t) { // since this is a raw module, we ignore assembling errors // such as mismatched instruction problems--these are due to // objdump attempting to disassemble all data within the file, // even misaligned instructions and raw machine code that might // not be valid according to the instruction set specification }
// in src/cck/help/ClassMapValueItem.java
catch (Throwable t) { return "(No help available for this item.)"; }
// in src/cck/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
// in src/jintgen/isdl/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
// in src/jintgen/Main.java
catch ( Throwable t) { Status.error(t); t.printStackTrace(); }
3
            
// in src/avrora/syntax/objdump/ObjDumpReformatter.java
catch (Throwable e) { //Status.error(e); throw Util.unexpected(e); }
// in src/cck/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
// in src/jintgen/isdl/parser/SimpleCharStream.java
catch (Throwable t) { throw new Error(t.getMessage()); }
2
runtime (Domain) TimeoutException
public static class TimeoutException extends RuntimeException {

        /**
         * The <code>address</code> field stores the address of the next instruction to be executed after the
         * timeout.
         */
        public final int address;

        /**
         * The <code>state</code> field stores the state of the simulation at the point at which the timeout
         * occurred.
         */
        public final State state;

        /**
         * The <code>timeout</code> field stores the value (in clock cycles) of the timeout that occurred.
         */
        public final long timeout;

        public TimeoutException(int a, State s, long t, String l) {
            super("timeout @ " + StringUtil.addrToString(a) + " reached after " + t + ' ' + l);
            address = a;
            state = s;
            timeout = t;
        }
    }
1
            
// in src/avrora/sim/util/ClockCycleTimeout.java
public void fire() { State state = simulator.getState(); throw new SimAction.TimeoutException(state.getPC(), state, timeout, "clock cycles"); }
0 0 2
            
// in src/avrora/actions/SimAction.java
catch (TimeoutException e) { Terminal.printYellow("Simulation terminated"); Terminal.println(": timeout reached at pc = " + StringUtil.addrToString(e.address) + ", time = " + e.state.getCycles()); }
// in src/avrora/sim/SimulatorThread.java
catch (SimAction.TimeoutException te) { // suppress timeout exceptions. }
0 0
runtime (Domain) TokenMgrError
public class TokenMgrError extends Error {

    /*
    * Ordinals for various reasons why an Error of this type can be thrown.
    */

    /**
     * Lexical error occured.
     */
    static final int LEXICAL_ERROR = 0;

    /**
     * Tried to change to an invalid lexical state.
     */
    static final int INVALID_LEXICAL_STATE = 2;

    /**
     * Replaces unprintable characters by their espaced (or unicode escaped) equivalents in the given string
     */
    protected static String addEscapes(String str) {
        StringBuffer retval = new StringBuffer();
        char ch;
        for (int i = 0; i < str.length(); i++) {
            switch (str.charAt(i)) {
                case 0:
                    continue;
                case '\b':
                    retval.append("\\b");
                    continue;
                case '\t':
                    retval.append("\\t");
                    continue;
                case '\n':
                    retval.append("\\n");
                    continue;
                case '\f':
                    retval.append("\\f");
                    continue;
                case '\r':
                    retval.append("\\r");
                    continue;
                case '\"':
                    retval.append("\\\"");
                    continue;
                case '\'':
                    retval.append("\\\'");
                    continue;
                case '\\':
                    retval.append("\\\\");
                    continue;
                default:
                    if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
                        String s = "0000" + Integer.toString(ch, 16);
                        retval.append("\\u" + s.substring(s.length() - 4, s.length()));
                    } else {
                        retval.append(ch);
                    }
            }
        }
        return retval.toString();
    }

    /**
     * Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical
     * error. Parameters : EOFSeen     : indicates if EOF caused the lexicl error curLexState : lexical state
     * in which this error occured errorLine   : line number when the error occured errorColumn : column
     * number when the error occured errorAfter  : prefix that was seen before this error occured curchar :
     * the offending character Note: You can customize the lexical error message by modifying this method.
     */
    protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
        return "Lexical error at line " + errorLine + ", column " + errorColumn + ".  Encountered: " + (EOFSeen ? "<EOF> " : '\"' + addEscapes(String.valueOf(curChar)) + '\"' + " (" + (int) curChar + "), ") + "after : \"" + addEscapes(errorAfter) + '\"';
    }

    /*
     * Constructors of various flavors follow.
     */

    public TokenMgrError(String message, int reason) {
        super(message);
    }

    public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
        this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
    }
}public class TokenMgrError extends Error {

    /*
    * Ordinals for various reasons why an Error of this type can be thrown.
    */

    /**
     * Lexical error occured.
     */
    static final int LEXICAL_ERROR = 0;

    /**
     * Tried to change to an invalid lexical state.
     */
    static final int INVALID_LEXICAL_STATE = 2;

    /**
     * Replaces unprintable characters by their espaced (or unicode escaped) equivalents in the given string
     */
    protected static String addEscapes(String str) {
        StringBuffer retval = new StringBuffer();
        char ch;
        for (int i = 0; i < str.length(); i++) {
            switch (str.charAt(i)) {
                case 0:
                    continue;
                case '\b':
                    retval.append("\\b");
                    continue;
                case '\t':
                    retval.append("\\t");
                    continue;
                case '\n':
                    retval.append("\\n");
                    continue;
                case '\f':
                    retval.append("\\f");
                    continue;
                case '\r':
                    retval.append("\\r");
                    continue;
                case '\"':
                    retval.append("\\\"");
                    continue;
                case '\'':
                    retval.append("\\\'");
                    continue;
                case '\\':
                    retval.append("\\\\");
                    continue;
                default:
                    if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
                        String s = "0000" + Integer.toString(ch, 16);
                        retval.append("\\u" + s.substring(s.length() - 4, s.length()));
                    } else {
                        retval.append(ch);
                    }
            }
        }
        return retval.toString();
    }

    /**
     * Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical
     * error. Parameters : EOFSeen     : indicates if EOF caused the lexicl error curLexState : lexical state
     * in which this error occured errorLine   : line number when the error occured errorColumn : column
     * number when the error occured errorAfter  : prefix that was seen before this error occured curchar :
     * the offending character Note: You can customize the lexical error message by modifying this method.
     */
    protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
        return "Lexical error at line " + errorLine + ", column " + errorColumn + ".  Encountered: " + (EOFSeen ? "<EOF> " : '\"' + addEscapes(String.valueOf(curChar)) + '\"' + " (" + (int) curChar + "), ") + "after : \"" + addEscapes(errorAfter) + '\"';
    }

    /*
     * Constructors of various flavors follow.
     */

    public TokenMgrError(String message, int reason) {
        super(message);
    }

    public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
        this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
    }
}public class TokenMgrError extends Error {

    /*
     * Ordinals for various reasons why an Error of this type can be thrown.
     */

    /**
     * Lexical error occured.
     */
    static final int LEXICAL_ERROR = 0;

    /**
     * An attempt wass made to create a second instance of a static token manager.
     */
    static final int STATIC_LEXER_ERROR = 1;

    /**
     * Tried to change to an invalid lexical state.
     */
    static final int INVALID_LEXICAL_STATE = 2;

    /**
     * Detected (and bailed out of) an infinite loop in the token manager.
     */
    static final int LOOP_DETECTED = 3;

    /**
     * Indicates the reason why the exception is thrown. It will have one of the above 4 values.
     */
    int errorCode;

    /**
     * Replaces unprintable characters by their espaced (or unicode escaped) equivalents in the given string
     */
    protected static String addEscapes(String str) {
        StringBuffer retval = new StringBuffer();
        char ch;
        for (int i = 0; i < str.length(); i++) {
            switch (str.charAt(i)) {
                case 0:
                    continue;
                case '\b':
                    retval.append("\\b");
                    continue;
                case '\t':
                    retval.append("\\t");
                    continue;
                case '\n':
                    retval.append("\\n");
                    continue;
                case '\f':
                    retval.append("\\f");
                    continue;
                case '\r':
                    retval.append("\\r");
                    continue;
                case '\"':
                    retval.append("\\\"");
                    continue;
                case '\'':
                    retval.append("\\\'");
                    continue;
                case '\\':
                    retval.append("\\\\");
                    continue;
                default:
                    if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
                        String s = "0000" + Integer.toString(ch, 16);
                        retval.append("\\u" + s.substring(s.length() - 4, s.length()));
                    } else {
                        retval.append(ch);
                    }
            }
        }
        return retval.toString();
    }

    /**
     * Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical
     * error. Parameters : EOFSeen     : indicates if EOF caused the lexicl error curLexState : lexical state
     * in which this error occured errorLine   : line number when the error occured errorColumn : column
     * number when the error occured errorAfter  : prefix that was seen before this error occured curchar :
     * the offending character Note: You can customize the lexical error message by modifying this method.
     */
    protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
        return ("Lexical error at line " + errorLine + ", column " + errorColumn + ".  Encountered: " + (EOFSeen ? "<EOF> " : ('\"' + addEscapes(String.valueOf(curChar)) + '\"') + " (" + (int)curChar + "), ") + "after : \"" + addEscapes(errorAfter) + '\"');
    }

    /*
     * Constructors of various flavors follow.
     */

    public TokenMgrError() {
    }

    public TokenMgrError(String message, int reason) {
        super(message);
        errorCode = reason;
    }

    public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
        this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
    }
}
6
            
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
public void SwitchTo(int lexState) { if (lexState >= 2 || lexState < 0) throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". LegacyState unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); else curLexState = lexState; }
// in src/avrora/syntax/objdump/ObjDumpParserTokenManager.java
public Token getNextToken() { Token specialToken = null; Token matchedToken; int curPos = 0; EOFLoop : while (true) { try { curChar = input_stream.BeginToken(); } catch (IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); return matchedToken; } jjimageLen = 0; while (true) { switch (curLexState) { case 0: try { input_stream.backup(0); while (curChar <= 32 && (0x100003600L & 1L << curChar) != 0L) curChar = input_stream.BeginToken(); } catch (IOException e1) { continue EOFLoop; } jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_0(); break; case 1: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_1(); if (jjmatchedPos == 0 && jjmatchedKind > 8) { jjmatchedKind = 8; } break; } if (jjmatchedKind != 0x7fffffff) { if (jjmatchedPos + 1 < curPos) input_stream.backup(curPos - jjmatchedPos - 1); if ((jjtoToken[jjmatchedKind >> 6] & 1L << (jjmatchedKind & 077)) != 0L) { matchedToken = jjFillToken(); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; return matchedToken; } else if ((jjtoSkip[jjmatchedKind >> 6] & 1L << (jjmatchedKind & 077)) != 0L) { if ((jjtoSpecial[jjmatchedKind >> 6] & 1L << (jjmatchedKind & 077)) == 0L) SkipLexicalActions(null); else { matchedToken = jjFillToken(); if (specialToken == null) specialToken = matchedToken; else { specialToken = specialToken.next = matchedToken; } SkipLexicalActions(matchedToken); } if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; continue EOFLoop; } jjimageLen += jjmatchedPos + 1; if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; curPos = 0; jjmatchedKind = 0x7fffffff; try { curChar = input_stream.readChar(); continue; } catch (IOException e1) { } } int error_line = input_stream.getEndLine(); int error_column = input_stream.getEndColumn(); String error_after = null; boolean EOFSeen = false; try { input_stream.readChar(); input_stream.backup(1); } catch (IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; } if (!EOFSeen) { input_stream.backup(1); error_after = curPos <= 1 ? "" : input_stream.GetImage(); } throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); } } }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
public void SwitchTo(int lexState) { if (lexState >= 2 || lexState < 0) throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". LegacyState unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); else curLexState = lexState; }
// in src/avrora/syntax/atmel/AtmelParserTokenManager.java
public Token getNextToken() { Token specialToken = null; Token matchedToken; int curPos = 0; EOFLoop : while (true) { try { curChar = input_stream.BeginToken(); } catch (IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); return matchedToken; } jjimageLen = 0; while (true) { switch (curLexState) { case 0: try { input_stream.backup(0); while (curChar <= 32 && (0x100003600L & 1L << curChar) != 0L) curChar = input_stream.BeginToken(); } catch (IOException e1) { continue EOFLoop; } jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_0(); break; case 1: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_1(); if (jjmatchedPos == 0 && jjmatchedKind > 8) { jjmatchedKind = 8; } break; } if (jjmatchedKind != 0x7fffffff) { if (jjmatchedPos + 1 < curPos) input_stream.backup(curPos - jjmatchedPos - 1); if ((jjtoToken[jjmatchedKind >> 6] & 1L << (jjmatchedKind & 077)) != 0L) { matchedToken = jjFillToken(); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; return matchedToken; } else if ((jjtoSkip[jjmatchedKind >> 6] & 1L << (jjmatchedKind & 077)) != 0L) { if ((jjtoSpecial[jjmatchedKind >> 6] & 1L << (jjmatchedKind & 077)) == 0L) SkipLexicalActions(null); else { matchedToken = jjFillToken(); if (specialToken == null) specialToken = matchedToken; else { specialToken = specialToken.next = matchedToken; } SkipLexicalActions(matchedToken); } if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; continue EOFLoop; } jjimageLen += jjmatchedPos + 1; if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; curPos = 0; jjmatchedKind = 0x7fffffff; try { curChar = input_stream.readChar(); continue; } catch (IOException e1) { } } int error_line = input_stream.getEndLine(); int error_column = input_stream.getEndColumn(); String error_after = null; boolean EOFSeen = false; try { input_stream.readChar(); input_stream.backup(1); } catch (IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; } if (!EOFSeen) { input_stream.backup(1); error_after = curPos <= 1 ? "" : input_stream.GetImage(); } throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); } } }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
public void SwitchTo(int lexState) { if (lexState >= 4 || lexState < 0) throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); else curLexState = lexState; }
// in src/jintgen/isdl/parser/ISDLParserTokenManager.java
public Token getNextToken() { Token specialToken = null; Token matchedToken; int curPos = 0; EOFLoop : while (true) { try { curChar = input_stream.BeginToken(); } catch (IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; return matchedToken; } image = null; jjimageLen = 0; while (true) { switch (curLexState) { case 0: try { input_stream.backup(0); while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L) curChar = input_stream.BeginToken(); } catch (IOException e1) { continue EOFLoop; } jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_0(); break; case 1: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_1(); if (jjmatchedPos == 0 && jjmatchedKind > 12) { jjmatchedKind = 12; } break; case 2: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_2(); if (jjmatchedPos == 0 && jjmatchedKind > 12) { jjmatchedKind = 12; } break; case 3: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_3(); if (jjmatchedPos == 0 && jjmatchedKind > 12) { jjmatchedKind = 12; } break; } if (jjmatchedKind != 0x7fffffff) { if (jjmatchedPos + 1 < curPos) input_stream.backup(curPos - jjmatchedPos - 1); if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; return matchedToken; } else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); if (specialToken == null) specialToken = matchedToken; else { matchedToken.specialToken = specialToken; specialToken = (specialToken.next = matchedToken); } SkipLexicalActions(matchedToken); } else SkipLexicalActions(null); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; continue EOFLoop; } MoreLexicalActions(); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; curPos = 0; jjmatchedKind = 0x7fffffff; try { curChar = input_stream.readChar(); continue; } catch (IOException e1) { } } int error_line = input_stream.getEndLine(); int error_column = input_stream.getEndColumn(); String error_after = null; boolean EOFSeen = false; try { input_stream.readChar(); input_stream.backup(1); } catch (IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; } if (!EOFSeen) { input_stream.backup(1); error_after = curPos <= 1 ? "" : input_stream.GetImage(); } throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); } } }
0 0 0 0 0
checked (Domain) UnboundedStackException
private class UnboundedStackException extends Exception {
        Path path;

        UnboundedStackException(Path p) {
            path = p;
        }
    }
1
            
// in src/avrora/stack/Analyzer.java
protected Path findMaximalPath(StateCache.State s, HashMap stack, int depth) throws UnboundedStackException { // record this node and the stack depth at which we first encounter it stack.put(s, new Integer(depth)); int maxdepth = 0; int minlength = Integer.MAX_VALUE; Path maxtail = null; StateTransitionGraph.Edge maxedge = null; for (StateTransitionGraph.Edge edge = s.info.forwardEdges; edge != null; edge = edge.forwardLink) { StateCache.State t = edge.target; if (stack.containsKey(t)) { // cycle detected. check that the depth when reentering is the same int prevdepth = ((Integer)stack.get(t)).intValue(); if (depth + edge.weight != prevdepth) { stack.remove(s); throw new UnboundedStackException(new Path(depth + edge.weight, edge, null)); } } else { Path tail; if (edge.target.mark instanceof Path) { // node has already been visited and marked with the // maximum amount of stack depth that it can add. tail = ((Path)edge.target.mark); } else { // node has not been seen before, traverse it try { tail = findMaximalPath(edge.target, stack, depth + edge.weight); } catch (UnboundedStackException e) { // this node is part of an unbounded cycle, add it to the path // and rethrow the exception e.path = new Path(depth + edge.weight, edge, e.path); stack.remove(s); throw e; } } // compute maximum added stack depth by following this edge int extra = edge.weight + tail.depth; // remember the shortest path (in number of links) to the // maximum depth stack from following any of the links if (extra > maxdepth || (tail.length < minlength && extra == maxdepth)) { maxdepth = extra; maxtail = tail; maxedge = edge; minlength = tail.length; } } } // we are finished with this node, remember how much deeper it can take us stack.remove(s); Path maxpath = new Path(maxdepth, maxedge, maxtail); s.mark = maxpath; return maxpath; }
0 1
            
// in src/avrora/stack/Analyzer.java
protected Path findMaximalPath(StateCache.State s, HashMap stack, int depth) throws UnboundedStackException { // record this node and the stack depth at which we first encounter it stack.put(s, new Integer(depth)); int maxdepth = 0; int minlength = Integer.MAX_VALUE; Path maxtail = null; StateTransitionGraph.Edge maxedge = null; for (StateTransitionGraph.Edge edge = s.info.forwardEdges; edge != null; edge = edge.forwardLink) { StateCache.State t = edge.target; if (stack.containsKey(t)) { // cycle detected. check that the depth when reentering is the same int prevdepth = ((Integer)stack.get(t)).intValue(); if (depth + edge.weight != prevdepth) { stack.remove(s); throw new UnboundedStackException(new Path(depth + edge.weight, edge, null)); } } else { Path tail; if (edge.target.mark instanceof Path) { // node has already been visited and marked with the // maximum amount of stack depth that it can add. tail = ((Path)edge.target.mark); } else { // node has not been seen before, traverse it try { tail = findMaximalPath(edge.target, stack, depth + edge.weight); } catch (UnboundedStackException e) { // this node is part of an unbounded cycle, add it to the path // and rethrow the exception e.path = new Path(depth + edge.weight, edge, e.path); stack.remove(s); throw e; } } // compute maximum added stack depth by following this edge int extra = edge.weight + tail.depth; // remember the shortest path (in number of links) to the // maximum depth stack from following any of the links if (extra > maxdepth || (tail.length < minlength && extra == maxdepth)) { maxdepth = extra; maxtail = tail; maxedge = edge; minlength = tail.length; } } } // we are finished with this node, remember how much deeper it can take us stack.remove(s); Path maxpath = new Path(maxdepth, maxedge, maxtail); s.mark = maxpath; return maxpath; }
2
            
// in src/avrora/stack/Analyzer.java
catch (UnboundedStackException e) { unbounded = true; maximalPath = e.path; }
// in src/avrora/stack/Analyzer.java
catch (UnboundedStackException e) { // this node is part of an unbounded cycle, add it to the path // and rethrow the exception e.path = new Path(depth + edge.weight, edge, e.path); stack.remove(s); throw e; }
1
            
// in src/avrora/stack/Analyzer.java
catch (UnboundedStackException e) { // this node is part of an unbounded cycle, add it to the path // and rethrow the exception e.path = new Path(depth + edge.weight, edge, e.path); stack.remove(s); throw e; }
0
runtime (Domain) Unexpected
public static class Unexpected extends Error {
        public final Throwable thrown;

        public Unexpected(Throwable t) {
            super(StringUtil.quote(t.getClass()));
            thrown = t;
        }

        public void report() {
            Terminal.print(Terminal.ERROR_COLOR, "Unexpected exception");
            Terminal.print(": " + param + '\n');
            thrown.printStackTrace();
        }

        public void rethrow() throws Throwable {
            throw thrown;
        }
    }
0 0 0 0 0 0
unknown (Lib) UnsupportedEncodingException 0 0 6
            
// in src/jintgen/isdl/parser/SimpleCharStream.java
public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws UnsupportedEncodingException { ReInit(encoding == null ? new InputStreamReader(dstream) : new InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); }
// in src/jintgen/isdl/parser/SimpleCharStream.java
public void ReInit(InputStream dstream, String encoding) throws UnsupportedEncodingException { ReInit(dstream, encoding, 1, 1, 4096); }
// in src/jintgen/isdl/parser/SimpleCharStream.java
public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException { ReInit(dstream, encoding, startline, startcolumn, 4096); }
2
            
// in src/jintgen/isdl/parser/ISDLParser.java
catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }
2
            
// in src/jintgen/isdl/parser/ISDLParser.java
catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }
// in src/jintgen/isdl/parser/ISDLParser.java
catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }
2
unknown (Lib) UnsupportedLookAndFeelException 0 0 0 1
            
// in src/avrora/gui/AvroraGui.java
catch (UnsupportedLookAndFeelException e) { System.err.println("Can't use the specified look and feel (" + lookAndFeel + ") on this platform."); System.err.println("Using the default look and feel."); }
0 0
runtime (Domain) WrongNumberOfOperands
public static class WrongNumberOfOperands extends RuntimeException {
        public final int expected;
        public final int found;

        WrongNumberOfOperands(int f, int e) {
            super("wrong number of operands, expected " + e + " and found " + f);
            expected = e;
            found = f;
        }
    }
1
            
// in src/avrora/arch/legacy/LegacyInstr.java
private static void need(int num, LegacyOperand[] ops) { if (ops.length != num) throw new WrongNumberOfOperands(ops.length, num); }
0 0 1
            
// in src/avrora/syntax/Module.java
catch (LegacyInstr.WrongNumberOfOperands e) { ERROR.WrongNumberOfOperands(instr.name, e.found, e.expected); }
0 0

Miscellanous Metrics

nF = Number of Finally 17
nF = Number of Try-Finally (without catch) 0
Number of Methods with Finally (nMF) 17 / 7575 (0.2%)
Number of Finally with a Continue 0
Number of Finally with a Return 0
Number of Finally with a Throw 0
Number of Finally with a Break 0
Number of different exception types thrown 20
Number of Domain exception types thrown 17
Number of different exception types caught 27
Number of Domain exception types caught 13
Number of exception declarations in signatures 500
Number of different exceptions types declared in method signatures 11
Number of library exceptions types declared in method signatures 6
Number of Domain exceptions types declared in method signatures 5
Number of Catch with a continue 3
Number of Catch with a return 55
Number of Catch with a Break 0
nbIf = Number of If 3663
nbFor = Number of For 579
Number of Method with an if 1604 / 7575
Number of Methods with a for 447 / 7575
Number of Method starting with a try 31 / 7575 (0.4%)
Number of Expressions 77404
Number of Expressions in try 1192 (1.5%)