NAME

Top Close Open

Template::TT3::Patterns - regular expression patterns to match language tokens

SYNOPSIS

Top Close Open
use Template::TT3::Patterns '$KEYWORD';

# some text to match
my $text = "foo";

# see if the text contains a keyword
if ($text =~ /$KEYWORD/) {
    print "got a keyword: $1\n";
}

DESCRIPTION

Top Close Open

This module defines a number of regular expression for matching the basic tokens of the Template Toolkit markup language.

The first few iterations of the TT3 parser used a straightforward recursive descent approach and relied on these patterns extensively. More recent implementations are based around a generic operator precedence model with a configurable grammar. We now automatically generate regular expressions to match operators rather than using pre-defined patterns. This means that many of the above patterns are no longer used and will eventually be cleared out.

AUTHOR

Top Close Open

Andy Wardley http://wardley.org

COPYRIGHT

Top Close Open

Copyright (C) 1996-2009 Andy Wardley. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


http://tt3.template-toolkit.org/docs/Template/TT3/Patterns.pm last modified 2009-11-23 19:46:48