Using integer-based token IDs in semantic parsing

SyntaxEditor for Windows Forms Forum

Posted 16 years ago by Alexander Pavlyshak
Version: 4.0.0277
Avatar
Hi

SyntaxEditor documentation Language Definition Guide -> Parsing Stages -> Semantic Parsing paragraph says that "During the examination of the tokens, semantic parsers can look at either the string-based key or the integer-based ID of an IToken."

What does it mean and how to use token IDs in semantic parsing?
I'm using semantic parser generated by SyntaxEditor parser generator.

Comments (1)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
IToken defines an ID and a Key property. Our generated semantic parsers compare against the token IDs since integer matching is faster than string matching. This just means that when doing tests to ensure that the next token is an identifier token for instance, we look for an ID value on the token that means it is an identifier versus looking at the Key that says "Identifier". If you are using our generated semantic parser then you are already using the faster IDs.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.