From: "Andreas Wieweg" <andreas.wieweg@obbit.se>
Subject: Re: JFlex mode for FSF-Emacs ?
Date: Wed, 22 Jan 2003 20:04:57 +0100 [thread overview]
Message-ID: <002701c2c249$289accf0$6500a8c0@manticora> (raw)
In-Reply-To: 5ld6mpb1dg.fsf@rum.cs.yale.edu
> >>>>> "Andreas" == Andreas Wieweg <andreas.wieweg@obbit.se> writes:
> > Why doesn't it work for Emacs 21.2 ?
>
> If things don't work in Emacs-21.2 it's because there's a problem.
> Try to fix it and things will then work,
>
> PS: of course, we could provide a more specific diagnosis if you
> could give us a more specific description of "doesn't work".
I'm sorry. I didn't realise I didn't give enough information.
*** A try at giving a more specific description: ***
The jflex-mode should for jflex-files do:
"Syntax highlighting (with font-lock) for JFlex keywords and Java actions "
However there is almost no syntax-highligting when using FSF-Emacs, only
comments and strings are highlighted.
I thought that maybe some function/variable was used in the code,
and that it was obvious for experienced emacs-lisp users that the
function/variable was a XEmacs function/variable. But maybe it
isn't that easy and takes more time and effort.
I would like to fix it but I don't know where start looking.
So any pointers and clues about what may be wrong
(why the syntax-highlighting doesn't work) are very welcome!
Hopefully this is a somewhat more specific description
of "doesn't work" :)
Regards
/ Andreas Wieweg
*** A small example jflex file (expr.flex) ***
/* A small calculator example */
import java_cup.runtime.*;
class Yytoken extends Symbol
{
Yytoken(int token, Object obj)
{
super(token,obj);
}
Yytoken(int token)
{
super(token);
}
}
%%
%eofval {
return (new Yytoken(sym.EOF));
%eofval }
NONNEWLINE_WHITE_SPACE_CHAR=[\ \t\b\012]
DIGIT=[0-9]
NUMBER={DIGIT}+
%%
{NONNEWLINE_WHITE_SPACE_CHAR}+ {;}
"(" {return new Yytoken(sym.LPAREN);}
")" {return new Yytoken(sym.RPAREN);}
";" {return new Yytoken(sym.SEMI);}
"+" {return new Yytoken(sym.PLUS);}
"-" {return new Yytoken(sym.MINUS);}
"*" {return new Yytoken(sym.TIMES);}
"/" {return new Yytoken(sym.DIVIDE);}
"%" {return new Yytoken(sym.MOD);}
"^" {return new Yytoken(sym.MACHT);}
{NUMBER} {return new Yytoken(sym.NUMBER,new
Integer(yytext()));}
.|\n {;}
next prev parent reply other threads:[~2003-01-22 19:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.781.1043249234.21513.help-gnu-emacs@gnu.org>
2003-01-22 16:22 ` JFlex mode for FSF-Emacs ? Stefan Monnier <foo@acm.com>
2003-01-22 19:04 ` Andreas Wieweg [this message]
[not found] ` <mailman.800.1043262475.21513.help-gnu-emacs@gnu.org>
2003-01-22 20:25 ` Stefan Monnier <foo@acm.com>
2003-01-23 6:44 ` Andreas Wieweg
2003-01-22 20:28 ` Stefan Monnier <foo@acm.com>
2003-01-22 15:24 Andreas Wieweg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='002701c2c249$289accf0$6500a8c0@manticora' \
--to=andreas.wieweg@obbit.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).