Examples of lineno()


Examples of java.io.StreamTokenizer.lineno()

          }
          tokens[toklen++] = st.sval;
          break;
      default:
          throw new RuleParserException("Invalid syntax, line "
                                                    + st.lineno()
                + ".");
    }
      }
  }
  return root;
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

    StreamTokenizer in = new StreamTokenizer(r);
    //just read the first field
    String foundSeries = null;
    int maxTransNum = -1;
    while (in.nextToken() != StreamTokenizer.TT_EOF) {
      workDialog.SetProgress(25 + (in.lineno() * 25 / numRowsInFile));
      switch (in.ttype) {
        case '#':
          in.nextToken();
          if (in.ttype != StreamTokenizer.TT_WORD) {
            getWholeRow(in);
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

          } else {
            if (in.sval.equals("SIETYP")) {
              in.nextToken();
              SIE_typen = getIntFromStream(in);
              if (SIE_typen != 1 && SIE_typen != 2 && SIE_typen != 3 && SIE_typen != 4) {
                throw new ParseException("SIETYP must be 1,2 or 4.  Invalid SIETYP=" + SIE_typen + " row " + in.lineno(), 0);
              }
              getWholeRow(in);
              //clean out to the end of the row
            } else if (in.sval.equals("VER")) {
              if (convertTransNums == CONVERT_TRANS_ALL_NEW) {
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

    BufferedReader r = new BufferedReader(new InputStreamReader
        (new FileInputStream(filename)new Cp437CharSetReplacemet()));
    StreamTokenizer in = new StreamTokenizer(r);
    //just read the first field
    while (in.nextToken() != StreamTokenizer.TT_EOF) {
      workDialog.SetProgress(50 + (in.lineno() * 50 / numRowsInFile));
      switch (in.ttype) {
        case '#':
          in.nextToken();
          if (in.ttype != StreamTokenizer.TT_WORD) {
            resultMessage.append("UNKNOWN character in row=" + in.lineno() + " ;" +
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

      workDialog.SetProgress(50 + (in.lineno() * 50 / numRowsInFile));
      switch (in.ttype) {
        case '#':
          in.nextToken();
          if (in.ttype != StreamTokenizer.TT_WORD) {
            resultMessage.append("UNKNOWN character in row=" + in.lineno() + " ;" +
                in.toString() + " ; " + getWholeRow(in) + "\n");
          } else {
            if (in.sval.equals("FNR")) {
              in.nextToken();
              int testCompId = 0;
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

              if (iCompanyToResoreTo == 0) {
                if (testCompId != 0) {
                  compId = ChangeCompanyNumber(testCompId, compId, resultMessage);
                  globalCompId = compId;
                } else {
                  Log.log(Log.DEBUG, this, "#FNR Cannot use non-number company id, row=" + in.lineno());
                  resultMessage.append("#FNR Cannot use non-number company id, row=" + in.lineno() + "\n");
                }
              } else {
                globalCompId = iCompanyToResoreTo;
                compId = iCompanyToResoreTo;
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

                if (testCompId != 0) {
                  compId = ChangeCompanyNumber(testCompId, compId, resultMessage);
                  globalCompId = compId;
                } else {
                  Log.log(Log.DEBUG, this, "#FNR Cannot use non-number company id, row=" + in.lineno());
                  resultMessage.append("#FNR Cannot use non-number company id, row=" + in.lineno() + "\n");
                }
              } else {
                globalCompId = iCompanyToResoreTo;
                compId = iCompanyToResoreTo;
              }
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

              AddCustomer(dim, CustNumber, CustString, CustomerName, dimensions, Customers, compId, resultMessage);
              getWholeRow(in);
              //clean out to the end of the row
            } else if (in.sval.equals("VER")) {
              if (SIE_typen != 4) {
                throw new ParseException("#VER not allowed in SIE type=" + SIE_typen + " line=" + in.lineno(), 0);
              }
              AddTransaction(convertTransNums, serieMultiplier, Customers, in, compId, resultMessage, yearDef);
            } else {
              //this is an unused line.  Get the tokens until the end of the line.
              Log.log(Log.DEBUG, this, "Ignored row=" + in.lineno() + " ; #" + getWholeRow(in));
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

                throw new ParseException("#VER not allowed in SIE type=" + SIE_typen + " line=" + in.lineno(), 0);
              }
              AddTransaction(convertTransNums, serieMultiplier, Customers, in, compId, resultMessage, yearDef);
            } else {
              //this is an unused line.  Get the tokens until the end of the line.
              Log.log(Log.DEBUG, this, "Ignored row=" + in.lineno() + " ; #" + getWholeRow(in));
            }
          }
          break;
        default:
          resultMessage.append("UNKNOWN character in row=" + in.lineno() + " ;field=\""
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

              Log.log(Log.DEBUG, this, "Ignored row=" + in.lineno() + " ; #" + getWholeRow(in));
            }
          }
          break;
        default:
          resultMessage.append("UNKNOWN character in row=" + in.lineno() + " ;field=\""
               + in.ttype + "\"" + getWholeRow(in) + "\n");
          break;
      }
    }
    r.close();
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.