Examples of TokenMgrError


Examples of org.graphstream.util.parser.TokenMgrError

  }

  /** Switch to specified lex state. */
  public void SwitchTo(int lexState) {
    if (lexState >= 1 || lexState < 0)
      throw new TokenMgrError("Error: Ignoring invalid lexical state : "
          + lexState + ". State unchanged.",
          TokenMgrError.INVALID_LEXICAL_STATE);
    else
      curLexState = lexState;
  }
View Full Code Here

Examples of org.graphstream.util.parser.TokenMgrError

      }
      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);
    }
  }
View Full Code Here

Examples of org.graphstream.util.parser.TokenMgrError

  }

  /** Switch to specified lex state. */
  public void SwitchTo(int lexState) {
    if (lexState >= 1 || lexState < 0)
      throw new TokenMgrError("Error: Ignoring invalid lexical state : "
          + lexState + ". State unchanged.",
          TokenMgrError.INVALID_LEXICAL_STATE);
    else
      curLexState = lexState;
  }
View Full Code Here

Examples of org.graphstream.util.parser.TokenMgrError

      }
      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);
    }
  }
View Full Code Here

Examples of org.graphstream.util.parser.TokenMgrError

  }

  /** Switch to specified lex state. */
  public void SwitchTo(int lexState) {
    if (lexState >= 1 || lexState < 0)
      throw new TokenMgrError("Error: Ignoring invalid lexical state : "
          + lexState + ". State unchanged.",
          TokenMgrError.INVALID_LEXICAL_STATE);
    else
      curLexState = lexState;
  }
View Full Code Here

Examples of org.graphstream.util.parser.TokenMgrError

      }
      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);
    }
  }
View Full Code Here

Examples of org.ofbiz.base.json.TokenMgrError

            assertEquals("begin column(" + s + ")", s.length(), next.beginColumn);
        }
    }

    protected void doTokenMgrErrorTest(char c) throws Exception {
        TokenMgrError caught = null;
        try {
            parseJSON(c + "\"string\"", false);
        } catch (TokenMgrError e) {
            caught = e;
        } finally {
View Full Code Here

Examples of org.ofbiz.base.json.TokenMgrError

            assertEquals("begin column(" + s + ")", s.length(), next.beginColumn);
        }
    }

    protected void doTokenMgrErrorTest(char c) throws Exception {
        TokenMgrError caught = null;
        try {
            parseJSON(c + "\"string\"", false);
        } catch (TokenMgrError e) {
            caught = e;
        } finally {
View Full Code Here

Examples of org.python.parser.TokenMgrError

            }
            String text = getLine(reader, line);
            return new PySyntaxError(e.getMessage(), line, col, text, filename);
        }
        if (t instanceof TokenMgrError) {
            TokenMgrError e = (TokenMgrError) t;
            boolean eofSeen = e.EOFSeen;

            int col = e.errorColumn;
            int line = e.errorLine;
            //System.err.println("eof seen: "+eofSeen+", "+e.curChar+", "+col+
            //                   ", "+line);
            String text = getLine(reader, line);
            if (eofSeen)
                col -= 1;
            return new PySyntaxError(e.getMessage(), line, col, text, filename);
        } else
            return Py.JavaError(t);
    }
View Full Code Here

Examples of org.python.pydev.parser.jython.TokenMgrError

                errorEnd = endLine.getOffset() + errorToken.endColumn;
            }
            message = parseErr.getMessage();

        } else if (error instanceof TokenMgrError) {
            TokenMgrError tokenErr = (TokenMgrError) error;
            IRegion startLine = doc.getLineInformation(tokenErr.errorLine - 1);
            errorStart = startLine.getOffset();
            errorEnd = startLine.getOffset() + tokenErr.errorColumn;
            message = tokenErr.getMessage();
        } else {
            Log.log("Error, expecting ParseException or TokenMgrError. Received: " + error);
            return new ErrorDescription(null, 0, 0, 0);
        }
        errorLine = doc.getLineOfOffset(errorStart);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.