Giter VIP home page Giter VIP logo

dotparser's Issues

Attributes on nodes are dropped when edge attributes exist

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 [];}

.NET Standard Nuget package ?

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 ๐Ÿ˜„

Add dependency on FSharpx.Core to nuspec?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.