|
Rules Syntax Checker
3 Q3 ^7 d$ K- [7 n# G0 M, xThe rules_syntax_checker is a utility you can run on a rule file to validate the syntax of its) p/ F6 O g( ~- ]# b; [; O6 i
statements. The full path to this executable is
3 P3 S9 l- q- n( ?) y$ W8 i7 B7 I$MGC_HOME/shared/pkgs/icv.${VCO}/tools/misc/rules_syntax_checker. As shown in the
9 Y* h4 H( \' D* e$ E6 Xfollowing example, this utility prompts you for the name of the rule file and then runs the check.' m. N9 z% D2 }( Y" R2 b8 Q
It creates a zero length file named “compiled” if you answer “y(es)”.& e6 D# E1 r. f: x# g4 V6 B" Q! m
rules_syntax_checker/ P1 ]- d- b- b. w& Y
Please input the file name (CTRL-D to abort): rule_file
4 c7 R( I* `0 Y13-72 Calibre Verification User’s Manual( L3 m0 ?/ k, Q/ ?7 i* y
Utilities
- }( a% S% P. E$ B* B% I( hRules Syntax Checker% @) x1 v" X% @* f; J$ h
Successful compilation; compilation time = 0.02
. c4 C% @, }6 v) C1 }* Z; [You can also specify the pathname to the rule file upon invocation, as follows:+ p- O" ?3 ~( c4 W4 w% v! X
rules_syntax_checker rule_file" G, f% g" J- U/ X& X/ v# B
You may want to do this if you are writing a shell script to automate the process.& c/ [+ q( s, W! _
Encountering an error terminates the check. The rule file compiler generates an error message
( r6 Z( u/ ~' \8 ~* j9 E, J3 F3 qfor the first such mistake it finds where the offending word sequence appears in the error
- w, ^$ z) q5 t& n4 e0 Smessage. For example:0 N5 o% [0 f+ i( V9 u2 u* h1 I
Error INP1 on line 15 of rule_file - superfluous or invalid input object:$ L8 B: ?# B, R5 p
SORCE.8 k/ C# K5 w, Z% ?2 o; X
After correcting the first such error, recheck the rule file to find the next error. Repeat this8 @ C1 ~$ u! D: v3 O
process until the rule file generates no syntax errors. |
|