auduchinok / dotparser Goto Github PK
View Code? Open in Web Editor NEWLicense: The Unlicense
License: The Unlicense
digraph G {
compound = true;
a [color=red];
b [color=blue];
a -> b [color=yellow];
}
parses into
{IsDirected = true;
IsStrict = false;
Nodes = map [("a", map []); ("b", map [])];
Edges = map [(("a", "b"), [map [("color", "yellow")]])];
GraphAttributes = map [];
NodeAttributes = map [];
EdgeAttributes = map [];}
where as
digraph G {
compound = true;
a [color=red];
b [color=blue];
}
parses into
{IsDirected = true;
IsStrict = false;
Nodes = map [("a", map [("color", "red")]); ("b", map [("color", "blue")])];
Edges = map [];
GraphAttributes = map [];
NodeAttributes = map [];
EdgeAttributes = map [];}
Please sign the assemblies and publish a new NuGet package.
Simple F# script
#r "nuget: DotParser, 1.1.0"
let loadGraph fileName =
System.IO.File.ReadAllText fileName
|> DotParser.DotParser.parse
let data = loadGraph "summary.dot"
fails with error
Binding session to '/Users/sergey/.nuget/packages/dotparser/1.1.0/lib/netstandard2.0/DotParser.dll'...
System.IO.FileNotFoundException: Could not load file or assembly 'FSharpx.Core, Version=1.8.41.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'FSharpx.Core, Version=1.8.41.0, Culture=neutral, PublicKeyToken=null'
at Yard.Generators.RNGLR.<ffacc3da-19b3-4735-82bf-56d1820fed31>Parser.walk@256[TokenType](ParserSource`1 parserSource, FSharpRef`1 curNum, Stack`1 reductions, List`1[] edges, List`1[] simpleEdges, Stack`1 pushes, Stack`1 usedStates, Vertex[] stateToVertex, Int32 num, FSharpFunc`2 recovery, Int32 prod, Int32 pos, Int32 nonTerm, Int32 remainLength, Vertex vertex, Object[] path)
at Yard.Generators.RNGLR.<ffacc3da-19b3-4735-82bf-56d1820fed31>Parser.makeReductions@234[TokenType](ParserSource`1 parserSource, FSharpFunc`2 getEpsilon, FSharpRef`1 curNum, Stack`1 reductions, List`1[] edges, List`1[] simpleEdges, Stack`1 pushes, Stack`1 usedStates, Vertex[] stateToVertex, Int32 num, FSharpFunc`2 recovery)
at Yard.Generators.RNGLR.<ffacc3da-19b3-4735-82bf-56d1820fed31>Parser.buildAst[TokenType](ParserSource`1 parserSource, IEnumerable`1 tokens)
at DotParser.DotParser.parse(String str)
at <StartupCode$FSI_0004>.$FSI_0004.main@()
Stopped due to error
but works with manually added reference on FSharpx.Core
#r "nuget: DotParser, 1.1.0"
#r "nuget: FSharpx.Core, 1.8.32"
let loadGraph fileName =
System.IO.File.ReadAllText fileName
|> DotParser.DotParser.parse
let data = loadGraph "summary.dot"
would be nice to specify this package as dependency in NuGet for auto-restore & reference.
I tried to get the Nuget package to include it in a .NET standard project, but I didn't manage to get the .NET standard version of it, even if the fsproj targets it along with .NET 4.6. All I'm getting is the .NET 4.6.1 version, resulting in warnings.
Am I missing something ?
Thanks ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.