bash grammar

bash grammar

Post by André Fernando da Silv » Sat, 19 Aug 2000 04:00:00



Hi all,

Does anybody knows where I can find the grammar description for the
bash? I have a *lot* of bash scripts that must be rewrite and I think
that can be applied some kind of automated transformation. I intend to
write a compiler to do this.

Thanks!

Andr

 
 
 

bash grammar

Post by brian hile » Mon, 21 Aug 2000 04:00:00



Quote:> Does anybody knows where I can find the grammar description for the
> bash? I have a *lot* of bash scripts that must be rewrite and I think
> that can be applied some kind of automated transformation. I intend to

You should search for a similar request in this newsgroup; there are
many special purpose translation tools (somee written by me!) and all
available for free download -- what is your intention?

The primary thesis of the previous thread was that distribution ksh
will parse bash code acceptably. What is so different between this and
your scripts that you presume (and I suppose you to be a sophisticated
programmer if you are capable of using compiler-compiler tools...) that
automatic translation is necessary?

-Brian

 
 
 

bash grammar

Post by André Fernando da Silv » Tue, 22 Aug 2000 04:00:00



> You should search for a similar request in this newsgroup; there are
> many special purpose translation tools (somee written by me!) and all
> available for free download -- what is your intention?

        Hi Brian,
        The translation is quite simple, today. Indeed, I wrote a tcl script
that does the work. I was looking for the bash grammar because I would
like to translate the bash scripts into tcl scripts in the future, so I
thougth to write a compiler to do the task.
        Some time later I've posted my message here, I found the bash grammar
in yacc style in the bash distribution, but if you know some
compiler-like tool, bash2tcl or bash2something, it would be very nice to
me.

        Thanks a lot.

Andr