File: condterm.cc

package info (click to toggle)
filtermail 1.06.00-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,688 kB
  • sloc: cpp: 2,487; fortran: 249; makefile: 106; ansic: 51; sh: 36
file content (26 lines) | stat: -rw-r--r-- 942 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//#define XERR
#include "parser.ih"

    // at condTerm its rules have been handled. If d_condition is false the
    // full (and-combined) condition is false, and no further actions are 
    // required. If true, d_condition's value is set to the d_rule match
    // return, updated with 'truth'. If now false then no file switches for
    // subsequent and-terms are needed. At the next 'if'
    // 'startIf' reactivates file switching

void Parser::condTerm()
{
    if (d_onlyParse)                    // earlier term already failed: done
        return;
                                        // no use checking subsequent
                                        // conditions if the current condition
                                        // fails.
    if (not d_filter.matchCondition())      // condition/matched
    {
        d_onlyParse = true;
        d_scanner.stopFileSwitching();  // value is hereafter irrelevant. 
    }
}