Examples of lineno()


Examples of java.io.StreamTokenizer.lineno()

          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

Examples of java.io.StreamTokenizer.lineno()

              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

Examples of java.io.StreamTokenizer.lineno()

        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

Examples of java.io.StreamTokenizer.lineno()

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

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

Examples of java.io.StreamTokenizer.lineno()

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

Examples of java.io.StreamTokenizer.lineno()

        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

Examples of java.io.StreamTokenizer.lineno()

        case StreamTokenizer.TT_WORD:
          String s = stok.sval;
          Constructor<? extends PerfTask> cnstr = taskClass(config,s)
            .asSubclass(PerfTask.class).getConstructor(PerfRunData.class);
          PerfTask task = cnstr.newInstance(runData);
          task.setAlgLineNum(stok.lineno());
          task.setDisableCounting(isDisableCountNextTask);
          isDisableCountNextTask = false;
          currSequence.addTask(task);
          if (task instanceof RepSumByPrefTask) {
            stok.nextToken();
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

        passwordMap = new HashMap<String, byte[]>();
        while (stok.nextToken() != StreamTokenizer.TT_EOF) {
            String name = stok.sval;
            if (stok.nextToken() == StreamTokenizer.TT_EOF) {
                throw new IOException("Unexpected EOL at line " +
                                      stok.lineno());
            }
            byte [] password = decodeBytes(stok.sval.getBytes("UTF-8"));
            passwordMap.put(name, password);
        }
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

          if ( toklen > 0 ) {
        try {
            parseRule(tokens, toklen);
        } catch (RuleParserException ex) {
            String msg = ("Error while parsing rule file, "
              + "line "+st.lineno()+": "
              + ex.getMessage());
            throw new RuleParserException(msg);
        }
        toklen = 0;
          }
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

          if ( toklen > 0 ) {
        try {
            parseRule(tokens, toklen);
        } catch (RuleParserException ex) {
            String msg = ("Error while parsing rule file, "
              + "line "+st.lineno()+": "
              + ex.getMessage());
            throw new RuleParserException(msg);
        }
        toklen = 0;
          }
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.