当前位置: 首页>>代码示例>>C++>>正文


C++ BitSet::member方法代码示例

本文整理汇总了C++中BitSet::member方法的典型用法代码示例。如果您正苦于以下问题:C++ BitSet::member方法的具体用法?C++ BitSet::member怎么用?C++ BitSet::member使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BitSet的用法示例。


在下文中一共展示了BitSet::member方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: match

/**Make sure current lookahead symbol matches the given set
 * Throw an exception upon mismatch, which is catch by either the
 * error handler or by the syntactic predicate.
 */
void Parser::match(const BitSet& b)
{
    if ( DEBUG_PARSER )
        std::cout << "enter match(" << "bitset" /*b.toString()*/
                  << ") with LA(1)=" << LA(1) << std::endl;
    if ( !b.member(LA(1)) ) {
        if ( DEBUG_PARSER )
            std::cout << "token mismatch: " << LA(1) << " not member of "
                      << "bitset" /*b.toString()*/ << std::endl;
        throw MismatchedTokenException(tokenNames, LT(1), b, false);
    } else {
        // mark token as consumed -- fetch next token deferred until LA/LT
        consume();
    }
}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:19,代码来源:Parser.cpp

示例2: match

/**Make sure current lookahead symbol matches the given set
 * Throw an exception upon mismatch, which is catch by either the
 * error handler or by the syntactic predicate.
 */
void Parser::match(const BitSet& b)
{
	if ( DEBUG_PARSER )
	{
		traceIndent();
		ANTLR_USE_NAMESPACE(std)cout << "enter match(" << "bitset" /*b.toString()*/
			  << ") with LA(1)=" << LA(1) << ANTLR_USE_NAMESPACE(std)endl;
	}
	if ( !b.member(LA(1)) ) {
		if ( DEBUG_PARSER )
		{
			traceIndent();
			ANTLR_USE_NAMESPACE(std)cout << "token mismatch: " << LA(1) << " not member of "
				  << "bitset" /*b.toString()*/ << ANTLR_USE_NAMESPACE(std)endl;
		}
		throw MismatchedTokenException(getTokenNames(), getNumTokens(), LT(1), b, false, getFilename());
	} else {
		// mark token as consumed -- fetch next token deferred until LA/LT
		consume();
	}
}
开发者ID:guojerry,项目名称:cppxml,代码行数:25,代码来源:Parser.cpp

示例3: consumeUntil

/** Consume tokens until one matches the given token set */
void Parser::consumeUntil(const BitSet& set)
{
	while (LA(1) != Token::EOF_TYPE && !set.member(LA(1)))
		consume();
}
开发者ID:guojerry,项目名称:cppxml,代码行数:6,代码来源:Parser.cpp

示例4: match

/** Make sure current lookahead symbol matches the given set
 * Throw an exception upon mismatch, which is caught by either the
 * error handler or by the syntactic predicate.
 */
void TreeParser::match(RefAST t, const BitSet& b)
{
	if ( !t || t==ASTNULL || !b.member(t->getType()) )
		throw MismatchedTokenException( getTokenNames(), getNumTokens(),
												  t, b, false );
}
开发者ID:caiosba,项目名称:master-project,代码行数:10,代码来源:TreeParser.cpp

示例5: match

/**Make sure current lookahead symbol matches the given set
 * Throw an exception upon mismatch, which is caught by either the
 * error handler or by the syntactic predicate.
 */
void TreeParser::match(RefAST t, const BitSet& b)
{
	if ( !t || t==ASTNULL || !b.member(t->getType()) ) {
		throw MismatchedTokenException();
	}
}
开发者ID:cooljeanius,项目名称:cec,代码行数:10,代码来源:TreeParser.cpp


注:本文中的BitSet::member方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。