Hyper::Developer::Generator::Control::ContainerFlow - Abstract Base class with



NAME

Hyper::Developer::Generator::Control::ContainerFlow - Abstract Base class with code generation features


VERSION

This document describes Hyper::Developer::Generator::Control::ContainerFlow 0.01


DESCRIPTION

This class can handle two different Grammars. See pod of Hyper::Control::Flow for more details.

Action grammar

The abstract action grammar in something like BNF notation looks like this. Comments are perl style.

 # lines have (optionsl) ; ends
 <line> ::= <line_content> ";"
 # line contains one of
 <line_content> ::= <@identifier> "=" <constant>     #  a.b.c = "Foo";
    | <@identifier>=<@identifier>                    #  a.b.c = a;
    | <method>                                       #  a.b = a.method();
 # id trees may be used with . (like hashref trees in TT or HTC)
 <@identifier> ::= <identifier> ( "." <identifier>)*
 # single ids are alphanumeric
 <identifier> ::= /\b[A-z0-9_]+\b/
 # constants start with ', " or numbers
 constant ::= ['"0-9].*
 # methods are suffixed with ()
 <method> ::= <@identifier> "()"

Examples:

 # <@identifier> = <@identifier>
 cSelectPerson.mRole = mInitiatorRole;
 cSelectPerson = mInitiatorData.mInitiator;
 # <@identifier> = <constant>
 cSelectPerson.mRole = 'Superuser';
 cSelectPerson.mRole = "Superuser";
 cSelectPerson.mRole = 42;
 # method
 this.testMethod();
 testMethod();

Condition grammar

 # lines consist of one expression or an operand
 <line>     ::= <expr>          # 1 < 2 || 1 > 2
                | <operand>     # test()
 # expressions consist of operand, cmp operator, operand, and optionally
 # a logical operator and another exception
 <expr>     :== <operand> <cmpop> <operand> (<logop> <expr>)?
 # operands are either a constant, a method or an identifier
 <operand>  :==  <constant>
                | <method>
                | <identifier>
 # methods end with ()
 <method>   :== <@identifier> "()"
 # id trees may be used with . (like hashref trees in TT or HTC)
 <@identifier> ::= <identifier> ( "." <identifier>)*
 # single ids are alphanumeric, but must start with a character
 <identifier> ::= /\b[A-z][A-z0-9_]+\b/
 # compare operators are eq, ne, ==, !=
 <cmpop>    :== 'eq' | 'ne' | '==' | '!='
 # Logical operators are || && or and
 <logop>    :==  '||' | '&&' | 'or' | 'and'

Operator precedence is standard perl.

Examples:

 mGroovyMovie.mOscar eq 'true'
 mGroovyMovie.mOscar ne 'grrzwrrz("drrrz")'
 mGroovyMovie.mOscar == 123
 mGroovyMovie.mOscar != 10e30
 mGroovyMovie.mOscar == 1 && mGroovyMovie.mHimbeere == 30
 mGroovyMovie.mOscar == Get_Value() || mHimbeere == mOscar.himbeere.value()
 mGroovyMovie.mOscar == mGroovyMovie.mHimbeere


SUBROUTINES/METHODS

####


DIAGNOSTICS


CONFIGURATION AND ENVIRONMENT


DEPENDENCIES


INCOMPATIBILITIES


BUGS AND LIMITATIONS


RCS INFORMATIONS

Last changed by

$Author: ac0v $

Id

$Id: ContainerFlow.pm 320 2008-02-16 02:04:51Z ac0v $

Revision

$Revision: 320 $

Date

$Date: 2008-02-16 03:04:51 +0100 (Sat, 16 Feb 2008) $

HeadURL

$HeadURL: file:///srv/cluster/svn/repos/Hyper/Hyper-Developer/trunk/lib/Hyper/Developer/Generator/Control/ContainerFlow.pm $


AUTHOR

Andreas Specht <ACID@cpan.org>


LICENSE AND COPYRIGHT

Copyright (c) 2007, Andreas Specht <ACID@cpan.org>. All rights reserved.

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

 Hyper::Developer::Generator::Control::ContainerFlow - Abstract Base class with