Historical forum-msg-id-137037-edit, Revision 1

Original date:2022-09-21 10:09:04 Edited by: petelomax Subject: Re: Allegro Wrapper?

ghaberek said...

Right now ... I need better tools to visualize the Euphoria source code, intermediate language, and symbol table to better understand how everything works,

Indeed, having a visual display of the parse tree proved very helpful when writing the transpiler, and to a lesser/more short term extent the token list.
It was not particularly difficult either, while this is phix and in fact p2js-specific, the main bit of code was just

            elsif what="PARSETREE" then 
                sequence tree_nodes = treeify(ast) 
                if tree_dlg=NULL then 
                    tree = IupTreeView(tree_nodes) 
                    IupSetCallback(tree, "SELECTION_CB", Icallback("selection_cb")) 
                    tree_dlg = IupDialog(tree) 
                    IupSetAttribute(tree_dlg,"TITLE","Parse Tree") 
                    IupSetCallback(tree_dlg, "CLOSE_CB", Icallback("close_sub_cb")) 
                end if 
                IupConfigDialogShow(config, tree_dlg, "ParseTree") 
Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu