dk.brics.grammar
Class RegexpTerminalEntity

java.lang.Object
  extended by dk.brics.grammar.Entity
      extended by dk.brics.grammar.TerminalEntity
          extended by dk.brics.grammar.RegexpTerminalEntity

public class RegexpTerminalEntity
extends TerminalEntity

A regexp terminal.


Constructor Summary
RegexpTerminalEntity(Automaton a, boolean max, String aname, String label, String example)
          Constructs a new regexp terminal.
 
Method Summary
 Automaton getAutomaton()
          Returns the automaton of this regexp terminal.
 String getAutomatonName()
          Returns the name of this regexp terminal.
 boolean isMax()
          Returns true if this regexp terminal is maximal match.
 String toString()
          Returns string representation of this entity.
<T> T
visitBy(EntityVisitor<T> v)
          Visits this entity with the given visitor.
 
Methods inherited from class dk.brics.grammar.Entity
getExample, getLabel, isExplicitlyLabeled, isLabeled, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RegexpTerminalEntity

public RegexpTerminalEntity(Automaton a,
                            boolean max,
                            String aname,
                            String label,
                            String example)
Constructs a new regexp terminal.

Parameters:
a - automaton representing the regexp
max - if true, maximal match only
aname - name of regexp
label - entity label, null if ignorable
example - example string, null if absent
Method Detail

getAutomaton

public Automaton getAutomaton()
Returns the automaton of this regexp terminal.

Returns:
the automaton

getAutomatonName

public String getAutomatonName()
Returns the name of this regexp terminal.

Returns:
automaton name

isMax

public boolean isMax()
Returns true if this regexp terminal is maximal match.

Returns:
true if maximal match

toString

public String toString()
Returns string representation of this entity.

Overrides:
toString in class Object

visitBy

public <T> T visitBy(EntityVisitor<T> v)
Description copied from class: Entity
Visits this entity with the given visitor.

Specified by:
visitBy in class Entity
Parameters:
v - entity visitor


Copyright © 2005-2008 Anders Møller.