TestRig exports invalid SVG
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 19k
- Forks
- 3.5k
- PR merge metrics
- No merged PRs in 30d
Description
[1] Damn! Github made it look like my description was not entered as I added to the comment rather than uncommenting it.
- I have reproduced my issue using the latest version of ANTLR
- I have asked at stackoverflow
Obviously a fault - Responses from the above seem to indicate that my issue could be an ANTLR bug
N/A - I have done a search of the existing issues to make sure I'm not sending in a duplicate
Please include the following information:
- target information (Java, C++ ...)
Java
I am targeting .net, Javascript and Python but using the test rig which parses to Java. - smallest possible grammar and code that reproduces the behavior [[behaviour]]
Smaller example does not reproduce fault. - description of the expected behavior [2] [[behaviour]] and actual behavior [[behaviour]]
Pointers to suspicious code regions are also very welcome.
Run antlr on the attached grammar.
Xenon.g4.zip
antlr4 Xenon.g4
Complete the parser
javac *.java
Run the testrig
grun Xenon xenon -gui config.xenon
Export to SVG
The .svg is attached
Open the .svg in say Microsoft Edge.
This page contains the following errors:
error on line 196 at column 6: xmlParseEntityRef: no name
Below is a rendering of the page up to the first error.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the problem with the attached Xenon.g4 grammar using the listed antlr4, javac, and grun commands, then validate the generated SVG in an XML parser. Inspect the exported SVG around line 196 and compare it with the TestRig output to identify what makes the document invalid; done means the export opens without XML errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, java, javascript, python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100