expr : expr QUESTION expr COLON expr
552729
def p_expr_ternary_op(p):
    ''
    p[0] = ast.TernaryOp(p[1], p[3], p[5], lineno=p.lineno(2))
964384
def p_expr_list(self, p):
        ''''''
        if len(p) == 4:
            p[1].append(p[3])
            p[0] = p[1]
        elif len(p) == 2:
            p[0] = [p[1]]
48696
def p_print_list_expr(p):
    
    if p[1] in ('BOLD', 'ITALIC'):
        p[0] = make_sentence(p[1] + '_TMP',
                             make_typecast(TYPE.ubyte, p[2], p.lineno(1)))
    else:
        p[0] = p[1]
796719
def p_expr_require(p):
    ''
    p[0] = ast.Require(p[2], False, lineno=p.lineno(1))
866050
function contains_expr(arr) {
    if(!arr || !arr.length) return false;
    var l = arr.length;
    while(l-- > 0) if(LONG_SWITCH_RE.test(arr[l])) return true;
    return false;
}
296831
def parse_expr(tokens, options):
    """"""
    seq = parse_seq(tokens, options)
    if tokens.current() != '|':
        return seq
    result = [Required(*seq)] if len(seq) > 1 else seq
    while tokens.current() == '|':
        tokens.move()
        seq = parse_seq(tokens, options)
        result += [Required(*seq)] if len(seq) > 1 else seq
    return [Either(*result)] if len(result) > 1 else result
93792
def _regexp(expr, item):
    ''' 
    '''
    reg = re.compile(expr)
    return reg.search(item) is not None
1064241
def p_parens_expr(p):
    
    p[0] = node.expr(op="parens", args=node.expr_list([p[2]]))
784495
def p_expr_OR_expr(p):
    
    p[0] = make_binary(p.lineno(2), 'OR', p[1], p[3], lambda x, y: x or y)
130492
def p_expr_mod_expr(p):
    
    p[0] = make_binary(p.lineno(2), 'MOD', p[1], p[3], lambda x, y: x % y)
268420
def p_expression_Or(self, p):
        ''
        p[0] = Or(p[1], p[3], lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
728988
def p_statement_expr(self, t):
    ''''''
    if len(t)<3 :
      self.accu.add(Term('input', [t[1]]))
      print('input', t[1])
    else :
      #print(t[1], t[2], t[3]
      self.accu.add(Term('edge', ["gen(\""+t[1]+"\")","gen(\""+t[3]+"\")"]))
      self.accu.add(Term('obs_elabel', ["gen(\""+t[1]+"\")","gen(\""+t[3]+"\")",t[2]]))
52661
def is_in_expr(expr, find):
  """"""
  return expr == find or (isinstance(expr, ExprNode) and expr.is_in(find))
665646
def p_expr_noin(self, p):
        
        if len(p) == 2:
            p[0] = p[1]
        else:
            p[0] = ast.Comma(left=p[1], right=p[3])
129327
def expr_match(line, expr):
    '''
    
    '''
    if line == expr:
        return True
    if fnmatch.fnmatch(line, expr):
        return True
    try:
        if re.match(r'\A{0}\Z'.format(expr), line):
            return True
    except re.error:
        pass
    return False
1370004
def p_expr_GT_expr(p):
    
    p[0] = make_binary(p.lineno(2), 'GT', p[1], p[3], lambda x, y: x > y)
86239
def expr(self):
        
        node = self.term()

        while True:
            token = self.current_token
            if token.type == AND:
                self.eat(AND)
            elif token.type == OR:
                self.eat(OR)
            else:
                break
            node = Op(op=token, children=[node, self.term()])
        return node