Fix usings and vocab names
parent
e2acf8c386
commit
4ac3b181f0
|
@ -1,5 +1,5 @@
|
||||||
USING: assocs http.parser kernel math sequences strings ;
|
USING: assocs html.parser kernel math sequences strings ;
|
||||||
IN: http.parser.analyzer
|
IN: html.parser.analyzer
|
||||||
|
|
||||||
: remove-blank-text ( vector -- vector' )
|
: remove-blank-text ( vector -- vector' )
|
||||||
[
|
[
|
||||||
|
@ -87,5 +87,5 @@ IN: http.parser.analyzer
|
||||||
! clear "/Users/erg/web/hostels.html" <file-reader> contents parse-html "Currency" "name" pick find-first-attribute-key-value
|
! clear "/Users/erg/web/hostels.html" <file-reader> contents parse-html "Currency" "name" pick find-first-attribute-key-value
|
||||||
|
|
||||||
! clear "/Users/erg/web/hostels.html" <file-reader> contents parse-html
|
! clear "/Users/erg/web/hostels.html" <file-reader> contents parse-html
|
||||||
! "Currency" "name" pick find-first-attribute-key-value
|
! "Currency" "name" pick find-first-attribute-key-value
|
||||||
! pick find-between remove-blank-text
|
! pick find-between remove-blank-text
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
USING: browser.parser kernel tools.test ;
|
USING: html.parser kernel tools.test ;
|
||||||
IN: temporary
|
IN: temporary
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
USING: arrays http.parser.utils hashtables io kernel
|
USING: arrays html.parser.utils hashtables io kernel
|
||||||
namespaces prettyprint quotations
|
namespaces prettyprint quotations
|
||||||
sequences splitting state-parser strings ;
|
sequences splitting state-parser strings ;
|
||||||
IN: http.parser
|
IN: html.parser
|
||||||
|
|
||||||
TUPLE: tag name attributes text matched? closing? ;
|
TUPLE: tag name attributes text matched? closing? ;
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ SYMBOL: tagstack
|
||||||
] unless ;
|
] unless ;
|
||||||
|
|
||||||
: parse-attributes ( -- hashtable )
|
: parse-attributes ( -- hashtable )
|
||||||
[ (parse-attributes) ] { } make >hashtable ;
|
[ (parse-attributes) ] { } make >hashtable ;
|
||||||
|
|
||||||
: (parse-tag)
|
: (parse-tag)
|
||||||
[
|
[
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
USING: assocs http.parser browser.utils combinators
|
USING: assocs html.parser html.utils combinators
|
||||||
continuations hashtables
|
continuations hashtables
|
||||||
hashtables.private io kernel math
|
hashtables.private io kernel math
|
||||||
namespaces prettyprint quotations sequences splitting
|
namespaces prettyprint quotations sequences splitting
|
||||||
state-parser strings ;
|
state-parser strings ;
|
||||||
IN: http.parser.printer
|
IN: html.parser.printer
|
||||||
|
|
||||||
SYMBOL: no-section
|
SYMBOL: no-section
|
||||||
SYMBOL: html
|
SYMBOL: html
|
||||||
|
@ -42,7 +42,7 @@ HOOK: print-closing-named-tag printer ( tag -- )
|
||||||
M: printer print-text-tag ( tag -- )
|
M: printer print-text-tag ( tag -- )
|
||||||
tag-text write ;
|
tag-text write ;
|
||||||
|
|
||||||
M: printer print-comment-tag ( tag -- )
|
M: printer print-comment-tag ( tag -- )
|
||||||
"<!--" write
|
"<!--" write
|
||||||
tag-text write
|
tag-text write
|
||||||
"-->" write ;
|
"-->" write ;
|
||||||
|
@ -67,7 +67,6 @@ M: printer print-closing-named-tag ( tag -- )
|
||||||
[
|
[
|
||||||
swap bl write "=" write ?quote write
|
swap bl write "=" write ?quote write
|
||||||
] assoc-each ;
|
] assoc-each ;
|
||||||
|
|
||||||
|
|
||||||
M: src-printer print-opening-named-tag ( tag -- )
|
M: src-printer print-opening-named-tag ( tag -- )
|
||||||
"<" write
|
"<" write
|
||||||
|
@ -102,7 +101,7 @@ SYMBOL: tablestack
|
||||||
[
|
[
|
||||||
V{ } clone tablestack set
|
V{ } clone tablestack set
|
||||||
] with-scope ;
|
] with-scope ;
|
||||||
|
|
||||||
! { { 1 2 } { 3 4 } }
|
! { { 1 2 } { 3 4 } }
|
||||||
! H{ { table-gap { 10 10 } } } [
|
! H{ { table-gap { 10 10 } } } [
|
||||||
! [ [ [ [ . ] with-cell ] each ] with-row ] each
|
! [ [ [ [ . ] with-cell ] each ] with-row ] each
|
||||||
|
|
|
@ -2,7 +2,7 @@ USING: assocs combinators continuations hashtables
|
||||||
hashtables.private io kernel math
|
hashtables.private io kernel math
|
||||||
namespaces prettyprint quotations sequences splitting
|
namespaces prettyprint quotations sequences splitting
|
||||||
state-parser strings tools.test ;
|
state-parser strings tools.test ;
|
||||||
USING: browser.utils ;
|
USING: html.utils ;
|
||||||
IN: temporary
|
IN: temporary
|
||||||
|
|
||||||
[ "'Rome'" ] [ "Rome" single-quote ] unit-test
|
[ "'Rome'" ] [ "Rome" single-quote ] unit-test
|
||||||
|
|
|
@ -2,8 +2,8 @@ USING: assocs circular combinators continuations hashtables
|
||||||
hashtables.private io kernel math
|
hashtables.private io kernel math
|
||||||
namespaces prettyprint quotations sequences splitting
|
namespaces prettyprint quotations sequences splitting
|
||||||
state-parser strings ;
|
state-parser strings ;
|
||||||
USING: http.parser ;
|
USING: html.parser ;
|
||||||
IN: http.parser.utils
|
IN: html.parser.utils
|
||||||
|
|
||||||
: string-parse-end?
|
: string-parse-end?
|
||||||
get-next not ;
|
get-next not ;
|
||||||
|
|
Loading…
Reference in New Issue