B. Estrade > FLAT-Legacy-FA.1 > FLAT::Legacy::FA::PRE

Download:
FLAT-Legacy-FA.1.tgz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

PRE - A regular expression base class

SYNOPSIS ^

    use FLAT::Legacy::FA::PRE;

DESCRIPTION ^

This module implements a parallel regular expression parser, and supports the conversion of a PRE to a parallel finite automata. A homegrown recursive descent parser is used to build the parse tree, and the method used to convert the parallel regular expression to a PFA is a modified Thompson's construction that accounts for the additional interleave operator (&).

Recursive Descent-safe Regex Grammar:

 R  -> P
 
 P  -> OP'
 
 P  -> '&' OP' | epsilon

 O  -> CO'

 O' -> '|' CO' | epsilon

 C  -> SC'

 C' -> .SC' | epsilon

 S  -> LS'

 S' -> *S' | epsilon

 L  -> a | b | c |..| 0 | 1 | 2 |..| (R) | epsilon

 Terminal symbols: a,b,c,..,z,0,1,2,..,9,|,*,(,)

 NOTE: Concatenation operator, '.', is not a terminal symbol
 and should not be included in the regex

 FAQ:
   Q: Does this support Perl regular expressions?
   A: No, just the regular expression using the terminal symbols
      listed above.

Valid terminal characters include:

a b c d e f g h i j k l m n o p q r s t u v w x y z

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

0 1 2 3 4 5 6 7 8 9 + - = ? [ ] { } . ~ ^ @ % $

: ; < >

AUTHOR ^

Brett D. Estrade - <estrabd AT mailcan DOT com>

CAVEATS ^

Currently, all states are stored as labels. There is also no integrity checking for consistency among the start, final, and set of all states.

BUGS ^

I haven't hit any yet :)

AVAILABILITY ^

Perl FLaT Project Website at http://perl-flat.sourceforge.net/pmwiki

ACKNOWLEDGEMENTS ^

This suite of modules started off as a homework assignment for a compiler class I took for my MS in computer science at the University of Southern Mississippi. It then became the basis for my MS research. and thesis.

Mike Rosulek has joined the effort, and is heading up the rewrite of Perl FLaT, which will soon be released as FLaT 1.0.

COPYRIGHT ^

This code is released under the same terms as Perl.