Check-in [736ee345be]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Bump version number
Timelines: family | ancestors | descendants | both | trunk | 0.8.1-20181018
Files: files | file ages | folders
SHA1: 736ee345bed609127d8c7a1e000d4ec5bef3fd28
User & Date: bernd 2018-10-18 14:47:29
Context
2018-10-18
15:17
Add xml parser check-in: dae55f513c user: bernd tags: trunk
14:47
Bump version number check-in: 736ee345be user: bernd tags: trunk, 0.8.1-20181018
2018-10-17
22:49
Added xml parser and blogger atom feed schema check-in: c9bbe52f34 user: bernd tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to configure.ac.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.

# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

AC_INIT([net2o], [0.8.0-20181011], [bernd@net2o.de], [net2o], [https://fossil.net2o.de/net2o/reportlist])
AC_PREREQ([2.59])
AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS
LT_INIT

AC_MSG_CHECKING([for gforth])








|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.

# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

AC_INIT([net2o], [0.8.1-20181018], [bernd@net2o.de], [net2o], [https://fossil.net2o.de/net2o/reportlist])
AC_PREREQ([2.59])
AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS
LT_INIT

AC_MSG_CHECKING([for gforth])

Changes to do.

1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

echo "This script builds net2o from scratch"

GFORTH=gforth-0.7.9_20181011

if [ "$(uname -o)" = "Cygwin" ]
then
    CONFOPT="--prefix=/usr $*"
else
    CONFOPT="$*"
fi




|







1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

echo "This script builds net2o from scratch"

GFORTH=gforth-0.7.9_20181018

if [ "$(uname -o)" = "Cygwin" ]
then
    CONFOPT="--prefix=/usr $*"
else
    CONFOPT="$*"
fi

Changes to wiki/commands.md.

1
2
3
4
5
6
7
8
9
10
# Commands #

Version 0.8.0-20181011.

net2o separates data and commands.  Data is passed through to higher
layers, commands are interpreted when they arrive.  For connection
requests, a special bit is set, and the address then isn't used as
address, but as IV for the opportunistic encoding.

The command interpreter is a stack machine with two data types: 64


|







1
2
3
4
5
6
7
8
9
10
# Commands #

Version 0.8.1-20181018.

net2o separates data and commands.  Data is passed through to higher
layers, commands are interpreted when they arrive.  For connection
requests, a special bit is set, and the address then isn't used as
address, but as IV for the opportunistic encoding.

The command interpreter is a stack machine with two data types: 64

Changes to xml/blogger-atom.fs.

26
27
28
29
30
31
32



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

58
59
60
61
62
63
64
    value: feed{}
    object class{ feed-attrs
	$value: xmlns$
	$value: xmlns:blogger$
    }class
    xml-class class{ feed
	$value: id$



	$value: blogger:parent$
	$value: blogger:type$
	$value: blogger:status$
	value: author{}
	xml-class class{ author
	    $value: name$
	    $value: uri$
	    $value: blogger:type$
	}class
	$value: title$
	$value: content$
	object class{ content-attrs
	    $value: type$
	}class
	64value: blogger:created!
	64value: blogger:published!
	64value: blogger:updated!
	value: blogger:location{}
	xml-class class{ blogger:location
	    $value: blogger:name$
	    fvalue: blogger:latitude%
	    fvalue: blogger:longitude%
	    $value: blogger:span$
	}class
	$value: blogger:filename$

    }class
}class

0 [IF]
Local Variables:
forth-local-words:
    (







>
>
>
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
    value: feed{}
    object class{ feed-attrs
	$value: xmlns$
	$value: xmlns:blogger$
    }class
    xml-class class{ feed
	$value: id$
	$value: title$
	value: entry{}
	xml-class class{ entry
	    $value: blogger:parent$
	    $value: blogger:type$
	    $value: blogger:status$
	    value: author{}
	    xml-class class{ author
		$value: name$
		$value: uri$
	    $value: blogger:type$
	    }class
	    $value: title$
	    $value: content$
	    object class{ content-attrs
		$value: type$
	    }class
	    64value: blogger:created!
	    64value: blogger:published!
	    64value: blogger:updated!
	    value: blogger:location{}
	    xml-class class{ blogger:location
		$value: blogger:name$
		fvalue: blogger:latitude%
		fvalue: blogger:longitude%
		$value: blogger:span$
	    }class
	    $value: blogger:filename$
	}class
    }class
}class

0 [IF]
Local Variables:
forth-local-words:
    (

Changes to xml/parser.fs.

67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
...
107
108
109
110
111
112
113

114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140









141
142
143
144
145
146
147
	>o r> to xml:attrs
    ELSE
	xml-throw throw
    THEN
    find-name ?dup-IF
	    also name>int execute
    ELSE  xml-throw throw  THEN
    [: context @ body> name>string ... str=
	IF  previous  ELSE  xml-throw throw  THEN ;] is xml-end-tag ;

: find-string-tag ( addr u nt -- ) tags-match >stack 2drop
    [: 2dup tags-match stack> name>string 1- str= IF
	    key$ $! xml-element$ $@ save-mem json-string!
	ELSE  xml-throw throw  THEN ;] is xml-end-tag ;

................................................................................
    ELSE
	xml-find-tag
    THEN ;

: xml-tag ( addr u -- )
    over c@ '/' = IF
	1 /string xml-end-tag

	end-tags stack> is xml-end-tag
    ELSE
	action-of xml-end-tag end-tags >stack
	xml-start-tag
    THEN ;

: xml-untag ( addr u -- )
    BEGIN  '<' $split dup  WHILE  2swap
	    xml-element$ $free
	    ['] html-unescape xml-element$ $exec
	    '>' $split 2swap xml-tag
    REPEAT  2drop html-unescape ;

: atom-file ( addr u -- )
    2dup open-file throw -rot
    $execstr-ptr @ op-vector @ config-wl { oldstr oldout wl }
    try
	xml-tag$ $execstr-ptr !  $-out
	[: BEGIN  refill  WHILE  source xml-untag  REPEAT ;]
	execute-parsing-named-file
	0 \ throw ball
    restore
	oldstr $execstr-ptr !
	oldout op-vector !
	wl to config-wl
    endtry
    throw ;










0 [IF]
Local Variables:
forth-local-words:
    (
     (("class{") definition-starter (font-lock-keyword-face . 1)
      "[ \t\n]" t name (font-lock-function-name-face . 3))







|







 







>






|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
...
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
	>o r> to xml:attrs
    ELSE
	xml-throw throw
    THEN
    find-name ?dup-IF
	    also name>int execute
    ELSE  xml-throw throw  THEN
    [: context @ body> name>string str=
	IF  previous  ELSE  xml-throw throw  THEN ;] is xml-end-tag ;

: find-string-tag ( addr u nt -- ) tags-match >stack 2drop
    [: 2dup tags-match stack> name>string 1- str= IF
	    key$ $! xml-element$ $@ save-mem json-string!
	ELSE  xml-throw throw  THEN ;] is xml-end-tag ;

................................................................................
    ELSE
	xml-find-tag
    THEN ;

: xml-tag ( addr u -- )
    over c@ '/' = IF
	1 /string xml-end-tag
	xml-element$ $free
	end-tags stack> is xml-end-tag
    ELSE
	action-of xml-end-tag end-tags >stack
	xml-start-tag
    THEN ;

false value in-tag?

: parse-end? ( char -- addr u flag )
    parse 2dup + source + = ;

: xml-<tag ( -- )
    '<' parse-end? >r
    ['] html-unescape xml-element$ $exec
    r> IF  #lf xml-element$ c$+!
    ELSE  true to in-tag?  THEN ;

: xml-tag> ( -- )
    '>' parse-end? >r xml-tag$ $+!
    r> 0= IF
	xml-tag$ $@ xml-tag
	xml-tag$ $free  false to in-tag?
    THEN ;

: xml-untags ( -- )
    BEGIN  in-tag? IF  xml-tag>  ELSE  xml-<tag  THEN
    source nip >in @ = UNTIL ;

: xml-untag ( addr u -- )
    ['] xml-untags execute-parsing ;

: atom-file ( addr u -- )
    false to in-tag?
    2dup r/o open-file throw -rot
    [: BEGIN  refill  WHILE  xml-untags  REPEAT ;]
    execute-parsing-named-file ;

0 [IF]
Local Variables:
forth-local-words:
    (
     (("class{") definition-starter (font-lock-keyword-face . 1)
      "[ \t\n]" t name (font-lock-function-name-face . 3))