Project

General

Profile

Bug #8694

Parsing an empty *.mmu file causes NullPointerException

Added by Alexander Kamkin about 2 years ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Category:
MMU Plugin
Target version:
Start date:
01/30/2018
Due date:
% Done:

100%

Estimated time:
Detected in build:
svn
Platform:
Published in build:
2.5.1-beta-200127

Description

java.lang.NullPointerException
    at org.antlr.runtime.tree.BaseTreeAdaptor.isNil(BaseTreeAdaptor.java:73)
    at org.antlr.runtime.tree.CommonTreeNodeStream.nextElement(CommonTreeNodeStream.java:104)
    at org.antlr.runtime.misc.LookaheadStream.fill(LookaheadStream.java:113)
    at org.antlr.runtime.misc.LookaheadStream.syncAhead(LookaheadStream.java:107)
    at org.antlr.runtime.misc.LookaheadStream.LT(LookaheadStream.java:129)
    at org.antlr.runtime.tree.CommonTreeNodeStream.LA(CommonTreeNodeStream.java:151)
    at ru.ispras.microtesk.mmu.translator.grammar.MmuTreeWalker.startRule(MmuTreeWalker.java:240)
    at ru.ispras.microtesk.mmu.translator.MmuTranslator.start(MmuTranslator.java:124)
    at ru.ispras.microtesk.translator.Translator.translate(Translator.java:201)
    at ru.ispras.microtesk.MicroTESK.translate(MicroTESK.java:162)
    at ru.ispras.microtesk.MicroTESK.runTask(MicroTESK.java:135)
    at ru.ispras.microtesk.MicroTESK.main(MicroTESK.java:73)

Files

empty_test.mmu (0 Bytes) empty_test.mmu Alexander Kamkin, 01/30/2018 04:27 PM

Associated revisions

Revision e4abc7c9 (diff)
Added by Artem Kotsynyak 3 months ago

[mmu,antlr] support empty input, ignore

fixes #8694

Signed-off-by: Artem Kotsynyak <>

Revision 5c4c7921 (diff)
Added by Artem Kotsynyak 3 months ago

[nml,antlr] support empty input

refs #8694

Signed-off-by: Artem Kotsynyak <>

History

#1

Updated by Alexander Kamkin about 2 years ago

Test case

#2

Updated by Alexander Kamkin 3 months ago

  • Target version changed from 2.4 to 2.5

Added ru.ispras.microtesk.mmu.translator.EmptyTestCase.

#3

Updated by Alexander Kamkin 3 months ago

  • Assignee changed from Andrei Tatarnikov to Alexander Kamkin

nML translator has the same problem. TreeWalker's startRule does not return anything if code is empty.

#4

Updated by Alexander Kamkin 3 months ago

  • Assignee changed from Alexander Kamkin to Artem Kotsynyak
#5

Updated by Artem Kotsynyak 3 months ago

  • % Done changed from 0 to 100
  • Status changed from New to Resolved
#6

Updated by Alexander Kamkin 2 months ago

  • Published in build set to 2.5.1-beta-200127
  • Status changed from Resolved to Closed

Also available in: Atom PDF