Rename extra/browser to extra/http/parser

release
Doug Coleman 2007-11-29 11:18:46 -06:00
parent 31102fc37c
commit d3350bcfdf
6 changed files with 17 additions and 9 deletions

View 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 ;

View File

@ -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? ;

View File

@ -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

View File

@ -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 ;