Package org.jostraca.comp.antlr.collections.impl

Examples of org.jostraca.comp.antlr.collections.impl.IndexedVector


    protected boolean expanded = false// any grammars expanded within?
  protected org.jostraca.comp.antlr.Tool tool;

    public GrammarFile(org.jostraca.comp.antlr.Tool tool, String f) {
        fileName = f;
        grammars = new IndexedVector();
        this.tool = tool;
    }
View Full Code Here


        this.antlrTool = tool;
    }

    public void addOption(Option o) {
        if (options == null) {  // if not already there, create it
            options = new IndexedVector();
        }
        options.appendElement(o.getName(), o);
    }
View Full Code Here

        // track whether a grammar file needed to have a grammar expanded
        GrammarFile gf = hier.getFile(getFileName());
        gf.setExpanded(true);

        // Copy rules from supergrammar into this grammar
        IndexedVector inhRules = superG.getRules();
        for (Enumeration e = inhRules.elements(); e.hasMoreElements();) {
            Rule r = (Rule)e.nextElement();
            inherit(r, superG);
        }

        // Copy options from supergrammar into this grammar
        // Modify tokdef options so that they point to dir of enclosing grammar
        IndexedVector inhOptions = superG.getOptions();
        if (inhOptions != null) {
            for (Enumeration e = inhOptions.elements(); e.hasMoreElements();) {
                Option o = (Option)e.nextElement();
                inherit(o, superG);
            }
        }
View Full Code Here

    protected boolean expanded = false// any grammars expanded within?
  protected org.jostraca.comp.antlr.Tool tool;

    public GrammarFile(org.jostraca.comp.antlr.Tool tool, String f) {
        fileName = f;
        grammars = new IndexedVector();
        this.tool = tool;
    }
View Full Code Here

        this.antlrTool = tool;
    }

    public void addOption(Option o) {
        if (options == null) {  // if not already there, create it
            options = new IndexedVector();
        }
        options.appendElement(o.getName(), o);
    }
View Full Code Here

        // track whether a grammar file needed to have a grammar expanded
        GrammarFile gf = hier.getFile(getFileName());
        gf.setExpanded(true);

        // Copy rules from supergrammar into this grammar
        IndexedVector inhRules = superG.getRules();
        for (Enumeration e = inhRules.elements(); e.hasMoreElements();) {
            Rule r = (Rule)e.nextElement();
            inherit(r, superG);
        }

        // Copy options from supergrammar into this grammar
        // Modify tokdef options so that they point to dir of enclosing grammar
        IndexedVector inhOptions = superG.getOptions();
        if (inhOptions != null) {
            for (Enumeration e = inhOptions.elements(); e.hasMoreElements();) {
                Option o = (Option)e.nextElement();
                inherit(o, superG);
            }
        }
View Full Code Here

  ) throws RecognitionException, TokenStreamException {
   
    Token  hdr = null;
   
      Grammar gr;
      IndexedVector opt=null;
   
   
    try {      // for error handling
      {
      _loop265:
View Full Code Here

  }
 
  public final IndexedVector  optionSpec(
    Grammar gr
  ) throws RecognitionException, TokenStreamException {
    IndexedVector options;
   
    Token  op = null;
    Token  rhs = null;
   
      options = new IndexedVector();
   
   
    try {      // for error handling
      match(OPTIONS_START);
      {
      _loop280:
      do {
        if ((LA(1)==ID)) {
          op = LT(1);
          match(ID);
          rhs = LT(1);
          match(ASSIGN_RHS);
         
                  Option newOp = new Option(op.getText(),rhs.getText(),gr);
                  options.appendElement(newOp.getName(),newOp);
                  if ( gr!=null && op.getText().equals("importVocab") ) {
                    gr.specifiedVocabulary = true;
                    gr.importVocab = rhs.getText();
                  }
                  else if ( gr!=null && op.getText().equals("exportVocab") ) {
View Full Code Here

    Token  sup = null;
    Token  tk = null;
    Token  memberA = null;
   
      gr=null;
      IndexedVector rules = new IndexedVector(100);
      IndexedVector classOptions = null;
      String sc = null;
   
   
    try {      // for error handling
      {
View Full Code Here

    Token  arg = null;
    Token  ret = null;
    Token  init = null;
    Token  blk = null;
   
      IndexedVector o = null// options for rule
      String vis = null;
      boolean bang=false;
      String eg=null, thr="";
   
   
View Full Code Here

TOP

Related Classes of org.jostraca.comp.antlr.collections.impl.IndexedVector

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.