Rename extra/browser to extra/http/parser
parent
31102fc37c
commit
d3350bcfdf
14
extra/browser/analyzer/analyzer.factor → extra/http/parser/analyzer/analyzer.factor
Normal file → Executable file
14
extra/browser/analyzer/analyzer.factor → extra/http/parser/analyzer/analyzer.factor
Normal file → Executable file
|
@ -1,15 +1,23 @@
|
||||||
USING: assocs browser.parser kernel math sequences strings ;
|
USING: assocs browser.parser kernel math sequences strings ;
|
||||||
IN: browser.analyzer
|
IN: http.parser.analyzer
|
||||||
|
|
||||||
: remove-blank-text ( vector -- vector )
|
: remove-blank-text ( vector -- vector' )
|
||||||
[
|
[
|
||||||
dup tag-name text = [
|
dup tag-name text = [
|
||||||
tag-text [ blank? not ] all?
|
tag-text [ blank? ] all? not
|
||||||
] [
|
] [
|
||||||
drop t
|
drop t
|
||||||
] if
|
] if
|
||||||
] subset ;
|
] subset ;
|
||||||
|
|
||||||
|
: trim-text ( vector -- vector' )
|
||||||
|
[
|
||||||
|
dup tag-name text = [
|
||||||
|
[ tag-text [ blank? ] trim ] keep
|
||||||
|
[ set-tag-text ] keep
|
||||||
|
] when
|
||||||
|
] map ;
|
||||||
|
|
||||||
: find-by-id ( id vector -- vector )
|
: find-by-id ( id vector -- vector )
|
||||||
[ tag-attributes "id" swap at = ] curry* subset ;
|
[ tag-attributes "id" swap at = ] curry* subset ;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
USING: arrays browser.utils hashtables io kernel namespaces
|
USING: arrays http.parser.utils hashtables io kernel
|
||||||
prettyprint quotations
|
namespaces prettyprint quotations
|
||||||
sequences splitting state-parser strings ;
|
sequences splitting state-parser strings ;
|
||||||
USE: tools.interpreter
|
USE: tools.interpreter
|
||||||
IN: browser.parser
|
IN: http.parser
|
||||||
|
|
||||||
TUPLE: tag name attributes text matched? closing? ;
|
TUPLE: tag name attributes text matched? closing? ;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
USING: assocs browser.parser browser.utils combinators
|
USING: assocs http.parser browser.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: browser.printer
|
IN: http.parser.printer
|
||||||
|
|
||||||
SYMBOL: no-section
|
SYMBOL: no-section
|
||||||
SYMBOL: html
|
SYMBOL: html
|
|
@ -3,7 +3,7 @@ hashtables.private io kernel math
|
||||||
namespaces prettyprint quotations sequences splitting
|
namespaces prettyprint quotations sequences splitting
|
||||||
state-parser strings ;
|
state-parser strings ;
|
||||||
USING: browser.parser ;
|
USING: browser.parser ;
|
||||||
IN: browser.utils
|
IN: http.parser.utils
|
||||||
|
|
||||||
: string-parse-end?
|
: string-parse-end?
|
||||||
get-next not ;
|
get-next not ;
|
Loading…
Reference in New Issue