|
Rules Syntax Checker1 b, ~& M ^" e7 B4 @7 Q
The rules_syntax_checker is a utility you can run on a rule file to validate the syntax of its5 H# Y3 I" i% @& o; ~' I
statements. The full path to this executable is
( X ~2 R/ q8 X$MGC_HOME/shared/pkgs/icv.${VCO}/tools/misc/rules_syntax_checker. As shown in the' {8 B8 n2 n( x& M) }* H, z, B
following example, this utility prompts you for the name of the rule file and then runs the check.$ @) h* v' g! I( }6 ? J0 E. D
It creates a zero length file named “compiled” if you answer “y(es)”.
5 D! ~4 F3 w$ @5 I' Q& |& Hrules_syntax_checker
3 r- S2 p2 ^0 j0 F" r' `Please input the file name (CTRL-D to abort): rule_file6 d; j# Z4 _- u2 L) o! F# Y. F, g
13-72 Calibre Verification User’s Manual
# v% v" Y$ x# X. x' C0 p, JUtilities
7 H1 G F% B- o: I0 f9 p& N4 ^. _Rules Syntax Checker
2 T* T: ~8 ` _6 |; rSuccessful compilation; compilation time = 0.02
. ~% H- r- g7 @5 a0 n1 }You can also specify the pathname to the rule file upon invocation, as follows:
8 k& J3 @0 s( d1 m. H, frules_syntax_checker rule_file8 |# B4 W& w) b1 d' {! l
You may want to do this if you are writing a shell script to automate the process.% @9 o" Y' _8 Q% J f4 Q
Encountering an error terminates the check. The rule file compiler generates an error message/ N+ x/ T, _/ o
for the first such mistake it finds where the offending word sequence appears in the error6 U# X5 N0 w2 Q/ T
message. For example:
! H! C! K4 d: |; ]7 t7 r- v4 }Error INP1 on line 15 of rule_file - superfluous or invalid input object:; B$ G& Y' D7 B
SORCE.5 J- H" p: m5 Z( N, d
After correcting the first such error, recheck the rule file to find the next error. Repeat this
/ C8 O5 ]9 B' m% }process until the rule file generates no syntax errors. |
|