Hello max
>> "i am also interested in ring parser. ring is opensource. does anyone have an idea how to use lexer and parser from ring without executing the code."
Ring parser which is written in C doesn't produce AST
It uses the Code Generator directly, to produce the Byte Code
This match one of the design goals behind Ring (Small Implementation + Faster Compiler)
So, we don't have standalone parser module that you can take from Ring code and use it to get AST
What we have will produce a List of ByteCode instructions
i.e. To have AST from Ring code, You have to modify the parser code and customize it.
>> "the TokensLib + Ring Parser (Converted from C to Ring) is that available on github?"
This is part of PWCT2 source code which is not open-source at the current stage
What I did is simple
Using TokensLib ---> I can get the tokens from Ring source code file
I converted stmt.c and expr.c to Ring Classes while removing anything related to CodeGen
(Each class is less than one thousand lines of code)
I did the conversion in one day since it's easy to convert this C code to Ring code (Thanks to supporting the Braces Style in Ring)
Then I customized the output of these classes to produce PWCT visual source file instead of ByteCode
Greetings,
Mahmoud