Package antlr.collections.impl

Examples of antlr.collections.impl.IndexedVector


      return;
    localGrammar.expandInPlace();
    this.alreadyExpanded = true;
    GrammarFile localGrammarFile = this.hier.getFile(getFileName());
    localGrammarFile.setExpanded(true);
    IndexedVector localIndexedVector = localGrammar.getRules();
    Object localObject1 = localIndexedVector.elements();
    Object localObject2;
    while (((Enumeration)localObject1).hasMoreElements())
    {
      localObject2 = (Rule)((Enumeration)localObject1).nextElement();
      inherit((Rule)localObject2, localGrammar);
View Full Code Here


  public final void grammarFile(Hierarchy paramHierarchy, String paramString)
    throws RecognitionException, TokenStreamException
  {
    Token localToken = null;
    IndexedVector localIndexedVector = null;
    try
    {
      while (LA(1) == 5)
      {
        localToken = LT(1);
View Full Code Here

  public final IndexedVector optionSpec(Grammar paramGrammar)
    throws RecognitionException, TokenStreamException
  {
    Token localToken1 = null;
    Token localToken2 = null;
    IndexedVector localIndexedVector = new IndexedVector();
    try
    {
      match(13);
      while (LA(1) == 9)
      {
        localToken1 = LT(1);
        match(9);
        localToken2 = LT(1);
        match(14);
        Option localOption = new Option(localToken1.getText(), localToken2.getText(), paramGrammar);
        localIndexedVector.appendElement(localOption.getName(), localOption);
        if ((paramGrammar != null) && (localToken1.getText().equals("importVocab")))
        {
          paramGrammar.specifiedVocabulary = true;
          paramGrammar.importVocab = localToken2.getText();
          continue;
View Full Code Here

    Token localToken2 = null;
    Token localToken3 = null;
    Token localToken4 = null;
    Token localToken5 = null;
    Grammar localGrammar = null;
    IndexedVector localIndexedVector1 = new IndexedVector(100);
    IndexedVector localIndexedVector2 = null;
    String str = null;
    try
    {
      switch (LA(1))
      {
View Full Code Here

    Token localToken1 = null;
    Token localToken2 = null;
    Token localToken3 = null;
    Token localToken4 = null;
    Token localToken5 = null;
    IndexedVector localIndexedVector = null;
    String str1 = null;
    int i = 0;
    String str2 = null;
    String str3 = "";
    try
View Full Code Here

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

    public GrammarFile(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

TOP

Related Classes of 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.