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 ;
|
||||
IN: browser.analyzer
|
||||
IN: http.parser.analyzer
|
||||
|
||||
: remove-blank-text ( vector -- vector )
|
||||
: remove-blank-text ( vector -- vector' )
|
||||
[
|
||||
dup tag-name text = [
|
||||
tag-text [ blank? not ] all?
|
||||
tag-text [ blank? ] all? not
|
||||
] [
|
||||
drop t
|
||||
] if
|
||||
] 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 )
|
||||
[ tag-attributes "id" swap at = ] curry* subset ;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
USING: arrays browser.utils hashtables io kernel namespaces
|
||||
prettyprint quotations
|
||||
USING: arrays http.parser.utils hashtables io kernel
|
||||
namespaces prettyprint quotations
|
||||
sequences splitting state-parser strings ;
|
||||
USE: tools.interpreter
|
||||
IN: browser.parser
|
||||
IN: http.parser
|
||||
|
||||
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
|
||||
hashtables.private io kernel math
|
||||
namespaces prettyprint quotations sequences splitting
|
||||
state-parser strings ;
|
||||
IN: browser.printer
|
||||
IN: http.parser.printer
|
||||
|
||||
SYMBOL: no-section
|
||||
SYMBOL: html
|
|
@ -3,7 +3,7 @@ hashtables.private io kernel math
|
|||
namespaces prettyprint quotations sequences splitting
|
||||
state-parser strings ;
|
||||
USING: browser.parser ;
|
||||
IN: browser.utils
|
||||
IN: http.parser.utils
|
||||
|
||||
: string-parse-end?
|
||||
get-next not ;
|
Loading…
Reference in New Issue