Lines Matching refs:variable

21         'variable'  => '(?:\?[^\s:\(\)\[\]\{\}\<\>\|\~\!\@\#\$\%\^\&\*\?\="]+)',
35 'variable' => array('\?(.*)', array('name')),
172 * @param var string the name of the variable
173 * @param type string the type of the variable
174 * @param hint string the type hint of the variable
193 * Constructs a variable with the given name.
195 function variable($var) {
197 return array('type'=>'variable', 'text'=>$var);
271 if(preg_match("/^({$p->variable})\s*(?:\((asc|desc)(?:ending)?\))?$/S",utf8_trim($line['text']),$match)) {
272 $var = $p->variable($match[1]);
277 $result['ordering'][] = array('variable'=>$var->name, 'direction'=>($match[2]?:'asc'));
298 if(preg_match("/({$p->variable})$/",utf8_trim($line['text']),$match)) {
299 $var = $p->variable($match[1]);
322 if(preg_match("/^({$p->variable})$/",utf8_trim($line['text']),$match)) {
323 $var = $p->variable($match[1]);
415 if($f['lhs']['type'] == 'variable' && !in_array($f['lhs']['text'], $scope)) {
418 if($f['rhs']['type'] == 'variable' && !in_array($f['rhs']['text'], $scope)) {
507 if(preg_match("/^({$p->variable}|{$p->reflit})\s+({$p->variable}|{$p->predicate})\s*({$p->type})?\s*:\s*({$p->any})$/S",$line,$match)) {
512 $subject = $this->variable($subject);
524 $predicate = $this->variable($predicate);
533 // match a proper type variable
534 if(preg_match("/^({$p->variable})\s*({$p->type})?$/",$object,$captures)!=1) {
541 $object = $this->variable($var);
571 } elseif(preg_match("/^({$p->variable})\s*({$p->type})?\s*({$p->operator})\s*({$p->variable})\s*({$p->type})?$/S",$line, $match)) {
574 $lhs = $this->variable($lhs);
575 $rhs = $this->variable($rhs);
605 } elseif(preg_match("/^({$p->variable})\s*({$p->type})?\s*({$p->operator})\s*({$p->any})$/S",$line, $match)) {
610 $lhs = $this->variable($lhs);
644 } elseif(preg_match("/^({$p->any})\s*({$p->operator})\s*({$p->variable})\s*({$p->type})?$/S",$line, $match)) {
647 $rhs = $this->variable($rhs);
721 if(preg_match("/^({$p->variable})\s*({$p->aggregate})?\s*({$p->type})?(?:\s*(:)\s*({$p->any})?\s*)?$/S",$line, $match)) {
723 $variable = $p->variable($var)->name;
724 if(!$nocaphint || (!$nocaphint && !$caption)) $caption = ucfirst($variable);
729 $this->updateTypemap($typemap, $variable, $type, $hint);
730 $result[] = array('variable'=>$variable,'caption'=>$caption, 'aggregate'=>$agg, 'aggregateHint'=>$agghint, 'type'=>$type, 'hint'=>$hint);
747 if(preg_match_all("/\s*({$p->variable})\s*({$p->aggregate})?\s*({$p->type})?\s*(?:(\")([^\"]*)\")?/",$line,$match, PREG_SET_ORDER)) {
755 $variable = $p->variable($var)->name;
758 if(!$caption_indicator) $caption = ucfirst($variable);
759 $this->updateTypemap($typemap, $variable, $type, $hint);
760 $result[] = array('variable'=>$variable,'caption'=>$caption, 'aggregate'=>$agg, 'aggregateHint'=>$agghint, 'type'=>$type, 'hint'=>$hint);
775 return "(?:\s*{$p->variable}\s*{$p->aggregate}?\s*{$p->type}?".($captions?'\s*(?:"[^"]*")?':'').")";
991 list(, $variable, $multi, $value) = $match;
992 $this->_setPropertyValue($properties, $tree['tag'], $lineNode, $variable, !empty($multi), $value, $propertyValues);
1016 function _setPropertyValue($properties, $group, $region, $variable, $isMulti, $value, &$propertyValues) {
1017 if (!isset($properties[$variable])) {
1027 $this->emitError($region, 'error_property_unknownproperty', hsc($group), hsc($variable), $propertyList);
1028 } else if (isset($propertyValues[$variable])) {
1030 $this->emitError($region, 'error_property_multi', hsc($group), hsc($variable));
1032 $p = $properties[$variable];
1043 $this->emitError($region, 'error_property_notmulti', hsc($group), hsc($variable), $minOccur);
1050 $this->emitError($region, 'error_property_occur', hsc($group), hsc($variable), $minOccur, count($values));
1052 $this->emitError($region, 'error_property_occurrange', hsc($group), hsc($variable), $minOccur, $maxOccur, count($values));
1076 $this->emitError($region, 'error_property_invalidchoice', hsc($group), hsc($variable), hsc($v), implode(', ', $choicesInfo));
1079 $propertyValues[$variable] = array_map(function($v) use ($choices) { return $choices[$v]; }, $values);
1086 $this->emitError($region, 'error_property_patterndesc', hsc($group), hsc($variable), hsc($v), $p['pattern_desc']);
1088 $this->emitError($region, 'error_property_pattern', hsc($group), hsc($variable), hsc($v), hsc($p['pattern']));
1092 $propertyValues[$variable] = $values;
1095 $propertyValues[$variable] = $values;