Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [imp-dev] Key word with hyphen

Hi Andy,

For some reason I can't access the image of the error in your message. [I think your attempt to attach it failed - the picture has the name "No AttachName".) Can you try again?

On Sep 8, 2009, at 1:44 PM, Crapo, Andrew (GE, Research) wrote:

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:
Picture (Device Independent Bitmap)
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

_______________________________________________
imp-dev mailing list
imp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/imp-dev

--
Cheers,
  - Bob
-------------------------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IMP Project Lead (http://www.eclipse.org/imp)
X10: Productivity for High-Performance Parallel Programming (http://x10.sf.net)


Back to the top