|
Rules Syntax Checker3 T3 }4 m0 K& _' L( E2 i5 t+ C
The rules_syntax_checker is a utility you can run on a rule file to validate the syntax of its
" @$ Q: L/ V4 j0 rstatements. The full path to this executable is U Z( s/ _; A* \' u6 E, M- ^
$MGC_HOME/shared/pkgs/icv.${VCO}/tools/misc/rules_syntax_checker. As shown in the
& k& e0 {' I& F2 cfollowing example, this utility prompts you for the name of the rule file and then runs the check.2 Q; ^4 O$ A1 @1 a- S3 i
It creates a zero length file named “compiled” if you answer “y(es)”.
& N& Y8 s) u- U* \% E+ ?rules_syntax_checker% V$ [) T. `, K& p4 n
Please input the file name (CTRL-D to abort): rule_file
" }8 X8 w n. Z13-72 Calibre Verification User’s Manual
& x4 I: {, p5 n VUtilities' C0 s; N8 Y! u' N; _
Rules Syntax Checker
2 _7 I, x& W6 h& x" p6 {Successful compilation; compilation time = 0.02
/ }, X; o$ o3 A6 e( f2 pYou can also specify the pathname to the rule file upon invocation, as follows:
- c# X; x1 W0 {% Mrules_syntax_checker rule_file
2 B, b( x8 F+ @- H% g; |! W( W/ OYou may want to do this if you are writing a shell script to automate the process.
1 m+ Z5 Z- g; w. e, A& U& gEncountering an error terminates the check. The rule file compiler generates an error message8 l6 U( u$ G$ h& _+ R: l) X
for the first such mistake it finds where the offending word sequence appears in the error" Y6 d0 y2 o6 a5 S8 O6 h. D
message. For example:4 R! L [* }1 d) A2 S/ X
Error INP1 on line 15 of rule_file - superfluous or invalid input object:
6 ]3 u* m3 @) {% D" JSORCE.7 F% }% {( y% N, r- a
After correcting the first such error, recheck the rule file to find the next error. Repeat this
' [. g. O' S+ @1 a7 F+ K- J" V) l( Pprocess until the rule file generates no syntax errors. |
|