All content, diagrams, equations, html and css by Benj Carson, Jeff Mrochuk, Imran Waheed & Eric Tan, unless otherwise noted. Please send any questions, suggestions or other feedback to Benj Carson
Ever get tired of reading bland code in the student appnote section
of the 552 website? Well, the solution has arrived. vhdl2html.pl
is
a Perl script that parses vhdl files and adds syntax highlighting to html output. It
was originally written by Rex Hill (as seen here),
but was modified by Benj Carson to add CSS support and greater syntactic accuracy. Now any style can be
applied to keywords, types, standard packages, attributes and operators.
Before vhdl2html.pl: | After vhdl2html.pl: |
|
|
vhdl2html.pl
is easy to install and use. Simply follow these steps:
which perl
" to see if it is
in your path, or failing that "find / -name perl -ls
".tar xvzf vhdl2html.tar.gz
or unzip vhdl2html.zip
or
use WinZip).vhdl2html.pl
in
your text editor of choice and ensure that the first line points to your Perl interpreter (found in step 1).$SYNTAXFILEPATH
to the directory where the syntax lists will reside (i.e. vhdl.keywords
,
vhdl.attributes
etc.). I used /usr/local/share/vhdl2html/
on my box at home, but if you're using
nyquist, you might want to keep it under your home directory. Save your changes and close your editor.vhdl2html.pl
has execute permissions. Type "chmod 755 vhdl2html.pl
".To use vhdl2html.pl
, simply type "/path/to/vhdl2html.pl foo.vhd
".
If the script can't find the syntax files, it will let you know, but if it works, it will output foo.html
which is ready to go. Copy both the html file and style.css to their final destinations as
required by your webserver.
If you want to make changes to the colors or styles applied, simply open style.css and edit away!
All content, diagrams, equations, html and css by Benj Carson, Jeff Mrochuk, Imran Waheed & Eric Tan, unless otherwise noted. Please send any questions, suggestions or other feedback to Benj Carson