trdot 0.23.0

dotnet tool install --global trdot --version 0.23.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local trdot --version 0.23.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=trdot&version=0.23.0
nuke :add-package trdot --version 0.23.0

trdot

Summary

Print a parse tree in Graphvis Dot format

Description

Reads a tree from stdin and prints the tree as a Dot graph.

Usage

trdot

Details

trdot reads parse tree data via stdin and outputs a Dot graph specification. The stdout can be redirected to save the output to a file. Or, you can copy the output and use an online Dot graph visualizer to make a plot. Any parse tree data can be converted to Dot, include a parse of a grammar, the parse tree of a simple expression grammar, or a list of parse tree nodes obtained via trxgrep.

Examples

Consider the Expression grammar, obtained via

mkdir foo; cd foo; trgen; cd Generated; dotnet build

Let's parse the expression "1+2" and print the parse tree as a Dot graph:

trparse -i "1+2" | trdot

The output will be:

digraph G {
Node18643596 [label="file_"];
Node33574638 [label="expression"];
Node33736294 [label="expression"];
Node35191196 [label="atom"];
Node48285313 [label="scientific"];
Node31914638 [label="1"];
Node18796293 [label="+"];
Node34948909 [label="expression"];
Node46104728 [label="atom"];
Node12289376 [label="scientific"];
Node43495525 [label="2"];
Node55915408 [label="EOF"];
Node18643596 -> Node33574638;
Node18643596 -> Node55915408;
Node33574638 -> Node33736294;
Node33574638 -> Node18796293;
Node33574638 -> Node34948909;
Node34948909 -> Node46104728;
Node46104728 -> Node12289376;
Node12289376 -> Node43495525;
Node33736294 -> Node35191196;
Node35191196 -> Node48285313;
Node48285313 -> Node31914638;
}

Current version

0.23.0 Major changes to trgen, trparse, trfoldlit, trquery. Removal of trinsert, trdelete, trmove, trdelabel, trstrip.

License

The MIT License

Copyright (c) 2024 Ken Domino

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
0.23.0 93 4/25/2024
0.22.0 126 2/26/2024
0.18.1 590 11/11/2022
0.18.0 427 11/7/2022
0.17.0 501 9/11/2022
0.16.5 506 7/29/2022
0.16.4 534 6/13/2022
0.16.3 543 5/7/2022
0.16.2 481 5/6/2022
0.16.1 548 5/5/2022
0.16.0 601 4/13/2022
0.15.1 553 4/4/2022
0.15.0 562 3/20/2022
0.14.3 518 2/27/2022
0.14.2 519 2/18/2022
0.14.1 545 1/26/2022
0.14.0 571 1/26/2022
0.13.8 531 1/14/2022
0.13.7 561 1/13/2022
0.13.6 510 1/13/2022
0.13.5 564 1/12/2022
0.13.4 517 1/11/2022
0.13.3 552 1/10/2022
0.13.2 343 12/24/2021
0.13.1 340 12/24/2021
0.13.0 350 12/23/2021
0.12.0 333 12/6/2021
0.11.5 477 10/17/2021
0.11.4 393 10/17/2021
0.11.3 397 9/28/2021
0.11.2 395 9/26/2021
0.11.1 450 9/25/2021
0.11.0 433 9/24/2021
0.10.0 405 9/9/2021
0.8.9 396 8/13/2021
0.8.8 408 8/5/2021
0.8.7 364 7/20/2021
0.8.6 443 7/13/2021
0.8.5 425 7/6/2021

# trdot
## Summary
Print a parse tree in Graphvis Dot format
## Description
Reads a tree from stdin and prints the tree as a Dot graph.
## Usage
trdot
## Details
`trdot` reads parse tree data via stdin and outputs
a Dot graph specification. The stdout can be redirected to
save the output to a file. Or, you can copy the output and
use an online Dot graph visualizer to make a plot.
Any parse tree data can be converted to Dot, include a
parse of a grammar, the parse tree of a simple expression grammar,
or a list of parse tree nodes obtained via
[trxgrep](https://github.com/kaby76/Domemtech.Trash/tree/main/trxgrep).
## Examples
Consider the Expression grammar, obtained via
mkdir foo; cd foo; trgen; cd Generated; dotnet build
Let's parse the expression "1+2" and print the parse tree as a Dot graph:
trparse -i "1+2" | trdot
The output will be:
digraph G {
Node18643596 [label="file_"];
Node33574638 [label="expression"];
Node33736294 [label="expression"];
Node35191196 [label="atom"];
Node48285313 [label="scientific"];
Node31914638 [label="1"];
Node18796293 [label="+"];
Node34948909 [label="expression"];
Node46104728 [label="atom"];
Node12289376 [label="scientific"];
Node43495525 [label="2"];
Node55915408 [label="EOF"];
Node18643596 -> Node33574638;
Node18643596 -> Node55915408;
Node33574638 -> Node33736294;
Node33574638 -> Node18796293;
Node33574638 -> Node34948909;
Node34948909 -> Node46104728;
Node46104728 -> Node12289376;
Node12289376 -> Node43495525;
Node33736294 -> Node35191196;
Node35191196 -> Node48285313;
Node48285313 -> Node31914638;
}
## Current version
0.23.0 Major changes to trgen, trparse, trfoldlit, trquery. Removal of trinsert, trdelete, trmove, trdelabel, trstrip.
## License
The MIT License
Copyright (c) 2024 Ken Domino
Permission is hereby granted, free of charge,
to any person obtaining a copy of this software and
associated documentation files (the "Software"), to
deal in the Software without restriction, including
without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom
the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.