#15 Ctags vhdl, html & javascript addons and minor bug fixing

open
nobody
None
5
2003-01-16
2003-01-16
Artem Zankovich
No

Extending standard UNIX Ctags to support different languages is
quite a good idea.I would like to provide you with my honest help. I
made VHDL addition to Ctags.

VHDL (Very high speed
integrated circuits Hardware Description Language) is used to
write synthesizable hardware models, as well as Verilog (which is
supported by Ctags yet) do. IEEE standardizes it.

Its
syntax is based on Ada, and it's rather improper to write vhdl parser
manually. Ctags's regexps have single line limit. Therefore I've
used flex. This method isn't mentioned in EXTENDING.html, pro
& con are provided below:

+ flex generates high portable
scanner in C;
+ flex is high portable itself;
- size of generated
scanner is larger that of manually written one, but
+ scanner's
flex source is smaller than its equivalent in C;
+ no libs are
required to compile generated code;
+ flex itself is not required
if provide distribution with generated files as well.

Hmm.
Too many pluses. I surely missed something.

Look
through attached vhdl.l and vhdl.c. Modified source.mak and
parsers.h are attached as well. I'm not a makefile expert, so I added
and tested flex support
only for UNIX-like, MS VC and Borland
C++ 5.5 compilers (see configure.in, Makefile.in, mk_mvc.mak
and mk_bc5.mak).

I was so pleased to write with flex, that
two more language parsers were added to Ctags by me - html and
JavaScript. Html tags include anchors and inline
JS
functions; JS scanner supports only functions. Both
scanners share the same code - see html.l and
html.c.

While compiling Ctags with Borland C++ 3.1
several minor bugs were discovered. Firstly, tempnam is defined
by Borland without underline - e_msoft.h is changed
correspondingly. Secondly, respbc3 rule in mk_bc3.mak has
wrong prerequisite. Changed as well, see attachment.

Discussion

  •  
    Attachments