2012-05-20 17:18:18 +03:00
|
|
|
REF=R[0-9]* {
|
|
|
|
T=R
|
2012-05-21 03:55:54 +03:00
|
|
|
VAL=(#R) { R=$1 }
|
2012-05-20 17:18:18 +03:00
|
|
|
TOL = 5%
|
2012-05-21 03:55:54 +03:00
|
|
|
FN=*% { TOL=$$ }
|
2012-05-20 17:18:18 +03:00
|
|
|
break REF
|
|
|
|
// end break again
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2012-05-21 03:55:54 +03:00
|
|
|
pattern:
|
|
|
|
() | like in RE
|
|
|
|
* ? like in glob
|
|
|
|
(#U) expect a numeric value of unit U (use substring to get canonical value)
|
|
|
|
|
2012-05-20 17:18:18 +03:00
|
|
|
subst: $1 ... $field
|
|
|
|
|
|
|
|
substring:
|
|
|
|
$1, $2, ...
|
|
|
|
variable:
|
|
|
|
$foo, ...
|
|
|
|
with curly braces:
|
|
|
|
${foo}, ...
|
|
|
|
input variable:
|
|
|
|
$$
|
2012-05-21 03:55:54 +03:00
|
|
|
|
|
|
|
Caveat:
|
|
|
|
|
|
|
|
Wrong: FN=* { X=$FN } there is no variable called FN
|
|
|
|
Right: FN=* { X=$$ } yields the Fn field selected by FN
|
|
|
|
|
|
|
|
Wrong: VAL=(#R) { R=$VAL } yields literal value
|
|
|
|
Wrong: VAL=(#R) { R=$$ } yields literal value
|
|
|
|
Right: VAL=(#R) { R=$1 } yield canonicalized value
|
2012-05-20 17:18:18 +03:00
|
|
|
*/
|