summaryrefslogtreecommitdiffstats
path: root/usr.sbin/i4b/isdnd/rc_parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/i4b/isdnd/rc_parse.y')
-rw-r--r--usr.sbin/i4b/isdnd/rc_parse.y73
1 files changed, 70 insertions, 3 deletions
diff --git a/usr.sbin/i4b/isdnd/rc_parse.y b/usr.sbin/i4b/isdnd/rc_parse.y
index 7d77359..bace84d 100644
--- a/usr.sbin/i4b/isdnd/rc_parse.y
+++ b/usr.sbin/i4b/isdnd/rc_parse.y
@@ -30,9 +30,11 @@
* i4b daemon - runtime configuration parser
* -----------------------------------------
*
- * $FreeBSD$
+ * $Id: rc_parse.y,v 1.24 1999/12/13 21:25:25 hm Exp $
*
- * last edit-date: [Thu May 20 14:05:26 1999]
+ * $FreeBSD$
+ *
+ * last edit-date: [Mon Dec 13 21:48:48 1999]
*
*---------------------------------------------------------------------------*/
@@ -56,6 +58,7 @@
#endif
extern void cfg_setval(int keyword);
+extern void cfg_set_controller_default();
extern void reset_scanner(FILE *infile);
extern void yyerror(const char *msg);
extern int yylex();
@@ -66,6 +69,7 @@ extern int nentries;
int saw_system = 0;
int entrycount = -1;
+int controllercount = -1;
%}
@@ -83,6 +87,7 @@ int entrycount = -1;
%token CALLOUT
%token CHANNELSTATE
%token CONNECTPROG
+%token CONTROLLER
%token DIALOUTTYPE
%token DIALRANDINCR
%token DIALRETRIES
@@ -104,6 +109,8 @@ int entrycount = -1;
%token LOCAL_PHONE_DIALOUT
%token LOCAL_PHONE_INCOMING
%token LOGEVENTS
+%token MAILER
+%token MAILTO
%token MONITOR
%token MONITORACCESS
%token MONITORPORT
@@ -112,6 +119,7 @@ int entrycount = -1;
%token NO
%token OFF
%token ON
+%token PROTOCOL
%token RATESFILE
%token RATETYPE
%token REACTION
@@ -143,6 +151,7 @@ int entrycount = -1;
%type <num> sysfilekeyword sysnumkeyword sysstrkeyword sysboolkeyword
%type <num> numkeyword strkeyword boolkeyword monrights monright
+%type <num> cstrkeyword
%type <str> filename
%union {
@@ -158,6 +167,7 @@ config: sections
sections: possible_nullentries
syssect
+ optcontrollersects
entrysects
;
@@ -174,6 +184,22 @@ entrysects: entrysect
| entrysects entrysect
;
+optcontrollersects:
+ controllersects
+ |
+ {
+ cfg_set_controller_default();
+ }
+ ;
+
+controllersects: controllersect
+ | controllersects controllersect
+ ;
+
+/* ============== */
+/* system section */
+/* ============== */
+
syssect: SYSTEM sysentries
;
@@ -305,11 +331,17 @@ sysnumkeyword: MONITORPORT { $$ = MONITORPORT; }
| RTPRIO { $$ = RTPRIO; }
;
-sysstrkeyword: ROTATESUFFIX { $$ = ROTATESUFFIX; }
+sysstrkeyword: MAILER { $$ = MAILER; }
+ | MAILTO { $$ = MAILTO; }
+ | ROTATESUFFIX { $$ = ROTATESUFFIX; }
| REGEXPR { $$ = REGEXPR; }
| REGPROG { $$ = REGPROG; }
;
+/* ============= */
+/* entry section */
+/* ============= */
+
entrysect: ENTRY
{
entrycount++;
@@ -394,4 +426,39 @@ boolkeyword: DIALRANDINCR { $$ = DIALRANDINCR; }
| USEDOWN { $$ = USEDOWN; }
;
+
+/* ================== */
+/* controller section */
+/* ================== */
+
+controllersect: CONTROLLER
+ {
+ controllercount++;
+ }
+ controllers
+ ;
+
+controllers: controller
+ | controllers controller
+ ;
+
+controller: strcontroller
+ | nullentry
+ | error '\n'
+ ;
+
+strcontroller: cstrkeyword '=' STRING '\n'
+ {
+ cfg_setval($1);
+ }
+ | cstrkeyword '=' NUMBERSTR '\n'
+ {
+ cfg_setval($1);
+ }
+ ;
+
+cstrkeyword: PROTOCOL { $$ = PROTOCOL; }
+ ;
+
+
%%
OpenPOWER on IntegriCloud