source: project/release/4/genturfahi/trunk/chicken-ext-peg.scm @ 25672

Last change on this file since 25672 was 25672, checked in by Alan Post, 9 years ago

genturfahi: Add utf8 support.

I call string-ref, which is now o(n) rather than o(1). This needs
to be fixed by splitting the string into a list.

I would like to support UTF8 in my grammar, which will require
rebuilding the bootstrap code, now that I support UTF8 in the
parser.

File size: 3.9 KB
Line 
1;;;;
2;;;; genturfahi - lo la .ckim. ke pe'a jajgau ratcu ke'e genturfa'i
3;;;;            `-> A Scheme packrat parser.
4;;;;
5;;;; Copyright (c) 2010 ".alyn.post." <alyn.post@lodockikumazvati.org>
6;;;;
7;;;; Permission to use, copy, modify, and/or distribute this software for any
8;;;; purpose with or without fee is hereby granted, provided that the above
9;;;; copyright notice and this permission notice appear in all copies.
10;;;;
11;;;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12;;;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13;;;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14;;;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15;;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16;;;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17;;;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18;;;;
19
20(module genturfahi-peg
21  (genturfahi-env
22
23   genturfahi-peg
24   genturfahi-peg-gerna
25
26   ; samselpla
27   samselpla-hash-table
28   samselpla-hash-table*
29
30   samselpla-cmene->symbol
31   samselpla-cmene->symbol*
32
33   samselpla-namorji
34   samselpla-namorji?
35
36   samselpla-smuni
37   samselpla-naselci
38   samselpla-je
39   samselpla-nastura-javni
40   samselpla-pajavni-cmene
41   samselpla-jonai
42   samselpla-.*
43   samselpla-.+
44   samselpla-.kuspe
45   samselpla-?
46   samselpla-*
47   samselpla-+
48   samselpla-kuspe
49   samselpla-&
50   samselpla-fanmo
51   samselpla-!
52   samselpla-cmene-sumti
53   samselpla-selci-naselci
54   samselpla-stura-lerfu-selci
55   samselpla-lerfu-selci
56   samselpla-lerfu-space
57   samselpla-lerfu-linefeed
58   samselpla-lerfu-newline
59   samselpla-lerfu-return
60   samselpla-lerfu-tab
61   samselpla-lerfu-page
62   samselpla-stura-valsi-selci
63   samselpla-valsi-selci
64   samselpla-valsi-newline
65   samselpla-valsi-return
66   samselpla-valsi-tab
67   samselpla-valsi-page
68   samselpla-valsi-backslash
69   samselpla-valsi-single-quote
70   samselpla-valsi-double-quote
71   samselpla-valsi-lerfu
72   samselpla-alnum
73   samselpla-alpha
74   samselpla-ascii
75   samselpla-blank
76   samselpla-cntrl
77   samselpla-digit
78   samselpla-graph
79   samselpla-jbolehu
80   samselpla-jbocahu
81   samselpla-lower
82   samselpla-odigit
83   samselpla-print
84   samselpla-punct
85   samselpla-space
86   samselpla-upper
87   samselpla-xdigit
88   samselpla-^alnum
89   samselpla-^alpha
90   samselpla-^ascii
91   samselpla-^blank
92   samselpla-^cntrl
93   samselpla-^digit
94   samselpla-^graph
95   samselpla-^lower
96   samselpla-^odigit
97   samselpla-^print
98   samselpla-^punct
99   samselpla-^space
100   samselpla-^upper
101   samselpla-^xdigit
102   samselpla-klesi-newline
103   samselpla-klesi-return
104   samselpla-klesi-tab
105   samselpla-klesi-page
106   samselpla-klesi-lbracket
107   samselpla-klesi-rbracket
108   samselpla-klesi-backslash
109   samselpla-klesi-selci
110   samselpla-klesi-selci-*
111   samselpla-klesi-selci-+
112   samselpla-klesi-selci-kuspe
113   samselpla-denpabu
114   samselpla-samselpla-xadni
115   samselpla-samselpla-cmene
116   samselpla-samselpla-balvi
117   samselpla-samselpla-cabna
118   samselpla-stura-empty-string
119   samselpla-empty-string
120   samselpla-empty-list
121   samselpla-girzu-javni)
122
123(import chicken)
124(import scheme)
125
126(include "chicken-declare.scm")
127
128(require-extension utf8)
129
130(require-extension srfi-1)
131(require-extension utf8-srfi-13)
132(require-extension utf8-srfi-14)
133(require-extension srfi-69)
134(require-extension ports)
135;(require-library extras)
136(require-library matchable)
137(require-library sandbox)
138(require-library genturfahi)
139
140(import utf8)
141(import srfi-1)          ; unzip2
142(import utf8-srfi-13)    ; string-append, string-copy
143(import utf8-srfi-14)    ; character set library
144(import srfi-69)         ; basic hash tables
145(import ports)           ; Chicken Scheme srfi-6 and port extensions
146;(import extras)         ; pretty-print, for debugging
147(import matchable)
148(import sandbox)
149(import genturfahi)
150
151(include "eval.scm")
152(include "samselpla.scm")
153(include "bootstrap.scm")
154(include "peg.scm"))
Note: See TracBrowser for help on using the repository browser.