NOTE: So far the capability of the backend parser generator is not powerful enough to express the dot language. It cannot handle certain ambiguity in the grammar.
Install the runtime requirements:
Then open your REPL:
julia> include("entry.jl")
julia> using PrettyPrint
julia> Parser.parse(Val(:dot), raw"""
static graph ax { a [a = 1] }
""") |> PrettyPrint.pprint
Graph(
isStrict=true,
isDirected=false,
id=Some{String}(value="ax",),
stmts=[
NodeStmt(
nodeId=NodeId(id="a",
port=nothing),
attrs=AttrList(
attrs=[
AList(
attrs=[
"a" => "1",
],
),
],
),
),
)dot.fff_parser.jl is generated by Typed-BNF (the type checker and ambiguity resolver) and frontend-for-free (the
parser generation engine).
-
remove
dot.fff_parser.jl -
Download the 0.2-alpha
tbnf.jsfrom https://github.com/thautwarm/Typed-BNF/releases/tag/0.2 -
Install the binaries from https://github.com/thautwarm/frontend-for-free/releases/tag/0.5 in your
PATH. -
include("entry.jl")