|
Rules Syntax Checker, g- X) R H1 f2 r8 [& w9 S
The rules_syntax_checker is a utility you can run on a rule file to validate the syntax of its
8 r' k; q0 ^7 R$ u f2 Hstatements. The full path to this executable is
1 p# q% h& I. q7 \, o$ s' |$MGC_HOME/shared/pkgs/icv.${VCO}/tools/misc/rules_syntax_checker. As shown in the7 @8 y# G! f$ {5 t( y! B/ v
following example, this utility prompts you for the name of the rule file and then runs the check. _ c+ {5 T$ [
It creates a zero length file named “compiled” if you answer “y(es)”.
( g; j* a! y8 b. a1 \rules_syntax_checker
% t A7 z/ d! ^Please input the file name (CTRL-D to abort): rule_file
, c1 O& T( N! {, m) i9 V( G13-72 Calibre Verification User’s Manual
2 i2 X- | N. Q/ K5 a' P& c3 @Utilities
" U( H# K1 I7 ?Rules Syntax Checker$ g# X# u% p- k4 _6 _' H/ i! P7 u3 a
Successful compilation; compilation time = 0.024 ^7 } W& D4 T' o3 b
You can also specify the pathname to the rule file upon invocation, as follows:
' G& k1 ]2 B7 l! w: k2 T, J s) Srules_syntax_checker rule_file
5 a0 R M) U0 u( j+ G, }You may want to do this if you are writing a shell script to automate the process.
5 V9 q) j# u. |! g L/ xEncountering an error terminates the check. The rule file compiler generates an error message9 f; P( |9 y1 g& s
for the first such mistake it finds where the offending word sequence appears in the error- \* o8 v# Q1 ^3 ]6 ]
message. For example:
( ?9 ?" `' g: t" ]8 Z% PError INP1 on line 15 of rule_file - superfluous or invalid input object:
1 S' `" ^1 r; K F: nSORCE.
% g6 D5 B6 m: b! UAfter correcting the first such error, recheck the rule file to find the next error. Repeat this1 d5 T4 u/ l+ t) V" L7 R4 B
process until the rule file generates no syntax errors. |
|