|
Rules Syntax Checker# \& |. ?$ h; O6 |' c! d( _7 b9 J% l
The rules_syntax_checker is a utility you can run on a rule file to validate the syntax of its' k. ?' x8 n; }" c# C+ Z, F0 @4 Q
statements. The full path to this executable is5 F% y. a4 h. z7 E7 \0 O( l1 X
$MGC_HOME/shared/pkgs/icv.${VCO}/tools/misc/rules_syntax_checker. As shown in the
$ s# e5 \: W! ?# efollowing example, this utility prompts you for the name of the rule file and then runs the check.
l( p) B! t$ |9 o* Q( b' G; oIt creates a zero length file named “compiled” if you answer “y(es)”.
7 H/ U8 _/ e* l9 o+ ~, lrules_syntax_checker
4 h4 N. n8 @ r3 JPlease input the file name (CTRL-D to abort): rule_file5 C% W2 v' D/ t. Q& @
13-72 Calibre Verification User’s Manual
a# z+ n/ u6 O. \7 W: ZUtilities
$ ?7 O$ w: D5 k& N, o& iRules Syntax Checker' m1 r3 n! N) Q4 Q3 ^
Successful compilation; compilation time = 0.02
+ u4 l! |3 y# v9 TYou can also specify the pathname to the rule file upon invocation, as follows:
" f' v; H) y& M2 |7 ^ Krules_syntax_checker rule_file
7 B/ k7 i8 Y$ r7 r% ~! y$ k1 BYou may want to do this if you are writing a shell script to automate the process.- j6 A1 E4 A: z( l+ ?' P% G* ^
Encountering an error terminates the check. The rule file compiler generates an error message% b6 k/ l' f9 ?8 D9 S
for the first such mistake it finds where the offending word sequence appears in the error8 D/ }. S+ ~: {0 t ~" H8 I
message. For example: a& ~6 e7 x) n6 ?. r; F* U
Error INP1 on line 15 of rule_file - superfluous or invalid input object:
- C! ~% L1 r8 Z- U s: qSORCE.9 c; M' K. J# m* z2 r. c- H9 h- E
After correcting the first such error, recheck the rule file to find the next error. Repeat this( K5 N9 x; F2 ~- p) O3 |
process until the rule file generates no syntax errors. |
|