<commit_before>package main

import (
	"fmt"
	"log"
	"strings"

	"github.com/breml/blockdiag"
)

func main() {
	simple := ""
	simple =
		`blockdiag {
   A -> B -> C;
   A -> D;
}`

	simple =
		`blockdiag {
   A -> B -> C;
   A -> D;
}`

	simple =
		`blockdiag {
			node_width = 128;
			A -> B -> C -> D;
			B -> F -> G -> X -> Y;
			C -> E;
			H -> I -> J -> H;
		}`

	simple =
		`blockdiag {
			A -> B -> C;
			B -> D -> E -> H;
			A -> F -> E;
			F -> G;
			X -> Y;
		}`

	got, err := blockdiag.ParseReader("simple.diag", strings.NewReader(simple))
	if err != nil {
		log.Fatal("Parse error:", err)
	}
	diag := got.(blockdiag.Diag)

	diag.PlaceInGrid()
	fmt.Printf("%s\n", diag.String())

	// fmt.Println("=", diag)

	/*
		for _, e := range diag.Edges {
			fmt.Println(e.Name)
		}
	*/

	//fmt.Println("Circular: ", diag.FindCircular())

	//fmt.Printf("Diag: %#v\n", &diag)
}<commit_msg>Cleanup parsertest<commit_after>package main

import (
	"fmt"
	"log"
	"strings"

	"github.com/breml/blockdiag"
)

func main() {
	simple := ""
	simple =
		`blockdiag {
	A -> B;
	H -> I;
	E -> F -> B;
	H -> J;
	J -> K;
}`

	got, err := blockdiag.ParseReader("simple.diag", strings.NewReader(simple))
	if err != nil {
		log.Fatal("Parse error:", err)
	}
	diag := got.(blockdiag.Diag)

	diag.PlaceInGrid()
	fmt.Printf("%s\n", diag.String())
}
{'fraction_non_alphanumeric': 0.2209653092006033, 'fraction_numerical': 0.0022624434389140274, 'mean_word_length': 2.3425692695214106, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7529710', 'n_tokens_mistral': 620, 'n_tokens_neox': 568, 'n_words': 125}