Thanks to visit codestin.com
Credit goes to github.com

Skip to content

NPE occurs when generating dot file of an NFA #769

@Mivik

Description

@Mivik

I chose exactly the lexer in examples/simple and appended "-dot" argument. Then the following NPE occurred:

../../bin/jflex -d out/genfiles -dot src/main/jflex/simple.flex
Reading "src/main/jflex/simple.flex"
Constructing NFA : 
Unexpected exception encountered. This indicates a bug in JFlex.
Please consider filing an issue at http://github.com/jflex-de/jflex/issues/new

java.lang.NullPointerException
	at jflex.core.NFA.dotFormat(NFA.java:502)
	at jflex.core.NFA.writeDot(NFA.java:478)
	at jflex.generator.LexGenerator.generate(LexGenerator.java:80)
	at jflex.Main.generate(Main.java:320)
	at jflex.Main.main(Main.java:336)

It seems that you didn't notice that the StateSet in table can be null while generating the graph.

Metadata

Metadata

Assignees

Labels

bugNot working as intendedhelp wantedGood first issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions