Posted 14 years ago
by Krzysztof
Hi,
I have written a language in xml. Now I want to write a semantic parser for it.
I know this has been a subject to many posts, but none satisfy my needs - the answers are usualy like: 'you usualy do that by writting language in code, but if you instst, you may see how we did that in out web addon'. But you don't attach code of that addon to Syntaxeditor's samples, so I can't see how it's done. You also never put any code fragments.
I thougt MergableSyntaxLanguage is all about that, but it turned out that it's rather about jumping from 1 language to another, not integrating diffrent functionalities of a single language.
I tried to use SyntaxLanguageTypeName, but your example with it is about outlining, which I don't need at all. I tried to attach a language with syntax parsing that way, but it just broke the lexer (there was no highlighting any more, no syntax parsing and no info about what went wrong).
Or mayby there is an even better thing - Thats why I thought that it is maybe possible the other way - to create a language with semantic parsing and than attach a xml file that does the lexing and highlighting. That way I would be able to debug it with VS...
So my request is: could you show me how (if it's possible at all of course) to get a lexer from xml-defined language, or add it to a language in code?
I have written a language in xml. Now I want to write a semantic parser for it.
I know this has been a subject to many posts, but none satisfy my needs - the answers are usualy like: 'you usualy do that by writting language in code, but if you instst, you may see how we did that in out web addon'. But you don't attach code of that addon to Syntaxeditor's samples, so I can't see how it's done. You also never put any code fragments.
I thougt MergableSyntaxLanguage is all about that, but it turned out that it's rather about jumping from 1 language to another, not integrating diffrent functionalities of a single language.
I tried to use SyntaxLanguageTypeName, but your example with it is about outlining, which I don't need at all. I tried to attach a language with syntax parsing that way, but it just broke the lexer (there was no highlighting any more, no syntax parsing and no info about what went wrong).
Or mayby there is an even better thing - Thats why I thought that it is maybe possible the other way - to create a language with semantic parsing and than attach a xml file that does the lexing and highlighting. That way I would be able to debug it with VS...
So my request is: could you show me how (if it's possible at all of course) to get a lexer from xml-defined language, or add it to a language in code?