Paste: power-mezz
Author: | jm |
Mode: | rebol |
Date: | Fri, 29 Apr 2011 11:01:22 |
Plain Text |
REBOL []
rel: does [ do %html-parser.r ]
---: does [ print "--------------------" ]
do %power-mezz/mezz/module.r
load-module/from %power-mezz/
module [
Imports: [
%parsers/rule-arguments.r
%parsers/common-rules.r
%mezz/text-encoding.r
%parsers/ml-parser.r
%mezz/collect.r
%mezz/expand-macros.r
%mezz/macros/trees.r
%mezz/trees.r
%mezz/niwashi.r
%mezz/load-html.r
]
] [
p: {<html><title>t</title><body><h2>HEADING</h2><p>first para</p><p>second para</p></body></html>}
print HM: mold H: load-html p
---
print H/4/2/1/1
---
print H/4/2/1/2
]
halt
=prints=============================
[root none [] [html [...] [] [head [...] [] [title [...] [] [text [...] [value "t"]]]] [body [...] [] [h2 [...] [] [text [...] [value "HEADING"]
]] [p [...] [] [text [...] [value "first para"]]] [p [...] [] [text [...] [value "second para"]]]]]]
--------------------
html
--------------------
** Internal Error: Stack overflow
** Where: module
** Near: print H/4/2/1/2
Author: | JM |
Mode: | rebol |
Date: | Fri, 29 Apr 2011 11:08:25 |
Plain Text |
REBOL []
rel: does [ do %html-parser.r ]
---: does [ print "--------------------" ]
do %power-mezz/mezz/module.r
load-module/from %power-mezz/
module [
Imports: [
%parsers/rule-arguments.r
%parsers/common-rules.r
%mezz/text-encoding.r
%parsers/ml-parser.r
%mezz/collect.r
%mezz/expand-macros.r
%mezz/macros/trees.r
%mezz/trees.r
%mezz/niwashi.r
%mezz/load-html.r
]
] [
p: {<html><title>t</title><body><h2>HEADING</h2><p>first para</p><p>second para</p></body></html>}
print HM: mold H: load-html p
---
print H
]
halt
=prints=======================
[root none [] [html [...] [] [head [...] [] [title [...] [] [text [...] [value "t"]]]] [body [...] [] [h2 [...] [] [text [...] [value "HEADING"]
]] [p [...] [] [text [...] [value "first para"]]] [p [...] [] [text [...] [value "second para"]]]]]]
--------------------
** Internal Error: Stack overflow
** Where: module
** Near: print H
Author: | JM |
Mode: | factor |
Date: | Fri, 29 Apr 2011 11:17:02 |
Plain Text |
REBOL []
rel: does [ do %html-parser.r ]
---: does [ print "--------------------" ]
do %power-mezz/mezz/module.r
load-module/from %power-mezz/
pprint: func [ b tab /local b1 ] [
prin tab print "["
foreach b1 b [
either block? b1
[ pprint b1 join tab " " ]
[ prin tab probe b1 ]
wait 0.05
]
prin tab print "]"
]
module [
Imports: [
%parsers/rule-arguments.r
%parsers/common-rules.r
%mezz/text-encoding.r
%parsers/ml-parser.r
%mezz/collect.r
%mezz/expand-macros.r
%mezz/macros/trees.r
%mezz/trees.r
%mezz/niwashi.r
%mezz/load-html.r
]
] [
p: {<html><title>t</title><body><h2>HEADING</h2><p>first para</p><p>second para</p></body></html>}
print HM: mold H: load-html p
---
pprint H ""
]
halt
==prints=============================
[root none [] [html [...] [] [head [...] [] [title [...] [] [text [...] [value "t"]]]] [body [...] [] [h2 [...] [] [text [...] [value "HEADING"]
]] [p [...] [] [text [...] [value "first para"]]] [p [...] [] [text [...] [value "second para"]]]]]]
--------------------
[
root
none
[
]
[
html
[
[
html
[
[
html
[
[
html
[
[
html
[
[
html
[
[
html
[
[
html
[
[
html
[
[
html
[
[
html
[
[
html
[
[
html
[
[
html
[
[
html
[
New Annotation