Ejemplo n.º 1
0
 /**
  * Constructs a new TRANSLATE construct.
  */
 public function __construct()
 {
     $name = 'TRANSLATE';
     $regex = '#^((((VAR[\\s]+[a-z0-9][A-Za-z0-9-]*)|(LOOPVAR[\\s]+[a-z][A-Za-z0-9-]*))(\\>\\>([a-z][A-Za-z0-9-]*))*)|(\'(.)*\'))$#';
     $usage = "{TRANSLATE (VAR|LOOPVAR) a>>b|'string'}";
     parent::__construct($name, $regex, $usage);
 }
Ejemplo n.º 2
0
 /**
  * Constructs a new VAR construct.
  */
 public function __construct()
 {
     $name = 'VAR';
     $regex = '#^[a-z0-9][A-Za-z0-9-]*(\\>\\>[a-z0-9][A-Za-z0-9-]*)*$#';
     $usage = '{VAR a>>b}';
     parent::__construct($name, $regex, $usage);
 }
Ejemplo n.º 3
0
 /**
  * Constructs a new LISTFUNCTIONS construct.
  */
 public function __construct()
 {
     $name = 'LISTFUNCTIONS';
     $regex = '#^$#';
     $usage = '{LISTFUNCTIONS}';
     parent::__construct($name, $regex, $usage);
 }
Ejemplo n.º 4
0
 /**
  * Constructs a new DUMP construct.
  */
 public function __construct()
 {
     $name = 'DUMP';
     $regex = '#^$#';
     $usage = '{DUMP}';
     parent::__construct($name, $regex, $usage);
 }
Ejemplo n.º 5
0
 /**
  * Constructs a new ENDFOR construct.
  */
 public function __construct()
 {
     $name = 'ENDFOR';
     $regex = '#^$#';
     $usage = '{ENDFOR}';
     parent::__construct($name, $regex, $usage);
 }
Ejemplo n.º 6
0
 /**
  * Constructs a new FOR construct.
  */
 public function __construct()
 {
     $name = 'FOR';
     $regex = '#^((ALL)|(((VAR[\\s]+[a-z0-9][A-Za-z0-9-]*)|(LOOPVAR[\\s]+[a-z][A-Za-z0-9-]*))(\\>\\>([a-z0-9][A-Za-z0-9-]*))*))[\\s]+AS[\\s]+[a-z][A-Za-z0-9-]*$#';
     $usage = '{FOR (ALL|(VAR|LOOPVAR a>>b)) AS c}';
     parent::__construct($name, $regex, $usage);
 }
Ejemplo n.º 7
0
 /**
  * Constructs a new ELSEIF construct.
  */
 public function __construct()
 {
     $name = 'ELSEIF';
     $regex = '#^((VAR[\\s]+[a-z0-9][A-Za-z0-9-]*)|(LOOPVAR[\\s]+[a-z][A-Za-z0-9-]*))(\\>\\>([a-z][A-Za-z0-9-]*))*[\\s]*(((==|!=)[\\s]*((((VAR[\\s]+[a-z0-9][A-Za-z0-9-]*)|(LOOPVAR[\\s]+[a-z][A-Za-z0-9-]*))(\\>\\>[a-z0-9][A-Za-z0-9-]*)*)|((-)?[0-9]+(\\.[0-9]+)?)|true|false|null|(\'(.)+\')))|((\\<|\\<=|\\>=|>)[\\s]*((((VAR[\\s]+[a-z0-9][A-Za-z0-9-]*)|(LOOPVAR[\\s]+[a-z][A-Za-z0-9-]*))(\\>\\>[a-z0-9][A-Za-z0-9-]*)*)|((-)?[0-9]+(\\.[0-9]+)?))))$#';
     $usage = '{ELSEIF (VAR|LOOPVAR) a>>b (>|>=|==|!=|<|<=) (VAR c>>d|null|true|false|<number>) }';
     parent::__construct($name, $regex, $usage);
 }
Ejemplo n.º 8
0
 /**
  * Constructs a new FUNCTION construct.
  */
 public function __construct()
 {
     $name = 'FUNCTION';
     $regex = '#^[a-z0-9][A-Za-z0-9-_]*[\\s]*\\((((VAR[\\s]+[a-z0-9][A-Za-z0-9-]*)|(LOOPVAR[\\s]+[a-z][A-Za-z0-9-]*))(\\>\\>([a-z0-9][A-Za-z0-9-]*))*)[\\s]*(,[\\s]*(((-)?[0-9]+(\\.[0-9]+)?)|(\'(.)+\')))*[\\s]*\\)$#';
     $regex = '#^[a-z0-9][A-Za-z0-9-_]*[\\s]*\\((((VAR[\\s]+[a-z0-9][A-Za-z0-9-]*)|(LOOPVAR[\\s]+[a-z][A-Za-z0-9-]*))(\\>\\>([a-z0-9][A-Za-z0-9-]*))*)[\\s]*(,[\\s]*(((-)?[0-9]+(\\.[0-9]+)?)|(\'(.)+\')))*[\\s]*\\)$#';
     $usage = '{FUNCTION function((VAR|LOOPVAR) a>>b|number,...)}';
     parent::__construct($name, $regex, $usage);
 }