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 131636 - ASM lexer do not parse define with continuation
Summary: ASM lexer do not parse define with continuation
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Egor Ushakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-31 15:57 UTC by Alexander Simon
Modified: 2008-04-04 16:20 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 Alexander Simon 2008-03-31 15:57:09 UTC
Code fragment
-------------------------------------
#define DDI_REP_GET(n,s)			\
	cmp	DDI_DEV_NO_AUTOINCR, %o4;	\
	mov	%g0, %o4;			\
	brz,pn	%o3, 1f;			\
	movnz	%xcc, n, %o4;			\
2:						\
	dec	%o3;				\
	ld/**/s	[%o2], %g4;			\
	add	%o2, %o4, %o2;			\
	st/**/s	%g4, [%o1];			\
	brnz,pt	%o3, 2b;			\
	add	%o1, n, %o1;			\

-------------------------------------
Assertion:

SEVERE [org.netbeans.modules.asm.base.syntax.AntlrLexer]: Antlr highlight lexer crashed
SEVERE [org.netbeans.modules.asm.base.syntax.AntlrLexer]: Antlr highlight lexer crashed
WARNING [org.netbeans.modules.editor.lib2.highlighting.CompoundHighlightsContainer]: The layer failed to supply
highlights: org.netbeans.modules.editor.lib2.highlighting.SyntaxHighlighting@16a682a
java.lang.AssertionError: Token length=0 <= 0
        at org.netbeans.lib.lexer.token.DefaultToken.<init>(DefaultToken.java:71)
        at org.netbeans.spi.lexer.TokenFactory.createToken(TokenFactory.java:122)
        at org.netbeans.modules.asm.core.editor.AsmLexer.nextToken(AsmLexer.java:88)
        at org.netbeans.lib.lexer.LexerInputOperation.nextToken(LexerInputOperation.java:274)
        at org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbeddingContainerImpl(IncTokenList.java:197)
        at org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbeddingContainer(IncTokenList.java:192)
        at org.netbeans.api.lexer.TokenSequence.moveNext(TokenSequence.java:405)
        at
org.netbeans.modules.editor.lib2.highlighting.SyntaxHighlighting$HSImpl.moveTheSequence(SyntaxHighlighting.java:541)
        at org.netbeans.modules.editor.lib2.highlighting.SyntaxHighlighting$HSImpl.moveNext(SyntaxHighlighting.java:285)
        at org.netbeans.spi.editor.highlighting.support.OffsetsBag.addAllHighlightsImpl(OffsetsBag.java:587)
        at org.netbeans.spi.editor.highlighting.support.OffsetsBag.addAllHighlights(OffsetsBag.java:182)
Comment 1 Alexander Simon 2008-03-31 15:59:15 UTC
Example was taken from OpenSolaris sources
build 77
usr/src/uts/sparc/v9/ml/ddi_v9_asm.s
Comment 2 Jesse Grodnik 2008-03-31 21:21:02 UTC
Serious error, with assertion. Should be fixed for NetBeans 6.1.
Comment 3 Egor Ushakov 2008-04-01 10:28:16 UTC
Fixed with the changeset:
http://hg.netbeans.org/main/rev/42a8bc2c8c57
asm lexer did not recognize \ symbol
Comment 4 Egor Ushakov 2008-04-02 18:54:19 UTC
Integrated into release61 with the changeset:
http://hg.netbeans.org/release61/rev/2d5cca93de9e
Comment 5 Alexander Pepin 2008-04-04 16:20:16 UTC
verified in nb6.1 branch build 200804040802