xtc.parser
Class Renamer

java.lang.Object
  extended by xtc.tree.Visitor
      extended by xtc.parser.GrammarVisitor
          extended by xtc.parser.Renamer

public class Renamer
extends GrammarVisitor

Visitor to rename nonterminals.

Version:
$Revision: 1.5 $
Author:
Robert Grimm

Nested Class Summary
static interface Renamer.Translation
          The interface to the actual mapping from nonterminals to nonterminals.
 
Field Summary
protected  Renamer.Translation translation
          The mapping.
 
Fields inherited from class xtc.parser.GrammarVisitor
analyzer, isBound, isLastElement, isPredicate, isRepeatedOnce, isTopLevel, isVoided, needsSequence, runtime, transformInPlace
 
Constructor Summary
Renamer(Runtime runtime, Analyzer analyzer, Renamer.Translation translation)
          Create a new renamer.
 
Method Summary
 Element visit(NonTerminal nt)
          Visit the specified nonterminal.
 
Methods inherited from class xtc.parser.GrammarVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class xtc.tree.Visitor
dispatch, equals, hashCode, iterate, map, mapInPlace, unableToVisit, visit
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

translation

protected Renamer.Translation translation
The mapping.

Constructor Detail

Renamer

public Renamer(Runtime runtime,
               Analyzer analyzer,
               Renamer.Translation translation)
Create a new renamer.

Parameters:
runtime - The runtime.
analyzer - The analyzer utility.
translation - The mapping from nonterminals to nonterminals.
Method Detail

visit

public Element visit(NonTerminal nt)
Visit the specified nonterminal.



Copyright © 2012. All Rights Reserved.