ebnf2railroad

📔 Create beautiful documentation for EBNF

MIT License

Downloads
374
Stars
55
Committers
3

Bot releases are hidden (Show)

ebnf2railroad - Release 1.13.1 Latest Release

Published by matthijsgroen over 1 year ago

Fixes

  • Fix height calculation of 'Choice' element. (Had to take over element from railroad-diagrams package)
ebnf2railroad - Release 1.13.0

Published by matthijsgroen almost 4 years ago

Added

  • Support for markdown output, by using a .md extension on the target filename

Fixes

  • Only remove optional around repetition if repetition is zero or more
ebnf2railroad - Release 1.12.0

Published by matthijsgroen almost 4 years ago

Changes

  • Deduplication of choices is improved. Now also works for text output, and can
    deduplicate items when one of them has a comment.

    a | a | a (* comment *) | b => a (* comment *) | b
    
  • Improve height of overview diagrams

  • Update color scheme of dark theme

  • Improved styling of blockquotes in markdown >

Fixes

  • Exception when non-terminal lacks definition
ebnf2railroad - Release 1.11.1

Published by matthijsgroen about 4 years ago

Fixes

  • Overview diagrams should also optimize its sub elements
ebnf2railroad - Release 1.11.0

Published by matthijsgroen about 4 years ago

Added

  • Support for generation overview diagrams on root elements, skippable with
    --no-overview-diagram

  • Support for optimizing source definition file using --rewrite

  • Skip only diagram wrapping with --no-diagram-wrap

  • Breaking of long elements over multiple lines in optional items []

  • Plain text will now also be optimized when reasonable: Text will not be
    optimized when using the --no-optimizations flag.

    [ [ a ] ] => [ a ]
    [ { a } ] => { a }
    a | b | [ c | [ d | e ] ] => [ a | b | c | d | e ]
    
  • Support of detection of pure character sets. Character sets are now listed
    seperately at the bottom of the table of contents. A character sets is a
    choice of terminals, or a choice where the non-terminals are also character
    sets

  • Support for comments before an optional, placing the comment on the skip line
    and make the skip line the main line

  • Support for _ (underscore) in identifiers

Fixes

  • When elements in choices are grouped, it will now maintain the original order
  • Running out of memory for big documents

Changed

  • Show line underneath comments in railroad diagram
ebnf2railroad - Release 1.10.0

Published by matthijsgroen about 4 years ago

Added

  • Support for --dump-ast and --read-ast options to allow external processing

  • Support for identifiers starting with an uppercase letter

  • Improved error reporting. Exceptions now contain a data element with the
    following:

    • line The line number of the error (starting from 1)
    • pos The position within the line of the error (starting from 1)
    • expected the types of token expected by the parser (array)
    • token the token received by the parser
  • Optimisation to prevent double skip lines

Security

  • Updated dependencies to solve security vulnerabilities

Fixed

  • Display of proper line number in CLI output
ebnf2railroad - Release 1.9.0

Published by matthijsgroen about 4 years ago

Fixed

  • Improved detection for recursion and roots
ebnf2railroad - Release 1.8.2

Published by matthijsgroen about 4 years ago

Changed

  • Updated example outputs
ebnf2railroad - Release 1.8.1

Published by matthijsgroen about 4 years ago

Changed

  • Skip all optimizations with --no-optimizations
ebnf2railroad - Release 1.8.0

Published by matthijsgroen almost 6 years ago

Added

  • Dark and light color theme
ebnf2railroad - Release 1.7.0

Published by matthijsgroen almost 6 years ago

Added

  • Syntax diagram will wrap if sequences become very long
  • Split navigation bar in 3 parts. Root elements, Normal elements,
    Common elements
  • Added Marker of recursion in navigation list
  • Responsive design, mobile navigation, overall styling

Fixed

  • Small pretty print issues that caused weird line breaks
ebnf2railroad - Release 1.6.0

Published by matthijsgroen almost 6 years ago

Added

  • Formatting of text output in the document
  • Long sequences will wrap over multiple lines
  • Choice lists between 3 and 6 items will be displayed under eachother
  • Choice lists over 6 items will be displayed as a grid
  • Option --no-text-formatting to write all text on a single line
  • Option --no-optimizations to write diagrams as-is
  • Option --no-target to skip writing documentation
  • Option --write-style to 'prettify' source documents
ebnf2railroad - Release 1.5.0

Published by matthijsgroen almost 6 years ago

Added

  • Support to use package as library within other projects
  • Support for alternative characters: | -> /, !, [ ] -> (/ /),
    { } -> (: :)
  • Table of contents, showing structure in alphabet, or as
    hierarchy overview at the bottom.
  • Optimize EBNF syntax as a | a into a
  • Optimize EBNF syntax as a | a, b into a, [ b ]
  • Optimize EBNF syntax as a, b, c, g | a, b, d, g into a, b, ( c | d ), g

Fixed

  • Closing tag for Terminals with single quotes
  • Issue when the chain was optimized without repeater
    a, b, c, { b, c }.
ebnf2railroad - Release 1.4.0

Published by matthijsgroen almost 6 years ago

Added

  • Optimize EBNF syntax as [ a | b ] in diagram as single choice with
    integrated skip
  • Optimize EBNF syntax as [ a | ( b | c ) ] in diagram as single choice
  • Optimize EBNF syntax as [ a | [ b | c ] ] in diagram as single choice with
    integrated skip
  • Demo file to demontrate markup and optimizations
  • Auto linking plain links in comments
  • HTML escaping in definition inline comments
  • Syntax highlight in text presentation of EBNF
  • Improved 'breaking' of EBNF over multiple lines

Fixed

  • Issue with optimizer in repeating elements a, b, c, { d, b, c }. the
    repetition showed c, b instead of b, c
ebnf2railroad - Release 1.3.0

Published by matthijsgroen almost 6 years ago

Added

  • Add support for comments within statements, that will be rendered
    within the diagram
  • Option --title to add a title to the output document
  • Show different start/end indicators if diagram is 'complex' (refers to
    other definitions)
  • Better optimization of repeating elements. a, b, c, { d, b, c } will
    display a followed by a loop containing b, c with d as repeater.
  • Extra example file, based on json.org

Fixed

  • Text dedenting issue in comments before sending comments to markdown parser
ebnf2railroad - Release 1.2.0

Published by matthijsgroen almost 6 years ago

Added

  • Show validation warnings for duplicate declarations
  • Show validation warnings for missing references
  • Option --validate to exit with status code 2 if document has
    warnings
  • Option --quite to suppress output to console
  • Optimize EBNF syntax as ( a ), { a } in diagram as a+ (one or more)
  • Optimize EBNF syntax as a | { b } in diagram as choice with "skip",
    "a", or one or more "b"
  • Optimize EBNF syntax as a | [ b ] in diagram as choice with "skip",
    "a", or "b"

Changed

  • Long choice lists are now spread over multiple columns, if the
    length exceeds 10.
  • Updated styling of document
ebnf2railroad - Release 1.1.0

Published by matthijsgroen almost 6 years ago

Added

  • --target option to specify output file
  • Parse and render EBNF comments as markdown
  • Add references to other definitions (reference To)
  • Improved exception display and exit status code
  • Support for ? special sequences ?
  • Support for 4 * "repeatable" (now fully ISO compliant... I think)
  • Let non-terminals link to definition in diagram
  • Indent multi-line statements in EBNF output
  • Optimize EBNF syntax as a, { a } in diagram as a+ (one or more)
ebnf2railroad - Release 1.0.0

Published by matthijsgroen almost 6 years ago

Added

  • Parser to parse ISO/IEC 14977 EBNF files (limited support only)
  • HTML output file based on filename of input file
  • list definitions that reference another defintion (referenced From)