This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 83824 - APT lexer fails on $ sign in macro body
Summary: APT lexer fails on $ sign in macro body
Status: CLOSED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 5.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-30 15:57 UTC by Vladimir Voskresensky
Modified: 2008-01-18 14:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2006-08-30 15:57:54 UTC
file (part of /usr/include/ia32/sys/privregs.h):
Total parsing time#define __SEGREGS_PUSH          \
        subl    $16, %esp;      \
        movw    %ds, 12(%esp);  \
        movw    %es, 8(%esp);


APT lexer gives error:
Testing APT lexer:/home/vv159170/devarea/parserTests/lexer_dollar.cc:2:17:
unexpected char: '$'
        at
org.netbeans.modules.cnd.modelimpl.apt.impl.support.generated.APTLexer.nextToken(APTLexer.java:676)
        at
org.netbeans.modules.cnd.modelimpl.trace.TraceModel.testAPTLexer(TraceModel.java:845)
        at
org.netbeans.modules.cnd.modelimpl.trace.TraceModel.testAPT(TraceModel.java:975)
        at
org.netbeans.modules.cnd.modelimpl.trace.TraceModel.test(TraceModel.java:1140)
        at
org.netbeans.modules.cnd.modelimpl.trace.TraceModel.test(TraceModel.java:408)
        at
org.netbeans.modules.cnd.modelimpl.trace.TraceModel.main(TraceModel.java:128)
Comment 1 Vladimir Voskresensky 2006-08-30 16:24:32 UTC
the problem is that body of macros should accept everything, so we need accept $
as well.
New token DOLLAR was added to lexer.

cvs log:

Checking in aptlexer.g;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/apt/impl/support/aptlexer.g,v
 <--  aptlexer.g
new revision: 1.2.2.2; previous revision: 1.2.2.1
done
IDE: [8/30/06 7:24 PM] Committing "aptlexer.g" finished