|
Rules Syntax Checker
: U1 [6 [# P/ c3 aThe rules_syntax_checker is a utility you can run on a rule file to validate the syntax of its: o5 z3 E7 H* P9 b$ D
statements. The full path to this executable is+ m F) L; V8 H/ ]& }6 o
$MGC_HOME/shared/pkgs/icv.${VCO}/tools/misc/rules_syntax_checker. As shown in the
! U9 @% y6 S. U9 x" p0 p% \4 qfollowing example, this utility prompts you for the name of the rule file and then runs the check.
$ Z& ?$ Y4 a7 j: p3 o5 V6 e* _; `It creates a zero length file named “compiled” if you answer “y(es)”.
* }, G+ J7 g6 T, H2 B9 R& ?- ~rules_syntax_checker
, n6 w0 d8 V, q( W: dPlease input the file name (CTRL-D to abort): rule_file
" p' H! G6 t4 {7 W3 e( I: T4 I13-72 Calibre Verification User’s Manual6 A% t5 l5 b- \7 F
Utilities4 @; H# n0 }' L# T4 X0 ?. e
Rules Syntax Checker
* F) p; U8 h/ \Successful compilation; compilation time = 0.02& L" f- B% g3 p- Q* z/ ]
You can also specify the pathname to the rule file upon invocation, as follows:0 ^! @8 m f4 t% Z% }& q8 e
rules_syntax_checker rule_file
! @ V2 b A7 Q! CYou may want to do this if you are writing a shell script to automate the process.% O. r# @* H8 ?- }" z
Encountering an error terminates the check. The rule file compiler generates an error message4 \- O% H) r4 J0 `
for the first such mistake it finds where the offending word sequence appears in the error+ T0 y$ [8 ^9 @! P( u; _
message. For example:
3 T* h) R0 r, p5 [- r% ^$ }6 oError INP1 on line 15 of rule_file - superfluous or invalid input object:
# ~. d j$ _; c* h, eSORCE.
4 K6 G4 a0 @8 J N0 {: j: pAfter correcting the first such error, recheck the rule file to find the next error. Repeat this
; C2 z8 H& u3 ^* v. Kprocess until the rule file generates no syntax errors. |
|