org.jproggy.snippetory.engine
Class RegExSyntax

java.lang.Object
  extended by org.jproggy.snippetory.engine.RegExSyntax
All Implemented Interfaces:
Syntax
Direct Known Subclasses:
CComments, HiddenBlocksSyntax, XMLAlikeSyntax

public abstract class RegExSyntax
extends Object
implements Syntax


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jproggy.snippetory.spi.Syntax
Syntax.Registry, Syntax.Tokenizer
 
Field Summary
 
Fields inherited from interface org.jproggy.snippetory.spi.Syntax
REGISTRY
 
Constructor Summary
RegExSyntax()
           
 
Method Summary
abstract  org.jproggy.snippetory.engine.RegExSyntax.RegexParser parse(CharSequence data, TemplateContext ctx)
          transform input data to a stream of token.
 Syntax.Tokenizer takeOver(Syntax.Tokenizer data)
          similar to parse but additionally preserves parse position
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegExSyntax

public RegExSyntax()
Method Detail

parse

public abstract org.jproggy.snippetory.engine.RegExSyntax.RegexParser parse(CharSequence data,
                                                                            TemplateContext ctx)
Description copied from interface: Syntax
transform input data to a stream of token. Those tokens can be used by low level tools like the TemplateBuilder.

Specified by:
parse in interface Syntax
Parameters:
data - template to be parsed as character data.
Returns:
a tokenizer providing the token stream

takeOver

public Syntax.Tokenizer takeOver(Syntax.Tokenizer data)
Description copied from interface: Syntax
similar to parse but additionally preserves parse position

Specified by:
takeOver in interface Syntax
Parameters:
data - a tokenizer, that already parsed a portion of the data.
Returns:
a tokenizer providing the token stream