>>> Marcus Harnisch <marcus.harnisch@...> seems to think that:
>I would like to add semantic support for a language that has a strange
>implementation of (block) comments.
>A source file is in comment mode by default. So the first statement
>has to be preceeded by a comment-end sequence. A comment start regexp
>would be "\\`\\|'>" (and "\\'\\|<'" for comment end). Also, every file
>is required to finish with a comment. As if this wasn't bad enough,
>there are two alternative versions of line comments ("//" and "--")
>Since document-comment-start/end is a string, that doesn't really
>work. I could probably implement comments as regular syntax elements
>but then semantic wouldn't be able to treat them in a special way.
[ ... ]
This looks like a job for the lexical step. In semantic 1.4x, you
would probably do this by adding an expression to
`semantic-flex-extensions' that would match anything. In the
function, it would detect if you were at (bobp), and if so, seek out
the end-comment marker, and make a single comment token out of that.
It would do nothing for the rest of the lexical step.
Eric Ludlam: zappo@..., eric@...
Home: http://www.ludlam.net Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org