コード例 #1
0
bool IntermNodePatternMatcher::match(TIntermBinary *node, TIntermNode *parentNode)
{
    // L-value tracking information is needed to check for dynamic indexing in L-value.
    // Traversers that don't track l-values can still use this class and match binary nodes with
    // this variation of this method if they don't need to check for dynamic indexing in l-values.
    ASSERT((mMask & kDynamicIndexingOfVectorOrMatrixInLValue) == 0);
    return matchInternal(node, parentNode);
}
コード例 #2
0
ファイル: WCPattern.cpp プロジェクト: 0xmono/miranda-ng
int NFAGreedyQuantifierUNode::matchInternal(const CMString & str, WCMatcher * matcher, const int curInd, const int soFar) const
{
	if (soFar >= max)
		return next->match(str, matcher, curInd);

	int i = inner->match(str, matcher, curInd);
	if (i != -1) {
		int j = matchInternal(str, matcher, i, soFar + 1);
		if (j != -1)
			return j;
	}
	return next->match(str, matcher, curInd);
}
コード例 #3
0
bool IntermNodePatternMatcher::match(TIntermBinary *node,
                                     TIntermNode *parentNode,
                                     bool isLValueRequiredHere)
{
    if (matchInternal(node, parentNode))
    {
        return true;
    }
    if ((mMask & kDynamicIndexingOfVectorOrMatrixInLValue) != 0)
    {
        if (isLValueRequiredHere && IsDynamicIndexingOfVectorOrMatrix(node))
        {
            return true;
        }
    }
    return false;
}
コード例 #4
0
ファイル: WCPattern.cpp プロジェクト: 0xmono/miranda-ng
int NFAGreedyQuantifierUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
{
	int t = NFAQuantifierUNode::match(str, matcher, curInd);
	if (t != -1) return matchInternal(str, matcher, t, min);
	return t;
}