fr.umlv.tatoo.runtime.lexer.rules
Class RuleData

java.lang.Object
  extended by fr.umlv.tatoo.runtime.lexer.rules.RuleData

public class RuleData
extends Object

This class defined the a regular expression associated with a rule of the lexer. The regular expression is composed by one main automaton, one optional follow automaton and a property beginningOfLineRequired() used to know if the regular expression is restricted to match beginning of line.

Author:
Remi

Constructor Summary
RuleData(RegexTable main, RegexTable follow, boolean beginningOfLineRequired)
          Creates a data stratucture that xill be associated with a rule and that defined the regular expression.
 
Method Summary
 boolean beginningOfLineRequired()
          Indicates if he main regular expression associated with the rule must starts at the beginning of the line
 RegexTable getFollowRegex()
          Returns the regular expression that must follow the main regular expression associated with this rule.
 RegexTable getMainRegex()
          Returns the main regular expression associated with this rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleData

public RuleData(RegexTable main,
                RegexTable follow,
                boolean beginningOfLineRequired)
Creates a data stratucture that xill be associated with a rule and that defined the regular expression.

Parameters:
main -
follow -
beginningOfLineRequired -
Method Detail

getMainRegex

public RegexTable getMainRegex()
Returns the main regular expression associated with this rule.

Returns:
a table implementation of the minimal automaton corresponding to the main regular expression.

beginningOfLineRequired

public boolean beginningOfLineRequired()
Indicates if he main regular expression associated with the rule must starts at the beginning of the line

Returns:
true if the main regular expression must starts at the beginning a the line; false otherwise.
See Also:
LexerBuffer.previousWasNewLine()

getFollowRegex

public RegexTable getFollowRegex()
Returns the regular expression that must follow the main regular expression associated with this rule.

Returns:
a table implementation of the minimal automaton corresponding to the following regular expression.