I have read the docs and have not found an answer yet.
I need to write some code that translates BASIC and Pascal source to Python.
I could write my own parser for those languages, but my current strategy is to load the BASIC code into a SyntaxEditor control, apply the free VBScript and Pascal langauges to the editor, let the language get the tokens and parse the code, and then let me get the token stream and AST to use as input to my python code generator.
I have the editor created and the language highlighted in the editor for both BASIC and PASCAL just fine.
Now, how do I get to the tokens and parse data?
Here is where I have started, but don't really see how to get the TokenSet or other streams that I will need.
var parseData = mySyntaxEditor.Document.ParseData;
IParser parser = mySyntaxEditor.Document.Language.GetParser();
var lexer = mySyntaxEditor.Document.Language.GetLexer();
Where do I start?
Thanks very much.