Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

src/p/y/PyContracts-1.6.0/src/contracts/pyparsing_utils.py   PyContracts(Download)
from .syntax import (Forward, Suppress, FollowedBy, Group, OneOrMore, Optional,
                     opAssoc)
 
 
def myOperatorPrecedence(baseExpr, opList):
    ret.setName('operatorSystem(%s)' % opnames)
#    parenthesis = Suppress('(') + ret + FollowedBy(NotAny(oneOf(allops))) - Suppress(')')
    parenthesis = Suppress('(') - ret - Suppress(')')
    lastExpr = parenthesis.setName('parenthesis(%s)' % opnames) | baseExpr
    lastExpr.setName('Base operand (%s) or parenthesis' % baseExpr.name)

src/c/o/contracts-HEAD/src/contracts/pyparsing_utils.py   contracts(Download)
from .syntax import (Forward, Suppress, FollowedBy, Group, OneOrMore, Optional,
                     opAssoc)
 
 
def myOperatorPrecedence(baseExpr, opList):
    ret.setName('operatorSystem(%s)' % opnames)
#    parenthesis = Suppress('(') + ret + FollowedBy(NotAny(oneOf(allops))) - Suppress(')')
    parenthesis = Suppress('(') - ret - Suppress(')')
    lastExpr = parenthesis.setName('parenthesis(%s)' % opnames) | baseExpr
    lastExpr.setName('Base operand (%s) or parenthesis' % baseExpr.name)