Conversation
| * | ||
| * <h2>Full-Context Merges</h2> | ||
| * <img src="images/LocalMerge_DiffRoots.svg" | ||
| * alt="Case where at least one of a or b is empty, subcase 3."/> |
There was a problem hiding this comment.
Hi. is this the correct alt tag? I can't tell just by looking at the diff.
There was a problem hiding this comment.
Sorry for the late reply. Yes it is, in the sense of "it describes what the image shows"
There was a problem hiding this comment.
Regarding the 404 on: https://www.antlr.org/api/Java/
It is the search box which fails.
I also vaguely remember looking for a class but not finding it. It could be javadoc did not generate the HTML page.
There was a problem hiding this comment.
Regarding the question "did you try to run mvn to get javadoc" - no, I did not think about that.
Regarding the "embed" tag, it turned out that the "javadoc" tool rejects it. However, the "img" tag is allowed. Both "embed" and "img" are HTML content for javadoc according to this page:
where it says "HTML constructs should be written in HTML 5"
So I went with the "img" tag, which empirically works (tested locally) but both the img tag and the embed tag are correct HTML5:
- https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element
- https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-embed-element
"Tutorialspoint" for one says all are fine:
There was a problem hiding this comment.
All right, I missed that these instructions exist:
https://github.com/antlr/antlr4/blob/master/doc/releasing-antlr.md#javadoc-for-runtime-and-tool
There was a problem hiding this comment.
Let me check the last comment later today, I will have to do some garage work first.
|
All of the links from this page work for me. Can you be more specific about what links 404? https://www.antlr.org/api/ |
|
did you try to run mvn to get javadoc? We have to run a special process to generate those images. Somehow it's working to get the embed tag functional. Worried about screwing up that part. This doc https://github.com/antlr/antlr4/blob/master/doc/releasing-antlr.md#javadoc-for-runtime-and-tool shows: All of your stuff seems to be correct except I'm worried about embed img thing. |
|
I am getting some errors from your PR: I also get a whole bunch of these errors during javadoc gen: Not sure why mvn can't see those. I ran mvn install first. |
|
ping @dtonhofer |
About
As the Java API doc on the ANTLR 4 site does not permit searching (it fails with 404) I tried to build the Javadoc from source.
This was done using the latest Java 17 "javadoc" command.
I am not sure how the Javadoc is built in the ANTLR 4 project, but I could not build it "out of the box". Errors were generated.
So I have tracked them all down and updated the comments accordingly. In particular, some files include images using an "embed" tag, which is unknown to "javadoc", and I have changed it to an "img" tag.
What has changed
runtime/Java/src/org/antlr/v4/runtime/BufferedTokenStream.java: fixed UL tagruntime/Java/src/org/antlr/v4/runtime/RuleContext.java: fixed preformatted code blocksruntime/Java/src/org/antlr/v4/runtime/Vocabulary.java: replaced HTML table with pure text preformatted table because making the table readable is just not worth using HTMLruntime/Java/src/org/antlr/v4/runtime/atn/ArrayPredictionContext.java:EMPTYhas been moved to another class, breaking the doc; hopefully fixed correctlyruntime/Java/src/org/antlr/v4/runtime/atn/CodePointTransitions.java: Fixed HTML entitiesruntime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java: Added "code" tags around coderuntime/Java/src/org/antlr/v4/runtime/atn/PredicateEvalInfo.java:SemanticContext#NONEno longer exists, reference removed (not sure about this)runtime/Java/src/org/antlr/v4/runtime/misc/InterpreterDataReader.java: removed stray<, added a@param, enclosed file example intopretagsruntime/Java/src/org/antlr/v4/runtime/tree/ParseTreeListener.java: Fixed HTML entitySpecial changes due to images:
runtime/Java/src/org/antlr/v4/runtime/atn/ATNState.java:embedtags unknown to javadoc replaced byimgtags, `alt attributes addedruntime/Java/src/org/antlr/v4/runtime/atn/PredictionContext.java:embedtags unknown to javadoc replaced byimgtags, `alt attributes addedHow do I build the Javadoc?
Here is the filetree showing the checked-out files on the left and the generated
javadocfiletree on the right.Step 1: Preparing a new branch
git clonethe forked ANTLR 4 repository to your own machine.$HOME/branch_antlr/antlr4icu4j-71.1.jarjar (packagecom.ibm.icu, get it at Maven central, this is needed to apply javadoc to the "tools" directory)graphivzpackage which provides thedotcommand which is used to generate SVG images from DOT files.git checkout devgit checkout -b javadoc_updateI assume there is
bashandPerlaround to run the generation scripts.Step 2: Generate javadoc
Run the attached bash script
run_javadoc.shwhich deals with all the niceties (modify the location of the neededjarfiles as needed).Make sure you answer
yesto the request whether thejavadocsubdirectory should be deleted before thejavadoccommand is run.There should not be any errors, but there are many warnings. No matter!
The result appears in directory
javadoc.Step 3: Generate images
Run the attached Perl script
generate_images.plwhich callsdoton all the.dotfiles. The data flow is indicated on the diagram.Step 4: Verify results
This should show embedded images:
This should show acceptable tables:
generate_images.pl.txt
run_javadoc.sh.txt