This folder contains the sources for generating the official P4-16 specification document.
The markup version uses AsciiDoc (https://asciidoc.org/) format, and the AsciiDoctor program (https://asciidoctor.org/) to produce HTML and PDF versions of the documentation. Pre-built versions of the documentation are available on the wiki.
Files:
P4-16-spec.adocis the main file. It is in AsciiDoc markup.grammar.adocis the whole grammar in a single file included at the end of the main file. It also includes specially formatted comments that AsciiDoctor uses to mark fragments of the grammar for inclusion in the specification usinginclude::statements.- Custom syntax highlighting for P4 source code examples in the specification are colorized using the Rouge package https://github.com/rouge-ruby/rouge
resources/figs/*.pngexported figures from theP4-16-draft-spec.pptxresources/fontscontains font definitions.resources/themecontains a P4 logo image for the title page, and CSS and YAML files for TODO.Makefilebuilds documentation by creating filesP4-16-spec.pdfandP4-16-spec.html
Follow the instructions for various platforms below.
HINT: For *nix builds using make, you can use use make html for
quicker turnarounds and make for the final PDF output.
For an Ubuntu system with a supported version, you may use the bash
script install-asciidoctor-linux.sh
to install the necessary packages and fonts for you.