Package org.joni.exception

Examples of org.joni.exception.InternalException


    protected void newSyntaxException(String message) {
        throw new SyntaxException(message);
    }

    protected void newInternalException(String message) {
        throw new InternalException(message);
    }
View Full Code Here


        case ALT:
            return "Alt";
        case LIST:
            return "List";
        default:
            throw new InternalException(ErrorMessages.ERR_PARSER_BUG);
        }
    }
View Full Code Here

                    return finish();

                case OPCode.FAIL:                       opFail();                  continue;

                default:
                    throw new InternalException(ErrorMessages.ERR_UNDEFINED_BYTECODE);

            } // main switch
        } // main while
    }
View Full Code Here

        case OPCode.REPEAT_INC_SG:
        case OPCode.REPEAT_INC_NG_SG:
            ip++;        // p += SIZE_MEMNUM;
            break;
        default:
            throw new InternalException(ErrorMessages.ERR_UNEXPECTED_BYTECODE);
        } // switch
    }
View Full Code Here

                bp += OPSize.RELADDR;
                sb.append(":" + scn + ":(" + addr + ")");
                break;

            default:
                throw new InternalException("undefined code: " + code[--bp]);
            }
        }

        sb.append("]");
View Full Code Here

                }
            }
            break;

        default:
            throw new InternalException(ErrorMessages.ERR_PARSER_BUG);
        } // switch
    }
View Full Code Here

        if (e == null) throw new ValueException(ErrorMessages.ERR_UNDEFINED_NAME_REFERENCE,
                                                new String(name, nameP, nameEnd - nameP));

        switch(e.backNum) {
        case 0:
            throw new InternalException(ErrorMessages.ERR_PARSER_BUG);
        case 1:
            return e.backRef1;
        default:
            if (region != null) {
                for (int i = e.backNum - 1; i >= 0; i--) {
View Full Code Here

    }

    public void fix(Regex regex) {
        for (int i=0; i<num; i++) {
            EncloseNode en = (EncloseNode)targets[i];
            if (!en.isAddrFixed()) new InternalException(ErrorMessages.ERR_PARSER_BUG);
            regex.code[offsets[i]] = en.callAddr; // is this safe ?
        }
    }
View Full Code Here

    protected void newValueException(String message, int p, int end) {
        throw new ValueException(message, new String(bytes, p, end - p));
    }

    protected void newInternalException(String message) {
        throw new InternalException(message);
    }
View Full Code Here

    public void setMemNode(int num, Node node) {
        if (numMem >= num) {
            memNodes[num] = node;
        } else {
            throw new InternalException(ErrorMessages.ERR_PARSER_BUG);
        }
    }
View Full Code Here

TOP

Related Classes of org.joni.exception.InternalException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.