Package java.io

Examples of java.io.StreamTokenizer.lineno()


          break;
        case StreamTokenizer.TT_EOL:
          break;
        default :
          throw new IncorrectFormatException("Unexpected token " + tokenizer.sval
              + " at row " + tokenizer.lineno());
      }
    }
    return appearances;
  }
 
View Full Code Here


          break;
        case StreamTokenizer.TT_EOL:
          break;
        default :
          throw new IncorrectFormatException("Unexpected token " + tokenizer.sval
              + " at row " + tokenizer.lineno());
      }
    }
   
    try {
      return createScene();
View Full Code Here

                  } else
                    ButtonBar.this.error("unexpected end of file");
                }
                break;
              default:
                ButtonBar.this.error("syntax error at line " + setup.lineno());
            }
          }
        } catch (IOException e) {
          ButtonBar.this.error("unexpected error while reading setup: " + e);
        }
View Full Code Here

      case StreamTokenizer.TT_WORD:
        if (!identifyBegin) {
          final String identifier = st.sval;
          final String ltName = lt.getNamespace().getLastName();
          if (identifier.indexOf(ltName) != -1) {
            final int ln = relativeShiftLine + (st.lineno() - 1);
            lt.setLineStart(ln);
            identifyBegin = true;
          }
        }
        if (afterBlock) {
View Full Code Here

          afterBlockBuffer.append((char) ttype);
          final String c = new String(new StringBuffer().append((char) ttype));

          if (c.equals(",") || c.equals(";")) {
            if (afterBlockBuffer.toString().trim().length() == 1) {
              final int ln = relativeShiftLine + (st.lineno() - 1);
              lt.setLineEnd(ln);
              end = true;
            }
          }
        } else if (identifyBegin) {
View Full Code Here

              rpCount++;
            }
          }
          if (inBlock) {
            if (lpCount == rpCount) {
              final int ln = relativeShiftLine + (st.lineno() - 1);
              lt.setLineEnd(ln);
              inBlock = false;
              afterBlock = true;
              // end = true;
            }
View Full Code Here

        if (identifyBegin) {
          justAfterBegin = false;
          if (c.equals("{")) {
            if (lpCount == 0) {
              lineStart = st.lineno();
              inBlock = true;
            }
            lpCount++;
          } else if (c.equals("}")) {
            if (inBlock) {
View Full Code Here

              rpCount++;
            }
          }
          if (inBlock) {
            if (lpCount == rpCount) {
              lineEnd = st.lineno();
              inBlock = false;
              result.put(lineStart, lineEnd);

              identifyBegin = false;
              inBlock = false;
View Full Code Here

      }
    } catch (RuntimeException e) {
      if (e.getMessage().startsWith("Line #")) {
        throw e;
      } else {
        throw new RuntimeException("Line #" + (stok.lineno() + getAlgLineNum()) + ": ", e);
      }
    } catch (Throwable t) {
      throw new RuntimeException("Line #" + (stok.lineno() + getAlgLineNum()) + ": ", t);
    }
View Full Code Here

        throw e;
      } else {
        throw new RuntimeException("Line #" + (stok.lineno() + getAlgLineNum()) + ": ", e);
      }
    } catch (Throwable t) {
      throw new RuntimeException("Line #" + (stok.lineno() + getAlgLineNum()) + ": ", t);
    }


  }
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.