Package net.sf.laja.parser.template

Examples of net.sf.laja.parser.template.NewStatement


  public AddStatement getStatement(int phase, String name, boolean not, Boolean cs, String var1, String var2, String var2b, GrammarData data) {
    if (refname != null) {
      var2 = refname;
    }
    String output = data.getOutput(phase, var1, var2, var2, null, not);
    NewStatement newStatement = new NewStatement("End", name);
    newStatement.setData(not, cs, output);
    return new AddStatement(name, newStatement);
  }
View Full Code Here


  public void generate(int phase, boolean baseDecl, boolean genDecl, boolean genStat, boolean not, Boolean cs, String name, String var1, String var2, String var2b, GrammarData data, StatementList statementList) {
    if (genDecl) {
      String output = data.getOutput(phase, var1, this.name, var2b, null, not);
      // Only handle output, do not handle "not", "cs" and "length".
      if (statementList != null) {
        NewStatement newStatement = new NewStatement("Marker", name);
        newStatement.setOutput(output);
        statementList.add(new Statement(phase, baseDecl, "Marker", name, newStatement));
      }
    }
  }
View Full Code Here

    }
  }

  public AddStatement getStatement(int phase, String name, boolean not, Boolean cs, String var1, String var2, String var2b, GrammarData data) {
    String output = data.getOutput(phase, var1, this.name, var2b, null, not);
    NewStatement newStatement = new NewStatement("Marker", name);
    newStatement.setData(not, cs, output);
    return new AddStatement(this.name, newStatement);
  }
View Full Code Here

        element.generate(phase, baseDecl, genDecl, genStat, not2, cs, name, var1, var2, var2b, data, statementList);
      } else {
        if (genDecl) {
          output = data.getOutput(phase, var1, var2, var2b, null, not1);
          if (statementList != null) {
            NewStatement newStatement = new NewStatement("ElementList", name);
            newStatement.setData(not1, cs, output);
            statementList.add(new Statement(phase, baseDecl, "ElementList", name, newStatement));
          }
        }
        if (genStat) {
          AddStatement addStatement = element.getStatement(phase, name, not2, null, var1, null, null, data);
          if (addStatement != null) {
            if (statementList != null) {
              statementList.add(new Statement(phase, false, name, addStatement));
            }
          } else {
            String elementName = data.addNewVarname(name);
            element.generate(phase, false, true, true, not2, null, elementName, var1, null, null, data, statementList);
            if (statementList != null) {
              statementList.add(new Statement(phase, false, name, new AddStatement(elementName, new RefStatement(elementName))));
            }
          }
        }
      }
    } else {
      if (genDecl) {
        String output = data.getOutput(phase, var1, var2, var2b, null, not);
        if (statementList != null) {
          NewStatement newStatement = new NewStatement("Repeat", name);
          newStatement.setData(not, cs, output, repeats);
          statementList.add(new Statement(phase, baseDecl, "Repeat", name, newStatement));
        }
      }
      if (genStat) {
        String output = data.getOutput(phase, var1, var2, varname, null, this.not);
View Full Code Here

      var2 = refname;
    }
    if (genDecl) {
      String output = data.getOutput(phase, var1, var2, var2b, null, not);
      if (statementList != null) {
        NewStatement newStatement = new NewStatement("Complete", name);
        newStatement.setData(not, cs, output);
        statementList.add(new Statement(phase, baseDecl, "Complete", name, newStatement));
      }
    }
  }
View Full Code Here

  public AddStatement getStatement(int phase, String name, boolean not, Boolean cs, String var1, String var2, String var2b, GrammarData data) {
    if (refname != null) {
      var2 = refname;
    }
    String output = data.getOutput(phase, var1, var2, var2, null, not);
    NewStatement newStatement = new NewStatement("Complete", name);
    newStatement.setData(not, cs, output);
    return new AddStatement(name, newStatement);
  }
View Full Code Here

    if (refname != null) {
      var2 = refname;
    }
    if (genDecl) {
      String output = data.getOutput(phase, var1, var2, var2b, null, not);
      NewStatement newStatement = new NewStatement("Chr", name, new ChrData(intval));
      newStatement.setData(not, cs, output);
      if (statementList != null) {
        statementList.add(new Statement(phase, baseDecl, "Chr", name, newStatement));
      }
    }
  }
View Full Code Here

  public AddStatement getStatement(int phase, String name, boolean not, Boolean cs, String var1, String var2, String var2b, GrammarData data) {
    if (refname != null) {
      var2 = refname;
    }
    String output = data.getOutput(phase, var1, var2, var2b, null, not);
    NewStatement newStatement = new NewStatement("Chr", name, new ChrData(intval));
    newStatement.setData(not, cs, output);
    return new AddStatement(String.valueOf(intval), newStatement);
  }
View Full Code Here

  public void generate(int phase, boolean baseDecl, boolean genDecl, boolean genStat, boolean not, Boolean cs, String name, String var1, String var2, String var2b, GrammarData data, StatementList statementList) {
    String output = data.getOutput(phase, var1, var2, var2, null, not);
    if (genDecl) {
      output = data.getOutput(phase, var1, var2, var2b, null, not);
      if (statementList != null) {
        NewStatement newStatement = new NewStatement("AndList", name);
        newStatement.setData(not, cs, output);
        statementList.add(new Statement(phase, baseDecl, "AndList", name, newStatement));
      }
    }
    if (genStat) {
      generateStatement(mainAnd, "mainAnd", phase, not, name, var1, data, statementList);
View Full Code Here

  }

  public void generate(int phase, boolean baseDecl, boolean genDecl, boolean genStat, boolean not, Boolean cs, String name, String var1, String var2, String var2b, GrammarData data, StatementList statementList) {
    if (genDecl) {
      if (statementList != null) {
        NewStatement newStatement = new NewStatement("ElementList", name);
        statementList.add(new Statement(phase, baseDecl, "ElementList", name, newStatement));
      }
    }
    if (genStat) {
      String output = data.getOutput(phase, var1, var2, var2b, elementName, not);
View Full Code Here

TOP

Related Classes of net.sf.laja.parser.template.NewStatement

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.