Re: Looking for Program

new topic     » goto parent     » topic index » view thread      » older message » newer message

Robert Craig wrote:
> 
> Greg Haberek wrote:
> > don cole wrote:
> > > Somewhere in the Archives or Euforum, I saw something about an
> > > Euphoria Program that analized your program and gave you a list of
> > > all the Constants , Atoms, Integers, Sequences, objects and especially
> > >
> > > Does anyone know what this program is or was?
> > 
> > Parser for Euphoria Programs  by Humberto Yeverino
> > <a
> > href="http://www.rapideuphoria.com/euparse.zip">http://www.rapideuphoria.com/euparse.zip</a>
> > 
> > I've used it before, but I think it needs work. It just grabs all the
> > info without really organizing it too well. One thing I'd like it to
> > do is tell me what the parameters of a routine are and their types, in
> > order. Then I could use it to parse include files for dll wrappers.
> 
> It should be pretty easy to make a program like this now,
> using the PD interpreter source (euphoria\source). 
> After parsing, instead of executing the program, you'd display the 
> symbol table (SymTab). (skip the temps and literal values, 
> and see global.e for the symbol table fields).
> 
> Regards,
>    Rob Craig
>    Rapid Deployment Software
>    <a href="http://www.RapidEuphoria.com">http://www.RapidEuphoria.com</a>
> 

Hi,

As to Robert's suggestion, I tried it quickly and managed to send all the tokens
to a file, and to indicate they were one of the following:

1)keywords had no S_TOKEN (identifying number) but themselves (i.e. "if" is
represented by "IF")

2)procedure names are S-TOKENed by "PROC"

3)function names are S-TOKENed by "FUNC"

4)type names are S-TOKENed by "TYPE"

5)just about everything else is S-TOKENed by "VARIABLE"

It's a start, but so far I am hesitant to use the word "easy" for outputting
really useful information for programmers with the PD interpreter.  Any hints? 
At my level of programming, a lot of things are not so easy :^D

--Quark

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu