|
Rules Syntax Checker2 y1 w: }* I- K3 O2 I# B" r
The rules_syntax_checker is a utility you can run on a rule file to validate the syntax of its) c6 d: ]4 }, w& `; p: {
statements. The full path to this executable is3 ^6 _3 W4 |9 U: U% u) Y
$MGC_HOME/shared/pkgs/icv.${VCO}/tools/misc/rules_syntax_checker. As shown in the
1 k7 x/ N0 r2 V. J0 c) k( c" K5 D% nfollowing example, this utility prompts you for the name of the rule file and then runs the check.
+ }% h7 I# D$ W6 o6 m" {It creates a zero length file named “compiled” if you answer “y(es)”.4 O& n" E5 @; p) S
rules_syntax_checker
" H! p7 N- C- O! h" I4 K0 ePlease input the file name (CTRL-D to abort): rule_file
* B' R$ W9 V& C% A( x4 p+ g+ C13-72 Calibre Verification User’s Manual
|; I& I+ X+ Z$ }1 n: `Utilities
+ O, Z% z0 c' q. [ E7 w) qRules Syntax Checker
3 v8 V) n0 f7 J& x: z+ Y* OSuccessful compilation; compilation time = 0.021 [- N8 s' z9 k8 a5 L; H0 P
You can also specify the pathname to the rule file upon invocation, as follows:
7 p& p2 A7 g6 g2 j" grules_syntax_checker rule_file5 o9 T6 N) c+ Q7 r) ^8 V/ H/ ?
You may want to do this if you are writing a shell script to automate the process.
6 o9 [+ d: f7 U3 k) gEncountering an error terminates the check. The rule file compiler generates an error message4 C/ J& V6 O& w* S2 \# |
for the first such mistake it finds where the offending word sequence appears in the error+ d- O) j+ W1 ?
message. For example:
# ~. `7 Y) T+ X2 B; GError INP1 on line 15 of rule_file - superfluous or invalid input object:
0 u( {! I+ `. ySORCE.: }6 P% |3 r E* D& y6 k* i
After correcting the first such error, recheck the rule file to find the next error. Repeat this) t" m! E/ X, s8 h
process until the rule file generates no syntax errors. |
|