
Hi
I am trying to implement a nonmergable lexer, after using for a while a mergable one. We hope to speed up the lex and parse process. in my ILexer.Parse i call the antr lexer:
Maybe this is related to the fact that some text is scanned per line, in case of a Multiline comment or line comments e.g. gives a problem?
My questions:
1. Do you see any (obvious) mistakes in my code?
2. If i debug i see the text is often lexed per line. Is this a setting, can i adjust the textrange, why is that anyway?
3. Creating an EndOfDocument token message succeedes, but with Positions and length sh the token contain?
4. it looks like that text is lexed more than one time. Which reasons are there, and can i prevent that?
5. In ILexerContext lexerContext = parseTarget.OnPreParse(ref offsetStart); the offset is often put back the zero or begin of line, even at the end of the document. Can i discard these?
Regards
Martin
[Modified at 07/19/2010 08:50 AM]
[Modified at 07/19/2010 08:50 AM]
I am trying to implement a nonmergable lexer, after using for a while a mergable one. We hope to speed up the lex and parse process. in my ILexer.Parse i call the antr lexer:
This give often an error in the parse process (object null) of Actipro, so there must be something wrong.
Maybe this is related to the fact that some text is scanned per line, in case of a Multiline comment or line comments e.g. gives a problem?
My questions:
1. Do you see any (obvious) mistakes in my code?
2. If i debug i see the text is often lexed per line. Is this a setting, can i adjust the textrange, why is that anyway?
3. Creating an EndOfDocument token message succeedes, but with Positions and length sh the token contain?
4. it looks like that text is lexed more than one time. Which reasons are there, and can i prevent that?
5. In ILexerContext lexerContext = parseTarget.OnPreParse(ref offsetStart); the offset is often put back the zero or begin of line, even at the end of the document. Can i discard these?
Regards
Martin
[Modified at 07/19/2010 08:50 AM]
[Modified at 07/19/2010 08:50 AM]