|
Rules Syntax Checker# G. u1 d! r, \/ a) _) V5 ?* r
The rules_syntax_checker is a utility you can run on a rule file to validate the syntax of its
' k! C* r8 T! l8 v5 _- @; estatements. The full path to this executable is
( q3 O+ G& g+ [/ D+ {4 s# v! E$MGC_HOME/shared/pkgs/icv.${VCO}/tools/misc/rules_syntax_checker. As shown in the6 w8 Z0 w8 ?/ @3 Z4 n. I9 i7 F
following example, this utility prompts you for the name of the rule file and then runs the check.
& t7 {5 y9 i W1 h8 KIt creates a zero length file named “compiled” if you answer “y(es)”.
: @! a4 J& c( h, f) frules_syntax_checker* ~# w. |6 J( I" ?0 B( R
Please input the file name (CTRL-D to abort): rule_file
) O0 i1 A8 U) U& }$ L: T6 v13-72 Calibre Verification User’s Manual
, N4 ]# l% g! IUtilities+ ]; k$ ]/ c; Y' U5 \3 }# u, _
Rules Syntax Checker
. o" K1 E- b8 Z. L$ l }Successful compilation; compilation time = 0.02
* ~! h/ Z( X/ L2 y; R: y+ \You can also specify the pathname to the rule file upon invocation, as follows:
# T8 j) ^* Y+ k/ V; u5 Irules_syntax_checker rule_file4 G, Z# C8 M, I& C; ^8 k5 x0 {
You may want to do this if you are writing a shell script to automate the process." `* _+ ~$ M* d5 }% Z, m6 k
Encountering an error terminates the check. The rule file compiler generates an error message
' R, f& f x ^. C/ [0 q' |. zfor the first such mistake it finds where the offending word sequence appears in the error' O5 K' \8 i# } i# [2 w8 B
message. For example:9 {2 P4 L$ q9 I' I% \
Error INP1 on line 15 of rule_file - superfluous or invalid input object:
2 d/ k+ j% I" v8 J, cSORCE.
' a1 H4 K8 v* T0 G) ^3 k. L- BAfter correcting the first such error, recheck the rule file to find the next error. Repeat this' ]' Q' V& I* p& @5 w' v' }
process until the rule file generates no syntax errors. |
|