From cf0cb4aedcb1f0048bcce2211f2feb20aa0e391f Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 21 Jul 2015 12:07:53 -0700 Subject: [PATCH] nested-comments: remove this vocab. we have /* */ which is good enough for now. broken case: (* : print-broken ( -- ) "*)" ; *) not worth fixing, please don't bring this back :) its functionality will be replaced soon. --- basis/tools/ps/windows/windows.factor | 2 +- basis/windows/registry/registry.factor | 2 +- .../c/preprocessor/preprocessor-tests.factor | 15 ++----- extra/forestdb/lib/lib-tests.factor | 2 +- .../nested-comments-tests.factor | 43 ------------------- extra/nested-comments/nested-comments.factor | 22 ---------- extra/progress-bars/models/models.factor | 4 +- 7 files changed, 8 insertions(+), 82 deletions(-) delete mode 100644 extra/nested-comments/nested-comments-tests.factor delete mode 100644 extra/nested-comments/nested-comments.factor diff --git a/basis/tools/ps/windows/windows.factor b/basis/tools/ps/windows/windows.factor index e169befe24..6b6a143eb5 100644 --- a/basis/tools/ps/windows/windows.factor +++ b/basis/tools/ps/windows/windows.factor @@ -1,7 +1,7 @@ USING: accessors alien alien.c-types alien.data alien.syntax arrays byte-arrays classes.struct destructors fry io io.encodings.string io.encodings.utf16n kernel literals locals -math nested-comments sequences strings system tools.ps +math sequences strings system tools.ps windows.errors windows.handles windows.kernel32 windows.ntdll windows.types ; IN: tools.ps.windows diff --git a/basis/windows/registry/registry.factor b/basis/windows/registry/registry.factor index 060f9d7162..968b52fbe4 100644 --- a/basis/windows/registry/registry.factor +++ b/basis/windows/registry/registry.factor @@ -3,7 +3,7 @@ USING: alien.c-types byte-arrays kernel locals sequences windows.advapi32 windows.errors math windows windows.kernel32 windows.time accessors alien.data -nested-comments windows.types classes.struct continuations ; +windows.types classes.struct continuations ; IN: windows.registry ERROR: open-key-failed key subkey mode error-string ; diff --git a/extra/c/preprocessor/preprocessor-tests.factor b/extra/c/preprocessor/preprocessor-tests.factor index f33146107e..f0ac37258a 100644 --- a/extra/c/preprocessor/preprocessor-tests.factor +++ b/extra/c/preprocessor/preprocessor-tests.factor @@ -1,7 +1,6 @@ ! Copyright (C) 2009 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: tools.test c.preprocessor kernel accessors multiline -nested-comments ; +USING: tools.test c.preprocessor kernel accessors multiline ; IN: c.preprocessor.tests [ "vocab:c/tests/test1/test1.c" start-preprocess-file ] @@ -10,18 +9,10 @@ IN: c.preprocessor.tests { "yo\n\n\n\nyo4\n" } [ "vocab:c/tests/test2/test2.c" start-preprocess-file nip ] unit-test -(* +/* [ "vocab:c/tests/test3/test3.c" start-preprocess-file ] [ "\"BOO\"" = ] must-fail-with -*) +*/ { V{ "\"omg\"" "\"lol\"" } } [ "vocab:c/tests/test4/test4.c" start-preprocess-file drop warnings>> ] unit-test - - -(* -f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1); -f(2 * (2+(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1); -int i[] = { 1, 23, 4, 5, }; -char c[2][6] = { "hello", "" }; -*) diff --git a/extra/forestdb/lib/lib-tests.factor b/extra/forestdb/lib/lib-tests.factor index ba21cec34e..402a736857 100644 --- a/extra/forestdb/lib/lib-tests.factor +++ b/extra/forestdb/lib/lib-tests.factor @@ -6,7 +6,7 @@ combinators.short-circuit constructors continuations destructors forestdb.ffi forestdb.utils fry generalizations io.directories io.encodings.string io.encodings.utf8 io.files.temp io.pathnames kernel layouts libc make math math.parser math.ranges multiline -namespaces sequences system tools.test nested-comments ; +namespaces sequences system tools.test ; IN: forestdb.lib { [ cell-bits 32 = ] [ os windows? ] } 0&& [ diff --git a/extra/nested-comments/nested-comments-tests.factor b/extra/nested-comments/nested-comments-tests.factor deleted file mode 100644 index ae65b6a218..0000000000 --- a/extra/nested-comments/nested-comments-tests.factor +++ /dev/null @@ -1,43 +0,0 @@ -! Copyright (C) 2009 Doug Coleman. -! See http://factorcode.org/license.txt for BSD license. -USING: accessors eval kernel lexer nested-comments tools.test ; -IN: nested-comments.tests - -! Correct -{ } [ - "USE: nested-comments (* comment *)" eval( -- ) -] unit-test - -{ } [ - "USE: nested-comments (* comment*)" eval( -- ) -] unit-test - -{ } [ - "USE: nested-comments (* comment -*)" eval( -- ) -] unit-test - -{ } [ - "USE: nested-comments (* comment -*)" eval( -- ) -] unit-test - -{ } [ - "USE: nested-comments (* comment -*)" eval( -- ) -] unit-test - -{ } [ - "USE: nested-comments (* comment - (* *) - -*)" eval( -- ) -] unit-test - -! Malformed -[ - "USE: nested-comments (* comment - (* *)" eval( -- ) -] [ - error>> T{ unexpected f "*)" f } = -] must-fail-with diff --git a/extra/nested-comments/nested-comments.factor b/extra/nested-comments/nested-comments.factor deleted file mode 100644 index 190f10ef18..0000000000 --- a/extra/nested-comments/nested-comments.factor +++ /dev/null @@ -1,22 +0,0 @@ -! Copyright (C) 2009 blei, Doug Coleman. -! See http://factorcode.org/license.txt for BSD license. -USING: kernel locals make math multiline sequences ; -IN: nested-comments - -: (count-subsequences) ( count substring string n -- count' ) - [ 2dup ] dip start* [ - pick length + - [ 1 + ] 3dip (count-subsequences) - ] [ - 2drop - ] if* ; - -: count-subsequences ( subseq seq -- n ) - [ 0 ] 2dip 0 (count-subsequences) ; - -: parse-nestable-comment ( parsed-vector left-to-parse -- parsed-vector ) - 1 - "*)" parse-multiline-string - [ "(*" ] dip - count-subsequences + dup 0 > [ parse-nestable-comment ] [ drop ] if ; - -SYNTAX: (* 1 parse-nestable-comment ; diff --git a/extra/progress-bars/models/models.factor b/extra/progress-bars/models/models.factor index 66b53160be..9ec5a3d31f 100644 --- a/extra/progress-bars/models/models.factor +++ b/extra/progress-bars/models/models.factor @@ -1,8 +1,8 @@ ! Copyright (C) 2011 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: accessors calendar fonts fry io io.files io.files.info -kernel math models models.arrow namespaces nested-comments -progress-bars threads ui.gadgets.labels ui.gadgets.panes ; +kernel math models models.arrow namespaces progress-bars +threads ui.gadgets.labels ui.gadgets.panes ; IN: progress-bars.models SYMBOL: progress-bar -- 2.34.1