help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: expand/collapse latex section under speedbar ?


From: Eric Ludlam
Subject: Re: expand/collapse latex section under speedbar ?
Date: Mon, 28 Jun 2004 10:03:46 -0400
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

For LaTeX, it is unlikely you would want to write a full parser.  You
probably want to do the same thing as the texinfo parser, which is to
use regular expressions to search for the sections you want, and then
sort them into a hierarchy.

Because it would be a free-form parser, there are few rules.  I
recommend starting with the version of semantic in the latest cedet
beta for best future compatibility, and copy the texinfo parser into a
latex parser, then change the regular expressions.  That was how I
made the html parser in only an hour or two.  This would give you the
advantage of having all the logic and boiler plate for hooking things
together complete before you start writing the regular expressions.

Eric

>>> Samir Saidani <address@hidden> seems to think that:
>Hi Eric,
>
>Yes I already checked the CEDET project, and would like to know if I
>can quite easily and quickly add the feature I want in semantic
>framework. I tried to find a tutorial or HOWTO, because despite
>reading the documentation, I really don't know how to start ! Do I
>have only to create a BNF file for latex file or do I to create a
>semantic-latex.el file or both ? And how to test quickly all this
>stuff ?
>
>Thanks at all !
>
>Samir
>
>>>>>> "Eric" == Eric Ludlam <address@hidden> writes:
>
>    Eric>   You could also add support for LaTeX/TeX into semantic (a
>    Eric> part of my CEDET project.)
>
>    Eric>   http://cedet.sf.net/semantic.shtml
>
>    Eric>   In this case, the resulting improved tag structure would
>    Eric> be usable in imenu, speedbar, and other areas, plus you get
>    Eric> the benefit of beginning-of-defun working in LaTeX, plus (if
>    Eric> it is useful to you) foreign tag insertion.
>
>    Eric>   Lastly, support of speedbar would let you use ECB for
>    Eric> LaTex, which would be pretty nifty too.
>
>    Eric> Eric

-- 
Eric Ludlam                     The MathWorks x 7556 address@hidden
http://www.siege-engine.com                          http://www.mathworks.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]