
Greetings,
I have a WPF application that uses the syntax editor with a language that I have an ANTLR grammar for. I've generated the lexer and parser C# code for the language, along with also having a langdef file for syntax highlighting.
My problem is that I want to use those to auto-generate my IntelliPrompt list as the user types. Or at least use it to determine the next valid token type(s), so that can drive how I build the completion list. Looking at the QuickStart sample for IntelliPrompt, you appear to rely heavily on reading tokens and determining the context from the text. Isn't that what the parser is for?
Furthermore, looking at older samples from the WinForms SyntaxEditor, you seemed to have a much cleaner approach, with the SimpleSyntaxLanguage's ShowIntelliPromptMemberList simply grabing the compilation unit, which contained a member list.
Can you provide a sample which shows how to leverage the parser to do the heavy lifting for me? Or, for Intelliprompt purposes, is there really no point to having a parser since I'm stuck building the list in code anyway? Is there a feature that's still coming that will help enable this scenario?
Thanks very much,
-Craig
I have a WPF application that uses the syntax editor with a language that I have an ANTLR grammar for. I've generated the lexer and parser C# code for the language, along with also having a langdef file for syntax highlighting.
My problem is that I want to use those to auto-generate my IntelliPrompt list as the user types. Or at least use it to determine the next valid token type(s), so that can drive how I build the completion list. Looking at the QuickStart sample for IntelliPrompt, you appear to rely heavily on reading tokens and determining the context from the text. Isn't that what the parser is for?
Furthermore, looking at older samples from the WinForms SyntaxEditor, you seemed to have a much cleaner approach, with the SimpleSyntaxLanguage's ShowIntelliPromptMemberList simply grabing the compilation unit, which contained a member list.
Can you provide a sample which shows how to leverage the parser to do the heavy lifting for me? Or, for Intelliprompt purposes, is there really no point to having a parser since I'm stuck building the list in code anyway? Is there a feature that's still coming that will help enable this scenario?
Thanks very much,
-Craig