|
Rules Syntax Checker
5 J$ |% p) M5 j, ~* nThe rules_syntax_checker is a utility you can run on a rule file to validate the syntax of its
/ `) ~( x8 e3 sstatements. The full path to this executable is, Y( R3 U; ]+ j
$MGC_HOME/shared/pkgs/icv.${VCO}/tools/misc/rules_syntax_checker. As shown in the
8 t/ [5 p; N0 W7 N1 p4 Dfollowing example, this utility prompts you for the name of the rule file and then runs the check.* E/ ]' u: g2 Z1 K2 h: q
It creates a zero length file named “compiled” if you answer “y(es)”.
7 r) q* G1 E( W6 d' l' Prules_syntax_checker& X0 p2 V' e% d2 C/ k
Please input the file name (CTRL-D to abort): rule_file
& J" n$ w! Y* L' w8 k; D, R3 p9 @13-72 Calibre Verification User’s Manual
) Q) f# s X8 O; C R" CUtilities
* _$ S2 X: }$ P5 o4 f- gRules Syntax Checker. `% j% ]" ?: b
Successful compilation; compilation time = 0.02
4 o- h. E; d: d+ T# Q2 g( G! `2 NYou can also specify the pathname to the rule file upon invocation, as follows:9 i: q9 [2 q0 l+ i. m0 q. T, n
rules_syntax_checker rule_file+ B! t& ?: v. T9 S' }; V
You may want to do this if you are writing a shell script to automate the process.
( l. D0 H: o# D" o; a8 l* zEncountering an error terminates the check. The rule file compiler generates an error message
$ w5 } x" {1 Q2 xfor the first such mistake it finds where the offending word sequence appears in the error( Y) g% D6 I2 c, h
message. For example:5 q' z6 n; l) `) g( f
Error INP1 on line 15 of rule_file - superfluous or invalid input object:! O I" x0 E* k4 h7 u5 _: ?
SORCE.1 C5 H# ]+ z: h" |' Z
After correcting the first such error, recheck the rule file to find the next error. Repeat this
3 l/ e3 i$ F( S% bprocess until the rule file generates no syntax errors. |
|