Hi,

I am working on a project to convert a proprietary DSL language into standard 
one. The proprietary language is executed by interpreter engine from intermedia 
representation. The challenge is maintaining the language and the runtime.

I am exploring an option to use compile-on-the-fly approach by translating the 
DSL to c, compile/execute in memory. Language is Fortran/c style, and is “safe” 
(no pointers, atomic strings, and bound-checked arrays) - most statements can 
be converted to c.

One challenge is methods. Language allow simple OO calls obj->method. The 
challenge is how to tell obj->prop (value), vs obj->method (function call). The 
translator can do it, if it will build parse tree, symbol tables. This is much 
more work than a statement by statement translator.

I was hoping it will be possible to make a small change to tcc, introduce a new 
operator (e.g. obj@func), which will be equivalent to obj->method() (function 
call) or obj->prop (member value), based on the type of the member (function 
pointers). Can anyone comment on readability of making such a change to tcc ?

Thanks, yair

Sent from my iPad
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to