diff --git a/extra/modern/manifest/authors.txt b/extra/modern/manifest/authors.txt new file mode 100644 index 0000000000..7c1b2f2279 --- /dev/null +++ b/extra/modern/manifest/authors.txt @@ -0,0 +1 @@ +Doug Coleman diff --git a/extra/modern/manifest/manifest.factor b/extra/modern/manifest/manifest.factor new file mode 100644 index 0000000000..b91a18037f --- /dev/null +++ b/extra/modern/manifest/manifest.factor @@ -0,0 +1,254 @@ +! Copyright (C) 2019 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: accessors arrays assocs combinators kernel modern +sequences strings words ; +IN: modern.manifest + +TUPLE: syntax-forms + sections + ucolons + lcolons + containers + braces + brackets + parens + ldecorators + rdecorators ; + +: ( -- syntax-forms ) + syntax-forms new + H{ } clone >>sections + H{ } clone >>ucolons + H{ } clone >>lcolons + H{ } clone >>containers + H{ } clone >>braces + H{ } clone >>brackets + H{ } clone >>parens + H{ } clone >>ldecorators + H{ } clone >>rdecorators + ; inline + +ERROR: key-exists val key assoc existing-value ; +: checked-set-at ( val key assoc -- ) + 2dup ?at [ key-exists ] [ drop set-at ] if ; + +: add-section-form ( syntax-forms parser tag -- syntax-forms ) pick sections>> checked-set-at ; +: add-ucolon-form ( syntax-forms parser tag -- syntax-forms ) pick ucolons>> checked-set-at ; +: add-lcolon-form ( syntax-forms parser tag -- syntax-forms ) pick lcolons>> checked-set-at ; +: add-containers-form ( syntax-forms parser tag -- syntax-forms ) pick containers>> checked-set-at ; +: add-braces-form ( syntax-forms parser tag -- syntax-forms ) pick braces>> checked-set-at ; +: add-brackets-form ( syntax-forms parser tag -- syntax-forms ) pick brackets>> checked-set-at ; +: add-parens-form ( syntax-forms parser tag -- syntax-forms ) pick parens>> checked-set-at ; +: add-ldecorators-form ( syntax-forms parser tag -- syntax-forms ) pick ldecorators>> checked-set-at ; +: add-rdecorators-form ( syntax-forms parser tag -- syntax-forms ) pick rdecorators>> checked-set-at ; + + +! One syntax-forms per vocab-root +: core-syntax-forms ( -- obj ) + + ! string ; + +: flatten-literals ( seq -- seq' ) + ; + + +: upper-colon>form ( seq -- form ) + [ first "syntax" lookup-word ] [ ] bi 2array ; + +GENERIC: upper-colon>definitions ( form -- seq ) + +! M: \: upper-colon>definitions +! second first >string ; + + + +: form>definitions ( obj -- obj' ) + { + { [ dup ?first upper-colon? ] [ upper-colon>definitions ] } + [ ] + } cond ; + + +! math+private,macos:fixnum+ +! math+private:fixnum+ +! math:fixnum+ +#[[ + + private decorator + + macos decorator + MACOS> + macos,private decorators + + PRIVATE> +;VOCAB> + private.macos namespace + + math#private.macos + math+private.macos + math:foo + math+private:foo + math+private.macos:foo + + git@github.com:erg/factor#master +git@github.com:erg/factor#master\core/math+private.macos:foo + ^ + +uri\path\path/path/ + +GITHUB\core/math.order +git@github.com:erg/factor#master\core/math/order/order.factor +git@github.com:erg/factor#master\core//math.order +git@github.com:erg/factor#master\core//math.order +${github}:erg/factor#master\core//math.order + + + + +git branch name: no backslash, ., .., ~^:, end in / + + + PRIVATE> + ;VOCAB> +;ROOT> + + + PRIVATE> + ;VOCAB> + ;ROOT> +;REPO> +]] \ No newline at end of file