
Hello everyone,
I have a language with context sensitive keywords. For this language I have a hand-coded lexer and parser. The parser determines whether an identifier token is a keyword and then modifies its type to aid syntax highlighting.
I am trying to wrap the lexer and parser to create a syntax editor for this language.
Is it possible to update the syntax highlighting after parse requests have been performed in the background, so the syntax editor reflects the changes made to the tokens by the parser? I have not found a way to do so, but I could easily have missed something.
If this is not possible, is there maybe a way around it, a way to effectively achieve the same effect?
I can always run the parser in the lexer phase of the syntax editor, but I fear that that will be too slow.
Any help is appreciated.
Taco.
I have a language with context sensitive keywords. For this language I have a hand-coded lexer and parser. The parser determines whether an identifier token is a keyword and then modifies its type to aid syntax highlighting.
I am trying to wrap the lexer and parser to create a syntax editor for this language.
Is it possible to update the syntax highlighting after parse requests have been performed in the background, so the syntax editor reflects the changes made to the tokens by the parser? I have not found a way to do so, but I could easily have missed something.
If this is not possible, is there maybe a way around it, a way to effectively achieve the same effect?
I can always run the parser in the lexer phase of the syntax editor, but I fear that that will be too slow.
Any help is appreciated.
Taco.