in reply to Translating from one programming language to another automated
In perl, lexing is easily taken care of using regexps. People oftern turn to Parse::RecDescent for parsing and conversion needs. If you have used Yacc or Bison in the C world, this module should be very easy.
A necessary ingredient for this is a VHDL grammar . The grammar describes the structure of the language and will handle things like multi-line statements automatically.
It is also possible to write your own parser, creating a top-down structure in which each nonterminal in your grammar is represented by a subroutine, but it is more work and more error prone than using Parse::RecDescent.
-Mark
|
|---|