/[anubis]/anubis/src/rcfile.y
ViewVC logotype

Diff of /anubis/src/rcfile.y

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by gray, Thu Jun 19 16:48:09 2003 UTC revision 1.14 by gray, Fri Jun 20 15:08:23 2003 UTC
# Line 86  static int debug_level; Line 86  static int debug_level;
86  %left AND  %left AND
87  %left NOT  %left NOT
88    
89  %type <string> begin keyword string option opt_key arg  %type <string> begin keyword string option key opt_key arg
90  %type <section> section seclist  %type <section> section seclist
91  %type <stmtlist> stmtlist  %type <stmtlist> stmtlist
92  %type <stmt> stmt asgn_stmt cond_stmt rule_stmt inst_stmt  %type <stmt> stmt asgn_stmt cond_stmt rule_stmt inst_stmt
# Line 244  meq      : /* empty */ Line 244  meq      : /* empty */
244           | '='           | '='
245           ;           ;
246    
247  opt_key  : /* empty */  key      : '[' string ']'
            {  
                    $$ = NULL;  
            }  
          | '[' string ']'  
248             {             {
249                     $$ = $2;                     $$ = $2;
250             }             }
251           ;           ;
252    
253    opt_key  : /* empty */
254               {
255                       $$ = NULL;
256               }
257             | key
258             ;
259    
260  msgpart  : T_MSGPART opt_key  msgpart  : T_MSGPART opt_key
261             {             {
262                     $$.part = $1;                     $$.part = $1;
# Line 379  inst_stmt: STOP Line 382  inst_stmt: STOP
382                     $$->v.inst.key2 = $3;                     $$->v.inst.key2 = $3;
383                     $$->v.inst.arg  = $4;                     $$->v.inst.arg  = $4;
384             }             }
385             | MODIFY msgpart key
386               {
387                       $$ = rc_stmt_create(rc_stmt_inst);
388                       $$->v.inst.opcode = inst_modify;
389                       $$->v.inst.part = $2.part;
390                       $$->v.inst.key  = $2.key;
391                       $$->v.inst.key2 = $3;
392                       $$->v.inst.arg  = NULL;
393               }
394           ;           ;
395    
396  %%  %%
# Line 842  static void inst_eval(struct eval_env *e Line 854  static void inst_eval(struct eval_env *e
854  void  void
855  inst_eval(struct eval_env *env, RC_INST *inst)  inst_eval(struct eval_env *env, RC_INST *inst)
856  {  {
857          char *arg, *argp = NULL;          char *arg = NULL, *argp = NULL;
858    
859          if (!env->msg)          if (!env->msg)
860                  return; /* FIXME: bail out? */                  return; /* FIXME: bail out? */

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26