;
cfg_var:
ID DOT ID EQUAL NUMBER {
- cfg_declare_int($1, $3, $5, NULL);
+ if (cfg_declare_int($1, $3, $5, NULL)) {
+ yyerror("variable cannot be declared");
+ }
}
| ID DOT ID EQUAL STRING {
- cfg_declare_str($1, $3, $5, NULL);
+ if (cfg_declare_str($1, $3, $5, NULL)) {
+ yyerror("variable cannot be declared");
+ }
}
| ID DOT ID EQUAL NUMBER CFG_DESCRIPTION STRING {
- cfg_declare_int($1, $3, $5, $7);
+ if (cfg_declare_int($1, $3, $5, $7)) {
+ yyerror("variable cannot be declared");
+ }
}
| ID DOT ID EQUAL STRING CFG_DESCRIPTION STRING {
- cfg_declare_str($1, $3, $5, $7);
+ if (cfg_declare_str($1, $3, $5, $7)) {
+ yyerror("variable cannot be declared");
+ }
}
| ID DOT ID EQUAL error { yyerror("number or string expected"); }
;
up-to-date config.
-6. Accessing the configuration values in the script
+6. Configuration values in the script
===============================================================================
+New configuration values can be declared in the script, the syntax is:
+
+<group_name>.<var_name> = <value> [descr <description>]
+
The values can be accessed via select calls:
@cfg_get.<group_name>.<var_name>