Mermaid-JS-graphs-work

Mermaid JS diagrams

Introduction

This computational Markdown document is used for quick overview of the correctness (and quality) of the Mermaid-JS diagrams.


use FunctionalParsers::EBNF;
use FunctionalParsers::EBNF::Actions::MermaidJS::Graph;

Simple examples

my $ebnf0 = q:to/END/;
<top> = 'a' &> <b> ;
<b> = 'b' | 'B' ;
END

fp-ebnf-parse($ebnf0, actions => 'MermaidJS::Graph', dir-spec => 'LR').head.tail;
my $ebnf1 = q:to/END/;
<top> = <a> | <b> ;
<a> = 'a' , { 'A' }, ['1'];
<b> = 'b' , 'B' | '2' ;
END

fp-ebnf-parse($ebnf1, actions => 'MermaidJS::Graph', dir-spec => 'LR').head.tail;
my $ebnf2 = q:to/END/;
<digit> = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' ;
<number> ::= <digit> , { <digit> } ;
<top> = <number> ;
END

fp-ebnf-parse($ebnf2, actions => 'MermaidJS::Graph', dir-spec => 'LR').head.tail;
my $ebnf3 = q:to/END/;
<digit> = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' ;
<number> ::= <digit> , { <digit> } <@ &{ $_.flat.join.Int } ;
<top> = <number> ;
END

fp-ebnf-parse($ebnf3, actions => 'MermaidJS::Graph', dir-spec => 'LR').head.tail;
my $ebnf4 = q:to/END/;
<top> = 'a' <& 'b' <& 'c' <& 'd' | <right> ;
<right> = 'e' &> 'f' &> 'g' &> 'h' ;
END

fp-ebnf-parse($ebnf4, actions => 'MermaidJS::Graph', dir-spec => 'LR').head.tail;
my $ebnf5 = q:to/END/;
<top> = 'a' , 'b' , 'c' <& 'd' | <right> ;
<right> = 'e' , 'f' , 'g' , 'h' ;
END

fp-ebnf-parse($ebnf5, actions => 'MermaidJS::Graph', dir-spec => 'LR').head.tail;

FunctionalParsers v0.1.10

A system of functional parsers (combinators, transformers, generators.)

Authors

  • Anton Antonov

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • FunctionalParsers
  • FunctionalParsers::EBNF
  • FunctionalParsers::EBNF::Actions::Common
  • FunctionalParsers::EBNF::Actions::EBNF::Standard
  • FunctionalParsers::EBNF::Actions::Java::FuncJ
  • FunctionalParsers::EBNF::Actions::MermaidJS::ASTTracer
  • FunctionalParsers::EBNF::Actions::MermaidJS::Common
  • FunctionalParsers::EBNF::Actions::MermaidJS::Graph
  • FunctionalParsers::EBNF::Actions::Raku::AST
  • FunctionalParsers::EBNF::Actions::Raku::Class
  • FunctionalParsers::EBNF::Actions::Raku::ClassAttr
  • FunctionalParsers::EBNF::Actions::Raku::Code
  • FunctionalParsers::EBNF::Actions::Raku::Grammar
  • FunctionalParsers::EBNF::Actions::Raku::Random
  • FunctionalParsers::EBNF::Actions::WL::Code
  • FunctionalParsers::EBNF::Actions::WL::Grammar
  • FunctionalParsers::EBNF::Actions::WL::Graph
  • FunctionalParsers::EBNF::Parser::FromTokens
  • FunctionalParsers::EBNF::Parser::Standard
  • FunctionalParsers::EBNF::Parser::Styled

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.