diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index 4a92e28..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright 2024 Brandon Dyck - -Permission to use, copy, modify, and/or distribute this software for any purpose - with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. \ No newline at end of file diff --git a/TODO.txt b/TODO.txt index 7e001b8..8fb51d9 100644 --- a/TODO.txt +++ b/TODO.txt @@ -3,5 +3,4 @@ Think about not requiring so much Pos() when making messages Rename Seq2 to Seq Document Seq Should MakeState be private now that there's Run? -Add SPDX tags What's Megaparsec got that we ain't got? diff --git a/UNLICENSE b/UNLICENSE new file mode 100644 index 0000000..b3dbff0 --- /dev/null +++ b/UNLICENSE @@ -0,0 +1,22 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +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 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. diff --git a/bind.go b/bind.go index aea40c6..734ebb3 100644 --- a/bind.go +++ b/bind.go @@ -1,5 +1,7 @@ // GENERATED FILE. DO NOT EDIT. +// SPDX-License-Identifier: Unlicense + package gigaparsec // Bind combines p with a parser created by f that depends on p's result value. diff --git a/bytes/regexp.go b/bytes/regexp.go index aec7c53..8b7a762 100644 --- a/bytes/regexp.go +++ b/bytes/regexp.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Unlicense + package bytes import ( diff --git a/bytes/regexp_test.go b/bytes/regexp_test.go index 3f96828..6e9640f 100644 --- a/bytes/regexp_test.go +++ b/bytes/regexp_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Unlicense + package bytes_test import ( diff --git a/cursor/cursor.go b/cursor/cursor.go index 7a765fd..446cdaa 100644 --- a/cursor/cursor.go +++ b/cursor/cursor.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Unlicense + package cursor import ( diff --git a/cursor/cursor_test.go b/cursor/cursor_test.go index da406e0..7b4c422 100644 --- a/cursor/cursor_test.go +++ b/cursor/cursor_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Unlicense + package cursor_test import ( diff --git a/cursor/helper.go b/cursor/helper.go index 715317c..80b87b9 100644 --- a/cursor/helper.go +++ b/cursor/helper.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Unlicense + package cursor import ( diff --git a/cursor/helper_test.go b/cursor/helper_test.go index a3fd2a0..3a32af6 100644 --- a/cursor/helper_test.go +++ b/cursor/helper_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Unlicense + package cursor_test import "testing" diff --git a/gigaparsec.go b/gigaparsec.go index 3fb5f5b..a199d2c 100644 --- a/gigaparsec.go +++ b/gigaparsec.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Unlicense + package gigaparsec //go:generate go run ./internal/bindgen -bindpath bind.go -seqpath seq.go -max 5 -pkg gigaparsec diff --git a/internal/bindgen/bind.go.tmpl b/internal/bindgen/bind.go.tmpl index 5566af3..ed4191e 100644 --- a/internal/bindgen/bind.go.tmpl +++ b/internal/bindgen/bind.go.tmpl @@ -1,3 +1,5 @@ +{{/* SPDX-License-Identifier: Unlicense */ -}} + {{define "fparams" -}} {{with $max := .}}{{range .Count}} f{{.}} func(T{{.}}) Parser[In, {{if eq . $max}}Out{{else}}T{{.Next}}{{end}}], {{end}}{{end}}{{end -}} @@ -31,6 +33,8 @@ func Bind{{.}}[In, Out{{range .Count}}, T{{.}}{{end}} any]( // GENERATED FILE. DO NOT EDIT. +// SPDX-License-Identifier: Unlicense + package {{.Package}} {{range .Count}} {{template "func" .}} diff --git a/internal/bindgen/bindgen.go b/internal/bindgen/bindgen.go index e422c73..6c4d036 100644 --- a/internal/bindgen/bindgen.go +++ b/internal/bindgen/bindgen.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Unlicense + package main import ( diff --git a/internal/bindgen/seq.go.tmpl b/internal/bindgen/seq.go.tmpl index a8b1fa6..b626d91 100644 --- a/internal/bindgen/seq.go.tmpl +++ b/internal/bindgen/seq.go.tmpl @@ -1,3 +1,5 @@ +{{/* SPDX-License-Identifier: Unlicense */ -}} + {{define "func"}}{{if gt . 1 -}} func Seq{{.}}[In, Out{{range .Count}}, T{{.}}{{end}} any]( {{- range .Count}} @@ -28,6 +30,8 @@ func Seq{{.}}[In, Out{{range .Count}}, T{{.}}{{end}} any]( // GENERATED FILE. DO NOT EDIT. +// SPDX-License-Identifier: Unlicense + package {{.Package}} {{range .Count}}{{template "func" .}} diff --git a/parser_test.go b/parser_test.go index 788675d..088dda0 100644 --- a/parser_test.go +++ b/parser_test.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Unlicense + package gigaparsec_test import ( diff --git a/seq.go b/seq.go index 6296d36..7319041 100644 --- a/seq.go +++ b/seq.go @@ -1,5 +1,7 @@ // GENERATED FILE. DO NOT EDIT. +// SPDX-License-Identifier: Unlicense + package gigaparsec func Seq2[In, Out, T, T2 any]( diff --git a/test/generator/gen.go b/test/generator/gen.go index b0d4010..352d06c 100644 --- a/test/generator/gen.go +++ b/test/generator/gen.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Unlicense + package generator import ( diff --git a/test/readerat.go b/test/readerat.go index d61be8d..502cb51 100644 --- a/test/readerat.go +++ b/test/readerat.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Unlicense + // Package test contains helpers for testing parsers. package test