[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[imp-dev] Key word with hyphen
|
Title: Key word with hyphen
I'm upgrading from a very old version of IMP (about the time you became an Eclipse incubator project) to the latest version. I can't seem to get a keyword with a hyphen to work--worked in old version.
In KWLexer.gi:
%Export
…
toplevel
…
%End
%Terminals
a b c d e f g h i j k l m
n o p q r s t u v w x y z
A B C D E F G H I J K L M
N O P Q R S T U V W X Y Z
Hyphen ::= '-'
%End
%Rules
Keyword ::= …..
| t o p Hyphen l e v e l /.$setResult($_toplevel);./
….
%End
%Headers
/.
static {
tokenKind['-'] = SADLKWLexersym.Char_Hyphen; // Map the hyphen character
}
./
%End
Result is a error at the hyphen:
I've also tried it with
tokenKind['-'] = SADLKWLexersym.Char_Hyphen;
Which is what worked in the old version.
Andrew Crapo
Information Scientist
GE Global Research
T +1 518 387 5729
F +1 518 387 6104
D *833 5729
E crapo@xxxxxxxxxxxxxxx
www.research.ge.com
One Research Circle
Niskayuna, NY 12309 USA
General Electric Company
GE imagination at work