Rename project to `yaragg`.
parent
36306b57d4
commit
386052ac68
@ -1,19 +1,2 @@
|
||||
# for Racket
|
||||
compiled/
|
||||
*~
|
||||
|
||||
# for Mac OS X
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
Icon
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear on external disk
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
brag/*.html
|
||||
brag/*.css
|
||||
brag/*.js
|
||||
doc/
|
||||
|
@ -1,9 +1,7 @@
|
||||
MIT License for `brag` (code only)
|
||||
Copyright 2022 Jack Firth
|
||||
|
||||
© 2017-2020 Matthew Butterick
|
||||
|
||||
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:
|
||||
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.
|
||||
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.
|
@ -0,0 +1,11 @@
|
||||
`yaragg` contains substantial portions of the software [`brag`](https://github.com/mbutterick/brag)
|
||||
|
||||
MIT License for `brag` (code only)
|
||||
|
||||
© 2017-2020 Matthew Butterick
|
||||
|
||||
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.
|
@ -1,4 +1,4 @@
|
||||
`brag` contains substantial portions of the software [`ragg`](https://github.com/jbclements/ragg)
|
||||
`yaragg` contains substantial portions of the software [`ragg`](https://github.com/jbclements/ragg)
|
||||
|
||||
MIT License for `ragg`
|
||||
|
@ -1,3 +0,0 @@
|
||||
#lang info
|
||||
|
||||
(define scribblings '(("br-parser-tools.scrbl" (multi-page) (parsing-library))))
|
@ -1,12 +0,0 @@
|
||||
#lang info
|
||||
|
||||
(define collection 'multi)
|
||||
|
||||
(define deps '("br-parser-tools-lib"
|
||||
"br-parser-tools-doc"))
|
||||
(define implies '("br-parser-tools-lib"
|
||||
"br-parser-tools-doc"))
|
||||
|
||||
(define pkg-desc "Lex- and Yacc-style parsing tools")
|
||||
|
||||
(define pkg-authors '(mflatt))
|
@ -1,4 +0,0 @@
|
||||
#lang brag/examples/simple-line-drawing
|
||||
3 9 X;
|
||||
6 3 b 3 X 3 b;
|
||||
3 9 X;
|
@ -1,26 +0,0 @@
|
||||
#lang racket/base
|
||||
|
||||
(require brag/test/test-0n1
|
||||
brag/test/test-0n1n
|
||||
brag/test/test-01-equal
|
||||
brag/test/test-baby-json
|
||||
brag/test/test-baby-json-hider
|
||||
brag/test/test-curly-quantifier
|
||||
brag/test/test-cutter
|
||||
brag/test/test-empty-symbol
|
||||
brag/test/test-errors
|
||||
brag/test/test-flatten
|
||||
brag/test/test-hide-and-splice
|
||||
brag/test/test-lexer
|
||||
brag/test/test-nested-repeats
|
||||
brag/test/test-old-token
|
||||
brag/test/test-parser
|
||||
brag/test/test-quotation-marks-and-backslashes
|
||||
brag/test/test-simple-arithmetic-grammar
|
||||
brag/test/test-simple-line-drawing
|
||||
brag/test/test-start-and-atok
|
||||
brag/test/test-top-level-cut
|
||||
brag/test/test-weird-grammar
|
||||
brag/test/test-whitespace
|
||||
brag/test/test-wordy
|
||||
(submod brag/codegen/satisfaction test))
|
@ -1,11 +0,0 @@
|
||||
#lang racket/base
|
||||
(require (prefix-in 1: brag/examples/top-level-cut-1)
|
||||
(prefix-in 2: brag/examples/top-level-cut-2)
|
||||
(prefix-in 3: brag/examples/top-level-cut-3)
|
||||
brag/support
|
||||
rackunit)
|
||||
|
||||
(check-equal? (1:parse-to-datum "x") '((sub "x")))
|
||||
(check-equal? (2:parse-to-datum "x") '(("x")))
|
||||
(check-equal? (3:parse-to-datum "x") '("x"))
|
||||
|
@ -1,4 +0,0 @@
|
||||
#lang info
|
||||
|
||||
(define scribblings '(("brag.scrbl")))
|
||||
|
@ -1,16 +1,16 @@
|
||||
#lang racket/base
|
||||
(require racket/list
|
||||
racket/syntax
|
||||
brag/rules/stx-types
|
||||
yaragg/rules/stx-types
|
||||
syntax/id-table
|
||||
(prefix-in sat: brag/codegen/satisfaction)
|
||||
(prefix-in sat: yaragg/codegen/satisfaction)
|
||||
(for-template racket/base
|
||||
brag/codegen/runtime
|
||||
brag/private/internal-support))
|
||||
yaragg/codegen/runtime
|
||||
yaragg/private/internal-support))
|
||||
|
||||
(provide (all-defined-out)
|
||||
(for-template (all-from-out brag/codegen/runtime
|
||||
brag/private/internal-support)))
|
||||
(for-template (all-from-out yaragg/codegen/runtime
|
||||
yaragg/private/internal-support)))
|
||||
|
||||
;; Given a flattened rule, returns a syntax for the code that
|
||||
;; preserves as much source location as possible.
|
@ -1,5 +1,5 @@
|
||||
#lang racket/base
|
||||
(require brag/rules/stx-types
|
||||
(require yaragg/rules/stx-types
|
||||
racket/list
|
||||
(for-syntax racket/base))
|
||||
(provide flatten-rule
|
@ -0,0 +1,4 @@
|
||||
#lang yaragg/examples/simple-line-drawing
|
||||
3 9 X;
|
||||
6 3 b 3 X 3 b;
|
||||
3 9 X;
|
@ -1,12 +1,12 @@
|
||||
#lang s-exp syntax/module-reader
|
||||
brag/examples/simple-line-drawing/semantics
|
||||
yaragg/examples/simple-line-drawing/semantics
|
||||
#:read my-read
|
||||
#:read-syntax my-read-syntax
|
||||
#:info my-get-info
|
||||
#:whole-body-readers? #t
|
||||
|
||||
(require brag/examples/simple-line-drawing/lexer
|
||||
brag/examples/simple-line-drawing/grammar)
|
||||
(require yaragg/examples/simple-line-drawing/lexer
|
||||
yaragg/examples/simple-line-drawing/grammar)
|
||||
|
||||
(define (my-read in)
|
||||
(syntax->datum (my-read-syntax #f in)))
|
@ -1,8 +1,8 @@
|
||||
#lang racket/base
|
||||
|
||||
(module reader racket/base
|
||||
(require brag/codegen/reader)
|
||||
(provide (all-from-out brag/codegen/reader)))
|
||||
(require yaragg/codegen/reader)
|
||||
(provide (all-from-out yaragg/codegen/reader)))
|
||||
|
||||
;; this creates dummy identifiers
|
||||
;; so cross-refs in `brag` docs will work
|
@ -1,5 +1,5 @@
|
||||
#lang racket/base
|
||||
(require brag/support (submod brag/rules/lexer lex-abbrevs) racket/match)
|
||||
(require yaragg/support (submod yaragg/rules/lexer lex-abbrevs) racket/match)
|
||||
(provide color-brag)
|
||||
|
||||
(define brag-syntax-lexer
|
@ -1,6 +1,6 @@
|
||||
#lang racket/base
|
||||
|
||||
(require brag/support)
|
||||
(require yaragg/support)
|
||||
|
||||
(provide current-source
|
||||
current-parser-error-handler
|
@ -1,7 +1,7 @@
|
||||
#lang racket/base
|
||||
|
||||
(require brag/rules/rule-structs
|
||||
br-parser-tools/lex
|
||||
(require yaragg/rules/rule-structs
|
||||
yaragg-parser-tools/lex
|
||||
racket/match
|
||||
syntax/strip-context)
|
||||
|
@ -1,11 +1,11 @@
|
||||
#lang racket/base
|
||||
(require br-parser-tools/lex
|
||||
(require yaragg-parser-tools/lex
|
||||
racket/string
|
||||
racket/struct
|
||||
(prefix-in : br-parser-tools/lex-sre)
|
||||
(prefix-in : yaragg-parser-tools/lex-sre)
|
||||
(for-syntax racket/base))
|
||||
(provide (all-from-out br-parser-tools/lex)
|
||||
(all-from-out br-parser-tools/lex-sre)
|
||||
(provide (all-from-out yaragg-parser-tools/lex)
|
||||
(all-from-out yaragg-parser-tools/lex-sre)
|
||||
[struct-out token-struct]
|
||||
token
|
||||
[struct-out exn:fail:parsing])
|
@ -1,6 +1,6 @@
|
||||
#lang racket/base
|
||||
|
||||
(require brag/examples/01-equal
|
||||
(require yaragg/examples/01-equal
|
||||
rackunit)
|
||||
|
||||
(check-equal? (syntax->datum (parse ""))
|
@ -1,7 +1,7 @@
|
||||
#lang racket/base
|
||||
|
||||
(require brag/examples/0n1
|
||||
brag/support
|
||||
(require yaragg/examples/0n1
|
||||
yaragg/support
|
||||
rackunit)
|
||||
|
||||
(define (lex ip)
|
@ -1,6 +1,6 @@
|
||||
#lang racket/base
|
||||
(require brag/examples/0n1n
|
||||
brag/support
|
||||
(require yaragg/examples/0n1n
|
||||
yaragg/support
|
||||
rackunit)
|
||||
|
||||
(define (lex ip)
|
@ -0,0 +1,26 @@
|
||||
#lang racket/base
|
||||
|
||||
(require yaragg/test/test-0n1
|
||||
yaragg/test/test-0n1n
|
||||
yaragg/test/test-01-equal
|
||||
yaragg/test/test-baby-json
|
||||
yaragg/test/test-baby-json-hider
|
||||
yaragg/test/test-curly-quantifier
|
||||
yaragg/test/test-cutter
|
||||
yaragg/test/test-empty-symbol
|
||||
yaragg/test/test-errors
|
||||
yaragg/test/test-flatten
|
||||
yaragg/test/test-hide-and-splice
|
||||
yaragg/test/test-lexer
|
||||
yaragg/test/test-nested-repeats
|
||||
yaragg/test/test-old-token
|
||||
yaragg/test/test-parser
|
||||
yaragg/test/test-quotation-marks-and-backslashes
|
||||
yaragg/test/test-simple-arithmetic-grammar
|
||||
yaragg/test/test-simple-line-drawing
|
||||
yaragg/test/test-start-and-atok
|
||||
yaragg/test/test-top-level-cut
|
||||
yaragg/test/test-weird-grammar
|
||||
yaragg/test/test-whitespace
|
||||
yaragg/test/test-wordy
|
||||
(submod yaragg/codegen/satisfaction test))
|
@ -1,6 +1,6 @@
|
||||
#lang racket/base
|
||||
(require brag/examples/baby-json-hider
|
||||
brag/support
|
||||
(require yaragg/examples/baby-json-hider
|
||||
yaragg/support
|
||||
rackunit)
|
||||
|
||||
(define parse-result (parse (list "{"
|
@ -1,7 +1,7 @@
|
||||
#lang racket/base
|
||||
(require brag/examples/baby-json
|
||||
(prefix-in alt: brag/examples/baby-json-alt)
|
||||
brag/support
|
||||
(require yaragg/examples/baby-json
|
||||
(prefix-in alt: yaragg/examples/baby-json-alt)
|
||||
yaragg/support
|
||||
rackunit)
|
||||
|
||||
(let ([str (list "{"
|
@ -1,6 +1,6 @@
|
||||
#lang racket/base
|
||||
|
||||
(require brag/examples/codepoints
|
||||
(require yaragg/examples/codepoints
|
||||
rackunit)
|
||||
|
||||
(check-equal? (parse-to-datum '("\"A\\" "'c\\" "*d\\\"\\ef\"" "hello world"))
|
@ -1,6 +1,6 @@
|
||||
#lang racket/base
|
||||
(require brag/examples/curly-quantifier
|
||||
brag/support
|
||||
(require yaragg/examples/curly-quantifier
|
||||
yaragg/support
|
||||
rackunit)
|
||||
|
||||
(check-exn exn:fail:parsing? (λ () (parse-to-datum "a")))
|
@ -1,6 +1,6 @@
|
||||
#lang racket/base
|
||||
(require brag/examples/cutter-another
|
||||
brag/support
|
||||
(require yaragg/examples/cutter-another
|
||||
yaragg/support
|
||||
rackunit)
|
||||
|
||||
(check-equal? (parse-tree "w") '(top (w)))
|
@ -1,6 +1,6 @@
|
||||
#lang racket/base
|
||||
(require brag/examples/cutter
|
||||
brag/support
|
||||
(require yaragg/examples/cutter
|
||||
yaragg/support
|
||||
rackunit)
|
||||
|
||||
;; related to rule-flattening problem
|
@ -1,6 +1,6 @@
|
||||
#lang racket/base
|
||||
(require brag/examples/empty-symbol
|
||||
brag/support
|
||||
(require yaragg/examples/empty-symbol
|
||||
yaragg/support
|
||||
rackunit)
|
||||
|
||||
(check-true (and (member (parse-to-datum "") (list '(top (xs)) '(top (ys)) '(top (zs)))) #t))
|
@ -1,6 +1,6 @@
|
||||
#lang racket/base
|
||||
(require brag/rules/stx-types
|
||||
brag/codegen/flatten
|
||||
(require yaragg/rules/stx-types
|
||||
yaragg/codegen/flatten
|
||||
rackunit)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#lang racket/base
|
||||
(require brag/examples/hide-and-splice
|
||||
brag/support
|
||||
(require yaragg/examples/hide-and-splice
|
||||
yaragg/support
|
||||
rackunit)
|
||||
|
||||
;; check that an id with both a splice and hide is handled correctly
|
@ -1,7 +1,7 @@
|
||||
#lang racket/base
|
||||
(require brag/rules/lexer
|
||||
(require yaragg/rules/lexer
|
||||
rackunit
|
||||
br-parser-tools/lex)
|
||||
yaragg-parser-tools/lex)
|
||||
|
||||
(define (l s)
|
||||
(define t (lex/1 (open-input-string s)))
|
@ -1,7 +1,7 @@
|
||||
#lang racket/base
|
||||
(require rackunit
|
||||
brag/support
|
||||
brag/examples/subrule)
|
||||
yaragg/support
|
||||
yaragg/examples/subrule)
|
||||
|
||||
(define parse-next (make-rule-parser next))
|
||||
(define parse-start (make-rule-parser start))
|
@ -1,5 +1,5 @@
|
||||
#lang racket/base
|
||||
(require brag/examples/nested-repeats
|
||||
(require yaragg/examples/nested-repeats
|
||||
rackunit)
|
||||
|
||||
(check-equal?
|
@ -1,6 +1,6 @@
|
||||
#lang racket/base
|
||||
(require brag/examples/quotation-marks-and-backslashes
|
||||
brag/support
|
||||
(require yaragg/examples/quotation-marks-and-backslashes
|
||||
yaragg/support
|
||||
rackunit)
|
||||
|
||||
(check-equal? (parse-tree "a\"'\\a\"'\\") '(start "a" "\"" "'" "\\" "a" "\"" "'" "\\"))
|
@ -1,8 +1,8 @@
|
||||
#lang racket/base
|
||||
(require brag/examples/simple-arithmetic-grammar
|
||||
brag/support
|
||||
(require yaragg/examples/simple-arithmetic-grammar
|
||||
yaragg/support
|
||||
racket/set
|
||||
br-parser-tools/lex
|
||||
yaragg-parser-tools/lex
|
||||
racket/list
|
||||
rackunit)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#lang racket/base
|
||||
|
||||
(require brag/examples/start-and-atok
|
||||
brag/support
|
||||
(require yaragg/examples/start-and-atok
|
||||
yaragg/support
|
||||
rackunit)
|
||||
|
||||
;; make sure that "start" and "atok" work as terminals.
|
@ -0,0 +1,11 @@
|
||||
#lang racket/base
|
||||
(require (prefix-in 1: yaragg/examples/top-level-cut-1)
|
||||
(prefix-in 2: yaragg/examples/top-level-cut-2)
|
||||
(prefix-in 3: yaragg/examples/top-level-cut-3)
|
||||
yaragg/support
|
||||
rackunit)
|
||||
|
||||
(check-equal? (1:parse-to-datum "x") '((sub "x")))
|
||||
(check-equal? (2:parse-to-datum "x") '(("x")))
|
||||
(check-equal? (3:parse-to-datum "x") '("x"))
|
||||
|
@ -1,6 +1,6 @@
|
||||
#lang racket/base
|
||||
|
||||
(require brag/test/weird-grammar
|
||||
(require yaragg/test/weird-grammar
|
||||
rackunit)
|
||||
|
||||
(check-equal? (syntax->datum (parse '("foo")))
|
@ -1,6 +1,6 @@
|
||||
#lang racket/base
|
||||
(require brag/examples/whitespace
|
||||
brag/support
|
||||
(require yaragg/examples/whitespace
|
||||
yaragg/support
|
||||
rackunit)
|
||||
|
||||
(check-equal?
|
@ -1,6 +1,6 @@
|
||||
#lang racket/base
|
||||
(require brag/examples/wordy
|
||||
brag/support
|
||||
(require yaragg/examples/wordy
|
||||
yaragg/support
|
||||
rackunit)
|
||||
|
||||
(check-equal?
|
@ -0,0 +1,3 @@
|
||||
#lang info
|
||||
|
||||
(define scribblings '(("yaragg-parser-tools.scrbl" (multi-page) (parsing-library))))
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue