In this case, the triggering event is an XML token that is parsed when the application advances the parser along the token stream using the appropriate method.
这里的触发事件是随着应用程序使用适当的方法推动解析器在标记流中前进而解析出来的XML标记。
For example, if a statement starts with a token corresponding to "enum" (declaring an enumeration), the CDT parser will try to match the statement to its abstract model of an enum statement.
例如,如果语句以一个与“enum”(声明一个枚举)相应的标记作为开始,CDT解析器会试图将该语句同enum语句的抽象模型匹配起来。
Any of the so-called control characters (those with a hex value below 0x20, the space character) can cause your parser to stop with an invalid token error.
所有所谓的控制字符(那些16进制值低于0x20的字符,空格字符)可能会导致您的解析器因为一个无效的标记错误而停止工作。
If the next token isn't an integer, the parser throws an exception.
如果下一个记号不是整数,则解析器抛出异常。
The generated lexical parser may read multiple characters ahead before it detects a token.
所生成的词法解析器可能会在检测到某个符号之前读入多个字符。
The lexers for case-insensitive languages like Pascal and VHDL are slightly more complicated because they must parse, for example, begin and begin and generate the same token for the parser.
Pascal和VHDL等大小写敏感语言中的lexer要复杂一些,因为它们必须解析begin和begin等内容并为解析器生成相同的标记。
The other token field, t.kind, is assigned an enum indicating that this particular token is an integer and not another kind of token that's known to the parser.
另一个token字段t . k ind被赋值为一个枚举(enum),表明这个特殊的记号是一个整数,而不是解析器所知的另一种类型的记号。
Since a lexical analyzer is actually nothing more than a parser optimized to process data into token streams, Spirit treats both parts of the process virtually identically.
由于词法分析器实际上只是优化,加工成令牌流数据分析器多,精神对待这一进程的两个部分几乎相同。
A comment token is a string that, when placed at the beginning of a line, indicates that the line is a comment and should be ignored by the parser.
注释标记是一个字符串,当位于行首时,指示该行是一个注释并且分析器应该忽略该行。
A comment token is a string that, when placed at the beginning of a line, indicates that the line is a comment and should be ignored by the parser.
注释标记是一个字符串,当位于行首时,指示该行是一个注释并且分析器应该忽略该行。
应用推荐