Compare commits

...

363 commits

Author SHA1 Message Date
e6d3846dbf Split 'xo-reflectutil/' into commit '14cad16f1d'
git-subtree-dir: xo-reflectutil
git-subtree-mainline: b7a01660469ea5631d38f1e708919288d38c5662
git-subtree-split: 14cad16f1d
2026-05-30 17:35:21 -04:00
14cad16f1d Split 'xo-reader2/' into commit 'b7357fdbf1'
git-subtree-dir: xo-reader2
git-subtree-mainline: 46d112c7edf2f480eb586788b2ad4d5f8bda83c7
git-subtree-split: b7357fdbf1
2026-05-30 17:13:40 -04:00
b7357fdbf1 Split 'xo-expression2/' into commit '132be039de'
git-subtree-dir: xo-expression2
git-subtree-mainline: e75422e2190be7d1da35674835e70175907b33c8
git-subtree-split: 132be039de
2026-05-30 14:12:49 -04:00
f2b9a2b909 Split 'xo-expression2/' into commit '132be039de'
git-subtree-dir: xo-expression2
git-subtree-mainline: e75422e2190be7d1da35674835e70175907b33c8
git-subtree-split: 132be039de
2026-05-30 14:12:49 -04:00
87d6b75b39 Split 'xo-tokenizer2/' into commit '48a082cb6b'
git-subtree-dir: xo-tokenizer2
git-subtree-mainline: d684e7408a95b3c5ecf4096413fe143f221bd4e3
git-subtree-split: 48a082cb6b
2026-05-30 12:58:57 -04:00
132be039de Split 'xo-tokenizer2/' into commit '48a082cb6b'
git-subtree-dir: xo-tokenizer2
git-subtree-mainline: d684e7408a95b3c5ecf4096413fe143f221bd4e3
git-subtree-split: 48a082cb6b
2026-05-30 12:58:57 -04:00
a6fbb5dde6 Split 'xo-tokenizer2/' into commit '48a082cb6b'
git-subtree-dir: xo-tokenizer2
git-subtree-mainline: d684e7408a95b3c5ecf4096413fe143f221bd4e3
git-subtree-split: 48a082cb6b
2026-05-30 12:58:57 -04:00
250e6f0502 Split 'xo-alloc/' into commit 'a2b678410d'
git-subtree-dir: xo-alloc
git-subtree-mainline: 5a5f43b56e84f4994f8495960ed688e684b7c067
git-subtree-split: a2b678410d
2026-05-30 12:44:07 -04:00
48a082cb6b Split 'xo-alloc/' into commit 'a2b678410d'
git-subtree-dir: xo-alloc
git-subtree-mainline: 5a5f43b56e84f4994f8495960ed688e684b7c067
git-subtree-split: a2b678410d
2026-05-30 12:44:07 -04:00
7cf23f246b Split 'xo-alloc/' into commit 'a2b678410d'
git-subtree-dir: xo-alloc
git-subtree-mainline: 5a5f43b56e84f4994f8495960ed688e684b7c067
git-subtree-split: a2b678410d
2026-05-30 12:44:07 -04:00
7f4ffef585 Split 'xo-alloc/' into commit 'a2b678410d'
git-subtree-dir: xo-alloc
git-subtree-mainline: 5a5f43b56e84f4994f8495960ed688e684b7c067
git-subtree-split: a2b678410d
2026-05-30 12:44:07 -04:00
6fcee73ae1 Split 'xo-numeric/' into commit '7750c868b6'
git-subtree-dir: xo-numeric
git-subtree-mainline: 365f5a055f80e5138abc8d55c556600e032ce1dd
git-subtree-split: 7750c868b6
2026-05-30 12:11:31 -04:00
a2b678410d Split 'xo-numeric/' into commit '7750c868b6'
git-subtree-dir: xo-numeric
git-subtree-mainline: 365f5a055f80e5138abc8d55c556600e032ce1dd
git-subtree-split: 7750c868b6
2026-05-30 12:11:31 -04:00
2aa50b22bb Split 'xo-numeric/' into commit '7750c868b6'
git-subtree-dir: xo-numeric
git-subtree-mainline: 365f5a055f80e5138abc8d55c556600e032ce1dd
git-subtree-split: 7750c868b6
2026-05-30 12:11:31 -04:00
a56ea8894e Split 'xo-numeric/' into commit '7750c868b6'
git-subtree-dir: xo-numeric
git-subtree-mainline: 365f5a055f80e5138abc8d55c556600e032ce1dd
git-subtree-split: 7750c868b6
2026-05-30 12:11:31 -04:00
a6f8c3d3e3 Split 'xo-numeric/' into commit '5f2de0ad5a'
git-subtree-dir: xo-numeric
git-subtree-mainline: 8888986784c73c417110df62254ff958c83200d8
git-subtree-split: 5f2de0ad5a
2026-05-30 12:07:21 -04:00
a30f52375b Split 'xo-numeric/' into commit '5f2de0ad5a'
git-subtree-dir: xo-numeric
git-subtree-mainline: 8888986784c73c417110df62254ff958c83200d8
git-subtree-split: 5f2de0ad5a
2026-05-30 12:07:21 -04:00
f3205bdc4b Split 'xo-numeric/' into commit '5f2de0ad5a'
git-subtree-dir: xo-numeric
git-subtree-mainline: 8888986784c73c417110df62254ff958c83200d8
git-subtree-split: 5f2de0ad5a
2026-05-30 12:07:21 -04:00
0018f23a7e Split 'xo-numeric/' into commit '5f2de0ad5a'
git-subtree-dir: xo-numeric
git-subtree-mainline: 8888986784c73c417110df62254ff958c83200d8
git-subtree-split: 5f2de0ad5a
2026-05-30 12:07:21 -04:00
adba8536d9 xo-gc stack: fix mutation setup + xo-reader2 utest 2026-05-07 23:44:32 -04:00
6068da02af tidy: drop stale ACollector comments 2026-05-02 13:58:22 -04:00
2713050d84 xo-gc stack: refactor + streamline.
Retiring unused Collector typealiases.
Fix #include topology.
Fix/improve write barrier setup.
2026-05-02 13:49:29 -04:00
866b6a55e2 xo-object2: streamline write barriers for DList,DArray muts 2026-05-01 20:38:38 -04:00
3d24a523f3 refactor focusing on xo-alloc2/ xo-gc/ write-barrier
ability to inform allocator of gco->gco mutation, via AAllocator i/face.
2026-05-01 19:54:26 -04:00
df32ec55c8 xo-object2: obj<ACollector> argument to DArray::push_back() 2026-04-28 23:17:00 -04:00
32fea42633 xo-gc: bugfixes for GCObjectStore, unit test exapnded
In particular: drop casual assignment to DList.rest_,
will break acyclic assumption of DList.size()
2026-04-11 16:51:52 -04:00
d14f119a37 xo-interpreter2 stack: + reason arg to visit_gco_children()
Helps streamline DX1Collector in xo-gc/.
Want both forward and verify entry points for the same
representation.
2026-04-10 01:10:03 -04:00
31df51ac8e refactor: use GCObjectVisitor api w/ gco_shallow_move 2026-04-06 15:21:48 -04:00
0bc037f1ea refactor: make shallow_move() available from AGCObjectVisitor 2026-04-06 00:11:08 -04:00
d740c94406 refactor: + narrower interface for gc pointer forwarding
add AGCObjectVisitor, instead of requiring ACollector.
2026-04-05 23:53:02 -04:00
bf8c3628ff refactor: retire GCObject.shallow_copy()
Collector gets this info from gc-owned object header
2026-04-04 18:01:25 -04:00
1f91e2afdc refactor: retire GCObject.shallow_size()
Not needed.  Rely on size stored in gc-owned object header
2026-04-04 17:30:03 -04:00
6251b2bde7 refactor: void return type for Collector.forward_children() 2026-04-04 16:54:46 -04:00
63bdd59fc3 refactor: rename RCollector.std_copy_for -> std_move_for 2026-04-04 16:37:17 -04:00
0898733029 refactor: rename shallow_copy -> shallow_move + streamline
Use RCollector.std_copy_for where appropriate
2026-04-04 16:33:35 -04:00
73b2561aa8 refactor: rename GCObject.shallow_copy -> shallow_move
resolve conflict since relying on move constructor in std_copy_for
2026-04-04 15:00:53 -04:00
7e575e6214 refactor: make AGCObject.shallow_copy() non-const
prep for moving to ACollector interface
2026-04-04 14:38:14 -04:00
77efd433ad xo-gc stack: + request-gc-statistics() primitive
1. xo-gc now depends on xo-object2.
2. use genfacet for ICollector_DX1Collector
3. moves xo-gc utest previously in xo-object2 to more natural
   location in xo-gc/
2026-03-29 13:44:19 -04:00
1d7339f694 xo-reader2: utest: parser utests verify full GC behavior also 2026-03-28 13:59:14 -04:00
c982a2241e xo-reader2: retire some ParserStateMachine logging 2026-03-28 13:58:46 -04:00
ce800d700c xo-reader2: expand utest to run gc [WIP] 2026-03-28 09:43:43 -04:00
c715f0d8be xo-reader2: utest: drop DX1Collector debug 2026-03-27 22:40:44 -04:00
ff471bbc72 xo-interpreter2 stack: wrap TokenizerError as DRuntimeError
Also fix _read_eval_print() to report them!
2026-03-27 11:16:28 -04:00
af96e82c21 xo-gc: generation -> Generation + bugfix idle test 2026-03-26 11:30:16 -04:00
3806b46ea1 xo-interpreter2 stack: VSM as AGCObject for virtual root 2026-03-25 19:31:59 -04:00
d76622640e Merge branch 'claude1' of github.com:rconybea/xo-umbrella2 into claude1 2026-03-25 18:01:06 -04:00
f8839278c3 xo-interpreter2 stack: scaffold for virtual root VSM [WIP] 2026-03-25 18:00:36 -04:00
7be5869c93 xo-reader2 stack: constants for operator primitive names 2026-03-25 17:52:39 -04:00
f0d4e58010 xo-reader2 stack: refactor for ssm file location 2026-03-25 17:11:46 -04:00
aca798467a xo-reader2: move DDefineSsm generated support to spec'd subdirs 2026-03-24 23:41:05 -04:00
1d3af64a7a xo-tokenizer2: + op!= utest 2026-03-24 23:32:09 -04:00
8331fa8a6b xo-tokenizer2: + op!= utest 2026-03-24 23:32:09 -04:00
0972cdada3 xo-reader2: + gcobject facet includes for DSchematikaParser 2026-03-24 22:18:37 -04:00
4304892a7c xo-reader2: adopt DSchematikaParser as gc-aware object
Use as virtual GC root.
2026-03-24 22:15:08 -04:00
48d5c323b4 xo-reader2 stack: + ARuntimeContext.collector()
access Collector API (if present) from runtime context
2026-03-24 21:59:59 -04:00
3af72fec64 xo-reader2: + SyntaxStateMachine.forward_children method
Support gc traversal with goal of making ParserStateMachine a gc root
2026-03-24 17:43:45 -04:00
ed3e26e718 nix: use clang-tools (for emacs+lsp) 2026-03-24 17:35:26 -04:00
25fd378c78 xo-reader2: #q supports literal dictionaries 2026-03-17 21:04:08 -04:00
90c4819ef9 delete unused typo file 2026-03-17 21:02:37 -04:00
f4514fc667 xo-reader2: refactor: move ExpectFormalArgSsm support -> subdir 2026-03-17 12:57:41 -04:00
ed3b5bfb4e xo-reader2: bugfix: ParenSsm include paths 2026-03-17 12:50:22 -04:00
a3a5311250 xo-reader2: bugfix genfacet paths + move DParenSsm 2026-03-17 12:49:35 -04:00
f4532235c0 xo-reader2: streamline setup 2026-03-16 19:21:09 -05:00
14bcd9dec6 xo-interpreter2 stack: use RuntimeContext to streamline setup 2026-03-16 14:09:03 -05:00
956a64df5c xo-interpreter2 stack: + dict type + pop more pm types 2026-03-16 09:03:24 -05:00
7b8e864668 xo-interpreter2 stack: + stringtable() in RuntimeContext api 2026-03-16 01:27:25 -05:00
e67117c815 xo-interpreter2 stack: modularize nth() primitive setup/install 2026-03-15 09:47:14 -05:00
4c9771126b xo-reader2: + op> support 2026-03-13 00:15:29 -05:00
4e7b58e3c9 xo-reader2: + op>= support 2026-03-12 23:41:21 -05:00
6104515656 xo-reader2: + op>= support 2026-03-12 23:41:21 -05:00
41f704f7ab xo-reader2 stack: support op<= 2026-03-12 21:08:58 -05:00
417ad2ac78 xo-reader2 stack: support op<= 2026-03-12 21:08:58 -05:00
8fda8c8f14 xo-reader2 stack: + op<= setup 2026-03-12 21:00:16 -05:00
88bf0475ec xo-reader2: bugfix: gather inputs before pop 2026-03-12 20:40:35 -05:00
6acad26111 xo-reader2: drop debug 2026-03-12 20:40:04 -05:00
e6cf751083 xo-reader2: globalenv setup 2026-03-12 20:39:05 -05:00
ccc9968686 xo-reader2: drop some debug 2026-03-12 20:38:36 -05:00
b2073f832b xo-reader2: + parser utest, different precedence order 2026-03-12 20:38:09 -05:00
3dc6268dfe xo-interpreter2 stack: refactor + bugfix operator expr 2026-03-12 20:26:08 -05:00
6f95f38373 xo-interpreter2: + nil + cons 2026-03-11 16:19:40 -05:00
cc42c98928 xo-interpreter2: + nil + cons 2026-03-11 16:19:40 -05:00
31c32cbca7 xo-interpreter2 stack: + nth() primitive 2026-03-11 15:40:38 -05:00
caa8e31d02 xo-reader2: parse list types + utest 2026-03-11 14:13:48 -05:00
46637ec16a xo-reader2: parse list types + utest 2026-03-11 14:13:48 -05:00
6a0333765a xo-reader2: refactor: move apply genfacet to subdirs 2026-03-11 10:42:42 -05:00
af978694ac xo-reader2: refactor: move deftype impl to deftype/ subdir 2026-03-11 10:32:31 -05:00
309af002d2 xo-reader2: refactor: move Lambda genfacet files to subdirs 2026-03-11 10:27:04 -05:00
afe34f1d8a xo-reader2: refactor: generated file locn for IfElseSsm 2026-03-11 10:21:17 -05:00
8bb36ae3e0 xo-reader2: tidy CMakeLists.txt 2026-03-11 10:06:59 -05:00
aaf3f25347 build: retire FACET argument to genfacetimpl 2026-03-11 10:03:46 -05:00
a7dcf260d1 build: retiring REPR argument to xo_add_genfacetimpl() 2026-03-11 08:41:57 -05:00
458fd04ca2 xo-reader2 stack: expand symbol table to store typedefs
+ typedef utest
+ misc qol policy choices
2026-03-11 07:49:14 -05:00
76af3ff3b5 xo-reader2 stack: expand symbol table to store typedefs
+ typedef utest
+ misc qol policy choices
2026-03-11 07:49:14 -05:00
07b7a7c978 xo-reader2: scaffold for using obj<AType> for types [WIP] 2026-03-07 11:43:47 +11:00
a0fdfa2d90 xo-interpreter2 stack: refactor: string clases -> xo-stringtable2/ 2026-03-05 13:02:12 +11:00
b96cf33a21 refactor: + xo-stringtable2 w/ DString impl 2026-03-05 00:50:58 +11:00
b544a39993 xo-gc xo-alloc2: move Collector faceet gc/ -> alloc2/ for levelling 2026-03-04 22:26:31 +11:00
74642dfcfa xo-interpreter2 stack: + literal array parsing 2026-03-03 12:12:09 +11:00
680416d077 xo-interpreter2 stack: + literal array parsing 2026-03-03 12:12:09 +11:00
f2a9aa3f52 xo-interpreter2 stack: parse literal lists (w/ implicit types) 2026-03-02 23:21:10 +11:00
650a9fa95f xo-interpreter2 stack: handle operator expressions w/ qliterals 2026-03-02 11:05:12 +11:00
906bb2a913 xo-interpreter2 stack: handle operator expressions w/ qliterals 2026-03-02 11:05:12 +11:00
3f8be97290 xo-reader2: scasffold for on_quoted_literal() 2026-03-01 13:35:52 +11:00
9920812d42 xo-reader2 stack: + #q token + QuoteSsm [WIP - not functional] 2026-03-01 13:06:57 +11:00
7b70296eb1 xo-reader2 stack: + #q token + QuoteSsm [WIP - not functional] 2026-03-01 13:06:57 +11:00
34e863d4ea xo-interpreter2: report_memory_use() unit test 2026-02-28 13:36:27 +11:00
df2c13f395 xo-reader2: + intern_string() forwarding methods in parser/reader 2026-02-28 13:24:06 +11:00
6795c1bc15 xo-reader2: support 0-argument apply-expressions 2026-02-28 13:21:54 +11:00
c221a31efe xo-numeric: + less than dispatch (also in schematika parser) 2026-02-27 22:55:14 +11:00
df87f1b313 Merge branch 'main' into claude1 2026-02-27 22:07:46 +11:00
04076ea983 osx build: #include <exception> in _Any.cpp 2026-02-27 19:41:03 +11:00
1d6f1c22ea xo-cmake: setup to make share target available via cmake install 2026-02-27 19:38:53 +11:00
dffaf7fa16 xo-cmake: setup to make share target available via cmake install 2026-02-27 19:38:53 +11:00
6d039c03e6 xo-cmake: setup to make share target available via cmake install 2026-02-27 19:38:53 +11:00
f83af2fd3e xo-cmake: setup to make share target available via cmake install 2026-02-27 19:38:53 +11:00
fe9ae63892 xo-alloc: fix broken cmake export deps 2026-02-27 11:34:18 +11:00
a1e5449d5a xo-alloc: nix requires specific include path 2026-02-27 11:33:40 +11:00
caa03566da xo-alloc: nix-build + compiler nits 2026-02-26 12:20:34 +11:00
d6456ce921 xo-reader2: bugfix: need pattern match to fix operator precedence 2026-02-23 07:04:54 +11:00
4fc5f7d8ba xo-interpreter2 stack: support op!= + trial numeric refactor 2026-02-19 11:56:06 -08:00
8743aa44ef xo-interpreter2 stack: streamline op== impl + utests 2026-02-19 09:03:02 -08:00
6575ab1c11 xo-reader2 stack: use NumericDispatch for *,/,+,- ops 2026-02-18 22:40:37 -08:00
dd0857160b xo-interpreter2 stack: use xo-numeric/ to support op* 2026-02-18 22:00:30 -08:00
911818e957 xo-reader2 stack: + xo-numeric + setup multi dispatch for *,/ 2026-02-18 21:47:02 -08:00
9cb3c4b5b6 xo-reader2: recursive top-level function definition works 2026-02-17 18:32:41 -05:00
27c5f66e74 xo-reader2: allow formals w/out explicit type 2026-02-17 16:48:20 -05:00
121fb2dfad xo-interpreter2 stack: define-expr's work at top-level 2026-02-17 14:42:17 -05:00
10db8493f7 xo-reader2: utest with variable reference. Works ! 2026-02-16 23:25:34 -05:00
5c53ae08a8 xo-reader2: streamline facet codegen 2026-02-16 22:48:27 -05:00
221fd85f61 xo-facet: move output-hpp-dir + subdir to idl/*.json5 2026-02-16 22:33:32 -05:00
e72ab34419 xo-expression2: upsert global vars works in DDefineSsm 2026-02-16 19:48:14 -05:00
595dc47dee xo-reader2: bugfix: detecting toplevel for upsert global var 2026-02-16 19:07:37 -05:00
f761a38723 xo-interpreter2 stack: OUTPUT_CPP_DIR cmake->idl/ 2026-02-16 17:46:51 -05:00
9a97bb2680 xo-reader2: refactor: make() + _make() pair for each ssm 2026-02-16 16:50:57 -05:00
da58e18779 xo-reader2: rename DExprSeqState -> DToplevelSeqSsm 2026-02-16 11:15:30 -05:00
5224799479 xo-reader2: bugfix: move toplevel ExprSeqState to parser stack 2026-02-16 11:08:21 -05:00
8a4f1db08d xo-reader2: enable alloc headers for parser stack 2026-02-16 11:03:36 -05:00
66d9bc5cd6 xo-reader2: bugfix: checkpoint before allocating SSMs 2026-02-16 11:03:09 -05:00
ce655ed6bd xo-reader2: code layout - include file spelling 2026-02-16 09:49:11 -05:00
1cab365770 xo-reader2: + convenience headers 2026-02-16 09:45:36 -05:00
3773946705 xo-reader2: use alloc headers in utest for visibility 2026-02-16 09:34:40 -05:00
4724a781a4 xo-reader2: use alloc headers in utest for visibility 2026-02-16 09:34:06 -05:00
6b7533559a xo-reader2: register SchematikaParser type 2026-02-16 09:33:51 -05:00
797970cdea xo-expression2: register DGlobalSymtab type + rename 2026-02-16 09:32:53 -05:00
f655dbb86a xo-expression2 stack: expand MemorySizeInfo w/ per-type detail 2026-02-16 00:48:00 -05:00
65bd5502ff xo-expression2 stack: expand MemorySizeInfo w/ per-type detail 2026-02-16 00:48:00 -05:00
fc9ca649dd xo-reader2 stack: + TypeRegistry 2026-02-15 22:57:15 -05:00
ba7ec387cc xo-reader2 stack: + TypeRegistry 2026-02-15 22:57:15 -05:00
9ce05973f4 xo-reader2 stack: streamline + mem sizing + bugfixes 2026-02-15 16:16:02 -05:00
c0e61744bb xo-interpreter2 stack: mark non-trivial dtors b/c DGlobalSymtab 2026-02-15 14:26:33 -05:00
78f1b8a0b6 xo-interpreter2 stack: plumbing for aux_mm and use opportunistically 2026-02-15 14:13:38 -05:00
fc17a6f856 xo-reader2: drop temporary debug flag 2026-02-15 14:10:47 -05:00
57981d93ef xo-reader2: utest: annotate syntax 2026-02-13 18:13:10 -05:00
91804f1e57 xo-reader2: utest: refactor w/ syntax annotation etc. 2026-02-13 18:11:08 -05:00
955eb6d0c1 xo-reader2: utest: refactor w/ syntax annotation for apply2 utest 2026-02-13 18:06:38 -05:00
5f45f368c0 xo-reader-2: refactor interactive-apply utest 2026-02-13 18:02:55 -05:00
0d74c4f4ab xo-reader2: refactor interactive-if utest to streamline 2026-02-13 17:58:25 -05:00
85883c74e8 xo-reader2: utest: label test in console output 2026-02-13 17:52:06 -05:00
5ac64cbfdb xo-reader2: number token sequence in parser utest 2026-02-13 17:49:57 -05:00
dcb4a8d240 xo-reader2: streamline another utest 2026-02-13 17:43:00 -05:00
9b8e5baf53 xo-reader2: streamline a utest 2026-02-13 17:36:29 -05:00
a759d3c92e xo-reader2: streamline utest 2026-02-13 17:29:49 -05:00
0baa458c5b xo-reader2 stack: handle comparison expression (x == y) 2026-02-13 17:24:23 -05:00
6a52c00b2e xo-reader2 stack: handle comparison expression (x == y) 2026-02-13 17:24:23 -05:00
3afe93b6c4 xo-reader2 utest: less boilerplate! 2026-02-12 15:21:35 -05:00
3a516e2866 xo-reader2: handle multiple args in apply + streamlined utest 2026-02-12 00:43:46 -05:00
9c677b28cc xo-reader2: utest for top-level apply passes 2026-02-12 00:06:50 -05:00
a15abd8b43 xo-reader2: apply expr now parses up to rightparen 2026-02-12 00:02:56 -05:00
e0ab3c5927 xo-reader2: more work on apply expressions [WIP] 2026-02-11 20:25:24 -05:00
65d1fd840b xo-reader2: progress+apply works up to lparen introducing formals 2026-02-11 18:07:55 -05:00
40e1fb531d xo-reader2: DApplySsm for apply expressions [WIP] 2026-02-11 16:02:41 -05:00
4744139d74 xo-reader2 stack: progress towards recognizing function calls [WIP] 2026-02-10 23:28:20 -05:00
d65eb54102 xo-reader2 stack: parenthesized expressions [WIP] 2026-02-10 15:14:40 -05:00
ca1370570b xo-reader2 stack: top-level lambda w/ apply parses 2026-02-05 15:45:40 -05:00
4cd4328f07 xo-interpreter2 stack: work on variable references [WIP] 2026-02-05 10:44:11 -05:00
2aa6dfd942 xo-reader2 xo-expression2: streamline pretty w/ presence flag 2026-02-04 10:32:16 -05:00
0e043f56a4 xo-reader2 stack: streamlining + arith parser test 2026-02-03 14:27:42 -05:00
bdccad4087 xo-reader2 stack: convenience #includes + parsing examples 2026-02-03 13:43:00 -05:00
574185ccdf xo-reader2 stack: misc qol improvements + improve reader2 utest 2026-02-03 13:23:38 -05:00
6621d3900e xo-interpreter2 stack: bugfix: top-level i64 token -> DInteger 2026-02-03 12:58:55 -05:00
d895083b58 xo-interpreter2 stack: cleanup memory reporting 2026-02-03 11:55:50 -05:00
3f19001c94 xo-reader2 stack: curate memory pool naming 2026-02-03 10:32:43 -05:00
3f5bd39ed8 xo-interpreter2 .. xo-arena. memory pool introspection 2026-02-03 01:05:36 -05:00
d243124ea8 xo-interpreter2 .. xo-arena. memory pool introspection 2026-02-03 01:05:36 -05:00
415a382442 xo-interpreter2: scaffold repl + alloc measurement frameowkr 2026-02-02 21:55:34 -05:00
eec85cc217 xo-interpreter2: scaffold repl + alloc measurement frameowkr 2026-02-02 21:55:34 -05:00
eb929bb693 xo-interpreter2: refactor to setup vsm utest + repl 2026-02-02 10:53:28 -05:00
6b2ebe02ac xo-interpreter2: work towards utest w/ vsm+reader [WIP] 2026-02-01 22:12:28 -05:00
029fc4ae00 xo-reader2 xo-gc: streamline example + DX1Collector.ref() method 2026-02-01 17:26:24 -05:00
939885a7d2 xo-reader2: construct LambdaExpr to complete LambdaSsm + utest 2026-02-01 00:16:37 -05:00
75b9e62c84 xo-reader2: DLambdaSsm work towards producing DLambdaExpr [WIP] 2026-01-31 21:33:39 -05:00
726f821c4e xo-reader2: DLambdaSsm work towards producing DLambdaExpr [WIP] 2026-01-31 21:33:39 -05:00
15f779d2f8 xo-reader2 xo-expression2: + DSequenceSsm ++ utest 2026-01-31 18:28:25 -05:00
334057613e xo-reader2: revert c++23 feature, to keep osx clang build 2026-01-31 01:14:33 -05:00
bcd95502d2 xo-expression2 xo-reader2 DSequenceExpr, DSequenceSsm [WIP] 2026-01-30 20:08:41 -05:00
e7bdcbc125 xo-reader2: simplify DProgressSsm w/ DSyntaxStateMachine 2026-01-30 15:17:28 -05:00
64bc59660b xo-reader2: simplify DExprSeqState w/ DSyntaxStateMachine 2026-01-30 15:01:31 -05:00
ed9733937e xo-reader2: simplify DExpectTypeSsm w/ DSyntaxStateMachine 2026-01-30 14:53:49 -05:00
2fc57b1478 xo-reader2: simplify DSyntaxStateMachine w/ DExpectFormalArglistSsm 2026-01-30 14:33:44 -05:00
4614843864 xo-reader2: simplify DExpectFormalArgSsm using DSyntaxStateMachine 2026-01-30 14:27:32 -05:00
5b21490c68 xo-reader2: simplify DExpectExprSsm w/ DSyntaxStateMachine 2026-01-30 14:21:27 -05:00
a3cb9b6d8d xo-reader2: simplify DDefineSsm w/ DSyntaxStateMachine 2026-01-30 14:11:46 -05:00
9f173949ff xo-reader2: streamline DIfElseSsm w/ DSyntaxStateMachine 2026-01-30 13:49:57 -05:00
ff62b4e568 xo-reader2: streamline DExpectSymbolSsm w/ DSyntaxStateMachine 2026-01-30 13:38:43 -05:00
f6b92e1885 xo-reader2: refactor: crtp to share code across SSM impls 2026-01-30 13:23:44 -05:00
e3006f3266 xo-reader2: + assemble lambda function type in DLambdaSsm 2026-01-30 12:41:09 -05:00
fcf171dfb6 xo-reader2: + assemble lambda function type in DLambdaSsm 2026-01-30 12:41:09 -05:00
900d675caa xo-expression2 xo-reader2: local symtab stack in PSM 2026-01-30 10:26:35 -05:00
f5ccd99dd2 xo-expression2 xo-reader2: local symtab stack in PSM 2026-01-30 10:26:35 -05:00
985e572b21 xo-object2: missed generated (Printable,Array) code + .json5 2026-01-29 15:19:35 -05:00
554c01ffad xo-reader2: + PSM,SSM on_parsed_formal_arglist() 2026-01-29 15:17:57 -05:00
83d210b968 xo-reader2: DExpectFormalArglistSsm parses multiple formals 2026-01-29 13:48:24 -05:00
2f9d49b083 xo-reader2: DExpectFormalArglistSsm parses multiple formals 2026-01-29 13:48:24 -05:00
eaf224bba0 xo-reader2: DExpectFormalArglistSsm handles+stores parsed formals 2026-01-29 13:28:30 -05:00
35a49810e4 xo-reader2: use DUniqueString* to report parsed formal 2026-01-29 12:24:46 -05:00
753b074994 xo-reader2: ssm pretty-printers include .expect_str() output 2026-01-29 10:49:55 -05:00
3e27b8be1e xo-reader2: in DExpectFormalArgSsm handle colon token 2026-01-29 10:35:13 -05:00
6a9d793c74 xo-reader2: lambda ssm progress. incremental [WIP] 2026-01-29 10:16:52 -05:00
724a7f1496 xo-reader2: + DExpectFormalArglistSsm starts DExpectFormalArgSsm 2026-01-28 18:31:10 -05:00
e7d4c4ae28 xo-reader2: + DFormalArgSsm printable facet 2026-01-28 18:04:08 -05:00
0f4e270707 xo-reader2: + DExpectFormalArgSsm [WIP] 2026-01-28 17:40:57 -05:00
66158551c7 xo-reader2: + DExpectFormalArgSsm [WIP] 2026-01-28 17:40:57 -05:00
254d7c179d xo-reader2: + DExpectFormalArglistSsm [WIP] 2026-01-28 15:31:52 -05:00
a28b45e4f2 xo-reader2 xo-expression2: + DLambdaSsm [WIP] 2026-01-28 10:57:55 -05:00
fdf2cc8439 xo-reader2 xo-expression2: + DLambdaSsm [WIP] 2026-01-28 10:57:55 -05:00
f0cd32c05f xo-reader2: support if-then-else expressions. + detailed utest 2026-01-27 15:50:10 -05:00
5357407151 xo-reader2: support if-then-else expressions. + detailed utest 2026-01-27 15:50:10 -05:00
3d7c3f8861 xo-expression2: + DIfElseExpr + utest 2026-01-27 10:09:26 -05:00
bbeaadc9e4 xo-reader2: + DProgressSsm.on_parser_expression_with_semicolon 2026-01-26 22:40:56 -05:00
a346dcc579 xo-reader2: formatting + asserts 2026-01-26 21:36:10 -05:00
d720d89fd2 xo-reflect: + pretty printing for xo::reflect::TypeDescr 2026-01-26 19:26:54 -05:00
774a6ebe22 xo-expression2: + DApplyExpr::make 2026-01-26 15:45:40 -05:00
ce732b3d3a xo-reader2: + missing subsystem deps 2026-01-26 15:45:22 -05:00
6b2ad521f3 xo-expression2: + DConstant utest 2026-01-26 15:33:58 -05:00
c69ce58e15 xo-expression2 xo-procedure2: work on calling primitive for x*y 2026-01-26 13:42:42 -05:00
e283ee0126 xo-procedure2 xo-object2: + polymorphic primitive support 2026-01-26 12:38:17 -05:00
4b4c69cfed xo-reader2: bugfix: prior refactor requires switch remodel on_token 2026-01-25 10:47:28 -05:00
a8df123045 xo-reader2: refactor: push token dispatch to satellite SSMs 2026-01-23 19:01:12 -05:00
4d0c97ab7a xo-reader2: top-level string literal + on_string_token() in SSM 2026-01-23 17:23:19 -05:00
fa6f6defc1 xo-reader2: accept i64 token in top-level interactive session 2026-01-23 16:48:24 -05:00
e7930122a7 xo-reader2: + on_i64_token in all Ssm classes. 2026-01-23 16:45:15 -05:00
b7a813ec07 xo-reader2: fix clearing result in SchematikaReader 2026-01-23 16:34:33 -05:00
e94ec86c03 xo-reader2: + on_bool_token scaffold in parser etc. 2026-01-23 15:25:30 -05:00
bd60b45ae9 xo-reader2: + f64 toplevel constant in interactive session 2026-01-23 15:11:36 -05:00
7432a0bd1d xo-reader2: readerreplxx works + streamline debugging 2026-01-23 14:57:43 -05:00
6894055548 xo-reader2: readerreplxx works + streamline debugging 2026-01-23 14:57:43 -05:00
9044e1d196 xo-reader2: + example app 'readerreplxx' 2026-01-23 11:54:32 -05:00
8f64b05b71 xo-reader2: + example app 'readerreplxx' 2026-01-23 11:54:32 -05:00
5d8f4b4b92 xo-reader2: working on example parser repl 2026-01-22 21:03:40 -05:00
8c038ed669 xo-reader2: working on example parser repl 2026-01-22 21:03:40 -05:00
f6224eefea xo-reader2 xo-expression2: define example working and printing
def foo : f64 = 3.141593;
2026-01-22 18:40:42 -05:00
15e1e50659 xo-reader2: accept parsed expression at top level.. 2026-01-22 17:41:40 -05:00
81dcd2eb71 xo-reader2: + on_parsed_expression_with_semicolon + DefineSsm works 2026-01-22 17:15:05 -05:00
c33cfd7ae7 xo-reader2: + on_parsed_expression_with_semicolon + DefineSsm works 2026-01-22 17:15:05 -05:00
cfff71c4a9 xo-reader2: + SyntaxStateMachine.on_parsed_expression() 2026-01-22 15:49:07 -05:00
07d53f73fe xo-reader2: cosmetic: non-executable content 2026-01-22 15:37:20 -05:00
5239290388 xo-reader2: + on_semicolon_token() method in SyntaxStateMachine 2026-01-22 15:32:12 -05:00
d30412779c xo-reader2: + on_f64_token() + handle in DDefineSsm+DProgressSsm 2026-01-22 15:18:35 -05:00
55149f0890 xo-reader2: + DExpectExprSsm + use from DDefineSsm 2026-01-22 10:54:36 -05:00
124d848a57 xo-reader2: skeleton DExpectExprSsm.* 2026-01-21 18:39:53 -05:00
c60aeda12a xo-reader2: DefineSsm: respond to = token 2026-01-21 17:35:01 -05:00
b738afac9d xo-reader2: scaffold on_singleassign_token() in PSM 2026-01-21 12:59:06 -05:00
a3f5b12955 xo-reader2: scaffold on_singleassign_token() in PSM 2026-01-21 12:59:06 -05:00
7d33440ecb xo-reader2: handle parsed typedescr + use in DDefineSsm 2026-01-21 12:14:35 -05:00
7b62bd7f5c xo-reader2: + DExpectTypeSsm + extend DDefineSsm [WIP] 2026-01-21 01:24:17 -05:00
c87975ab18 xo-reader2: + DExpectTypeSsm [WIP] [NOBUILD] 2026-01-20 22:39:01 -05:00
7fadf9662e xo-reader2: DefineSsm handles colon token after lhs var
example:  def foo : f64 = 3.14;
2026-01-20 22:22:45 -05:00
0d8d928def xo-reader2: DefineSsm handles colon token after lhs var
example:  def foo : f64 = 3.14;
2026-01-20 22:22:45 -05:00
021625d562 xo-reader2: regen ssm facet files + on_colon_token 2026-01-20 22:15:32 -05:00
4c84f8c198 xo-reader2 xo-object2: regenerate facets from idl 2026-01-20 22:13:01 -05:00
eca64875fd xo-reader2 xo-expression2: pprint for DDefineExpr + DVariable 2026-01-20 15:06:58 -05:00
3bdbb61eba xo-reader2: + pretty-printing for ParserResult + use in utest 2026-01-20 12:40:26 -05:00
0a7e8468ae xo-reader2: + IPrintable+DDefineSsm 2026-01-20 01:19:47 -05:00
4e490e6973 xo-reader2: register printable facets 2026-01-20 01:09:56 -05:00
1bca806bf3 xo-reader2: + IPrintable+DExpectSymbolSsm 2026-01-20 01:07:21 -05:00
a836c72a72 xo-reader2: + IPrintable+DExprSeqState 2026-01-20 00:57:34 -05:00
6e7524a730 xo-reader2: intern for DDefineExpr lhs symbol 2026-01-20 00:08:51 -05:00
9ab828059b xo-reader2: + StringTable in ParserStringTable 2026-01-19 23:38:14 -05:00
535f48e202 xo-reader2: bugfix in DDefineExpr 2026-01-19 23:18:30 -05:00
19b6caa89d xo-reader2 xo-expresion2: work on define-expressions [WIP] 2026-01-19 21:25:30 -05:00
844b1519ef xo-reader2: register DDefineSsm + DExpectSymbolSsm facets 2026-01-19 11:33:27 -05:00
9d4b50ede4 xo-tokenizer2: cosmetic / minor 2026-01-19 11:33:14 -05:00
284ed02de6 xo-reader2: + ExpectSymbolSsm + SyntaxStateMachine.on_parsed_symbol 2026-01-19 11:32:39 -05:00
e3be7ed2de xo-reader: + DDefineSsm + utest 2026-01-19 00:39:16 -05:00
b5d2f3efab xo-reader: + DDefineSsm + utest 2026-01-19 00:39:16 -05:00
301a7c7623 xo-reader2: + DDefineSsm + utest 2026-01-19 00:38:43 -05:00
e38b61ce76 xo-reader2: ParserStateMachine w/ separate allocator 2026-01-18 20:37:15 -05:00
a8eb35bd1a xo-reader2: corrections to toplevel SchematikaParser setup 2026-01-18 20:23:00 -05:00
0aa1692f8c xo-result2: + SchematikaParser 2026-01-18 19:25:43 -05:00
a96196b365 xo-reader2: + init_reader2 + reader2_register_types 2026-01-18 19:09:48 -05:00
3198e30234 xo-reader2: + regression2_register_facets() 2026-01-18 18:57:33 -05:00
f25d1fb738 xo-reader2 scaffold (fomo+arena version of xo-reader/) [WIP] 2026-01-18 17:59:46 -05:00
7ee57309b5 xo-reader2 scaffold (fomo+arena version of xo-reader/) [WIP] 2026-01-18 17:59:46 -05:00
a7ed10c16a xo-tokenizer: example tokenrepl restored to wokring order
Now with CBufferedInput in Tokenizer
2026-01-11 19:10:42 -05:00
1575f8a147 xo-tokenizer2: use xo-arena DCircularBuffer to buffer input line 2026-01-11 18:42:08 -05:00
185519a22e + xo-tokenizer2 xo-reader2 xo-expression2 xo-interpreter2
2nd gen schematika interpreter using fomo
2026-01-10 12:39:09 -05:00
b9921d4108 + xo-tokenizer2 xo-reader2 xo-expression2 xo-interpreter2
2nd gen schematika interpreter using fomo
2026-01-10 12:39:09 -05:00
412697bbb8 refactor: move xo::facet::typeseq to xo-reflectutil/
prep for adding xo-arena/
2026-01-05 21:49:33 -05:00
05ab69384a xo-alloc2: work on fomo Arena 2025-12-11 11:14:46 -05:00
7b5198be08 xo-ordinaltree: work on gp<String>-key unit test 2025-12-06 19:42:36 -05:00
1b93c9a427 xo-ordinaltree: start work on gc-aware Key,Value in rbtree 2025-12-05 19:54:00 -05:00
bd8ca68e7c xo-ordinaltree: expand unittest + debug logging 2025-12-05 18:38:29 -05:00
b6ccde3ddc xo-alloc: check_write_barrier to verify mutation log 2025-12-05 10:00:36 -05:00
40281c4e0a xo-ordinaltree: rbtree ops satisfy gc write barriers 2025-12-04 23:38:56 -05:00
e8d755252a xo-alloc: provide default Object::display() method
So we can remove from FallbackObjectInterface and IObject
2025-12-04 21:44:22 -05:00
bd0b1b1f71 xo-alloc/xo-ordinaltree: refactor rbtree Node alloc
progress toward careful gc-aware assignment
2025-12-04 21:31:55 -05:00
676a9d0d62 xo-alloc: + comments on design 2025-12-04 17:29:27 -05:00
e4a4e0dc87 xo-alloc: + static_asserts in GC root helpers 2025-12-04 17:28:59 -05:00
3c3709ba15 xo-alloc / xo-ordinaltree: + concepts + allocator-aware 2025-12-03 15:36:59 -05:00
1a8771dc5d xo-alloc: + utest vector w/ custom allocator 2025-12-03 10:22:52 -05:00
67cf4cc625 xo-alloc: utest: revert allocator changes in nested type 2025-12-03 00:14:38 -05:00
eee54530ff fix unit tests to build on osx / clang16 2025-12-03 00:14:09 -05:00
146b730447 fix unit tests to build on osx / clang16 2025-12-03 00:14:09 -05:00
43d79d7809 Gc.test.cpp expansion. Not working yet 2025-12-02 21:47:34 -05:00
764e98e12e xo-alloc: UT for allocator interation + misc improvements 2025-12-02 17:07:19 -05:00
77f84cabbb xo-alloc / xo-ordinaltree: work on dual-alloc-policy trees 2025-12-02 10:37:07 -05:00
fd6bdd93c3 xo-ordinaltree: GC test [wip] 2025-12-01 22:25:41 -05:00
b32b9151da xo-alloc xo-ordinaltree: GC option work in progress 2025-12-01 14:22:41 -05:00
30a00be262 xo-alloc + xo-allocutil: refactor to shrink dep surface area 2025-12-01 01:20:49 -05:00
5e3df1c783 xo-alloc: + ArenaAllocT unit test 2025-11-29 17:11:53 -05:00
50b0f7698c xo-alloc: + ArenaAllocT for use with std::map() etc. 2025-11-29 16:59:36 -05:00
2febec3c8c xo-alloc, xo-object: fix alloc,gc unit tests after gc improvements 2025-11-29 16:58:44 -05:00
daf729292e xo-interpreter: Object->TaggedPtr conversion (prep for primitives) 2025-11-26 20:15:03 -05:00
e5a72bce36 xo-interpreter: implement variable lookup 2025-11-25 12:43:57 -05:00
5c032834c6 xo-interpreter: handle define-expressions. 2025-11-24 18:01:24 -05:00
66235079a8 xo-alloc: IAlloc* i/face sufficient for Object._forward_children 2025-11-24 12:58:54 -05:00
e10380a792 xo-alloc: utest: fix forwading unit test after upstream refactor 2025-11-24 12:47:44 -05:00
2f2cb735f3 xo-interpreter: refactor for explicit gc::GC* dep 2025-11-24 09:55:43 -05:00
760bb556b2 xo-interpreter/xo-alloc: GlobalEnv + mm -> shallow_copy() 2025-11-23 22:57:52 -05:00
eec5bc0981 xo-interpreter: + toplevel env in VSM 2025-11-23 21:41:14 -05:00
40128c423c xo-alloc: bugfix expand: limit_ is soft, hi_ is hard. + docs 2025-11-23 11:35:05 -05:00
54dbbf6944 xo-tokenizer: streamline error path during tokenization 2025-11-22 23:06:51 -05:00
dd41635a56 xo-tokenizer: refactor to correct accounting for line/consume/errpos 2025-11-22 20:13:33 -05:00
2c21eede1f xo-interpreter: setting up for gc in interactive interpreter 2025-11-20 21:26:18 -05:00
f3887debca xo-alloc / xo-refcnt: feature flags for easy tests. 2025-11-19 12:38:54 -05:00
7b82ace806 xo-interpreter: prep for xo-symboltable 2025-11-17 22:31:10 -05:00
78c6c5cde9 xo-interpreter CVector for StackFrame reflection + OSX imgui edits 2025-11-17 10:41:35 -05:00
b4c89d8624 xo-interpreter adds + explict mm arg to ctors (retiring Object::mm) 2025-11-16 20:10:23 -05:00
1c97e2aa93 xo-alloc: utest: fix broken alloc utests 2025-11-15 16:38:18 -05:00
954921c641 xo-alloc: doc improvements 2025-11-15 12:25:03 -05:00
f46c1d613e xo-imgui: clang compiler nits 2025-08-29 19:33:09 -04:00
6c7b13e443 xo-alloc: try to make commit happen at start of GC cycle 2025-08-26 13:36:18 -04:00
a956320470 xo-imgui: ex: display both from+to spaces + refactor&streamline 2025-08-25 16:09:18 -04:00
4c824edbe4 xo-imgui: ex2: + average efficiency + plot 2025-08-24 17:03:04 -04:00
0a19c8b043 xo-alloc: track GC efficiency 2025-08-23 13:09:59 -04:00
d751093a87 xo-imgui: ex2: animate GC copy step 2025-08-23 10:47:52 -04:00
78195b0218 xo-alloc: + timing stats + timeseries tooltips 2025-08-22 15:10:56 -04:00
df9ad3b855 missed files: xo-alloc/CircularBuffer 2025-08-20 19:53:37 -05:00
8fa254418a xo-alloc: + gc history xo-imgui: gui examples 2025-08-14 09:50:59 -05:00
2ec5072092 xo-alloc: alter GC to use LinearAlloc directly - retire ListAlloc 2025-08-12 13:14:01 -05:00
279a1a040c xo-callback xo-alloc: + GC copy callbacks + unique_ptr cbset support 2025-08-12 12:53:06 -05:00
258555e9eb xo-alloc: GC mutation log works for full GC 2025-08-12 00:16:00 -05:00
d8b3d7a148 xo-alloc: reserve virtual memory, commit pages on demand 2025-08-12 00:14:30 -05:00
a6e4430825 xo-alloc / xo-object: utest coverage + assorted bugfixes 2025-08-07 18:32:14 -05:00
8b622e6999 xo-alloc: retire redline-memory feature 2025-08-06 22:50:29 -05:00
593dc064f9 xo-allod: + per-type stats + pretty printing 2025-08-06 22:34:20 -05:00
227b2e5cf7 xo-alloc xo-object: + Object.self_tp 2025-08-06 14:11:28 -05:00
432e0efce2 xo-object: improve GC unittest + prep to integrate w/ xo::reflect 2025-08-06 13:53:31 -05:00
ff5b0cfb8a xo-alloc xo-object; + utests 2025-08-06 09:32:09 -05:00
fc9180363d xo-object: generative GC utest + reinstate coverage build 2025-08-06 09:30:37 -05:00
19520f017b xo-object: GC unit test 2025-08-05 11:09:26 -05:00
c7488cbfd5 xo-alloc: mutation log tracking in working state + unit test 2025-08-05 11:08:36 -05:00
5f46b51f12 + xo-alloc + xo-object + xo-alloc docs + GC utests 2025-08-03 15:59:38 -05:00
370 changed files with 24699 additions and 9521 deletions

View file

@ -1,8 +1,10 @@
# xo-expression2/CMakeLists.txt
# xo-reader2/CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
project(xo_expression2 VERSION 1.0)
#set(CMAKE_CXX_STANDARD 23)
project(xo_reader2 VERSION 1.0)
enable_language(CXX)
include(GNUInstallDirs)
@ -22,310 +24,376 @@ add_definitions(${PROJECT_CXX_FLAGS})
add_subdirectory(utest)
# note: manual target; generated code committed to git
xo_add_genfacet(
TARGET xo-expression2-facet-symboltable
FACET SymbolTable
INPUT idl/SymbolTable.json5
OUTPUT_HPP_DIR include/xo/expression2
OUTPUT_IMPL_SUBDIR detail
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-symboltable-localsymtab
FACET_PKG xo_expression2
# REPR LocalSymtab
INPUT idl/ISymbolTable_DLocalSymtab.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-gcobject-localsymtab
TARGET xo-reader2-facetimpl-gcobject-schematikaparser
FACET_PKG xo_alloc2
# REPR LocalSymtab
INPUT idl/IGCObject_DLocalSymtab.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-printable-localsymtab
FACET_PKG xo_printable2
# REPR LocalSymtab
INPUT idl/IPrintable_DLocalSymtab.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-symboltable-globalsymtab
FACET_PKG xo_expression2
# REPR GlobalSymtab
INPUT idl/ISymbolTable_DGlobalSymtab.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-gcobject-globalsymtab
FACET_PKG xo_alloc2
# REPR GlobalSymtab
INPUT idl/IGCObject_DGlobalSymtab.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-printable-globalsymtab
FACET_PKG xo_printable2
# REPR GlobalSymtab
INPUT idl/IPrintable_DGlobalSymtab.json5
INPUT idl/IGCObject_DSchematikaParser.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacet(
TARGET xo-expression2-facet-expression
FACET Expression
INPUT idl/Expression.json5
OUTPUT_HPP_DIR include/xo/expression2
OUTPUT_IMPL_SUBDIR detail
TARGET xo-reader2-facet-syntaxstatemachine
FACET SyntaxStateMachine
INPUT idl/SyntaxStateMachine.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-expression-constant
FACET_PKG xo_expression2
# REPR Constant
INPUT idl/IExpression_DConstant.json5
TARGET xo-reader2-facetimpl-syntaxstatemachine-toplevelseqssm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DToplevelSeqSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-gcobject-constant
FACET_PKG xo_alloc2
# REPR Constant
INPUT idl/IGCObject_DConstant.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-printable-constant
TARGET xo-reader2-facetimpl-printable-toplevelseqssm
FACET_PKG xo_printable2
# REPR Constant
INPUT idl/IPrintable_DConstant.json5
INPUT idl/IPrintable_DToplevelSeqSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-expression-variable
FACET_PKG xo_expression2
# REPR Variable
INPUT idl/IExpression_DVariable.json5
TARGET xo-reader2-facetimpl-syntaxstatemachine-definessm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DDefineSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-gcobject-variable
FACET_PKG xo_alloc2
# REPR Variable
INPUT idl/IGCObject_DVariable.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-printable-variable
TARGET xo-reader2-facetimpl-printable-definessm
FACET_PKG xo_printable2
# REPR Variable
INPUT idl/IPrintable_DVariable.json5
INPUT idl/IPrintable_DDefineSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-gcobject-typename
FACET_PKG xo_alloc2
# REPR Typename
INPUT idl/IGCObject_DTypename.json5
TARGET xo-reader2-facetimpl-syntaxstatemachine-deftypessm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DDeftypeSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-printable-typename
TARGET xo-reader2-facetimpl-printable-deftypessm
FACET_PKG xo_printable2
# REPR Typename
INPUT idl/IPrintable_DTypename.json5
INPUT idl/IPrintable_DDeftypeSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-expression-varref
FACET_PKG xo_expression2
# REPR VarRef
INPUT idl/IExpression_DVarRef.json5
TARGET xo-reader2-facetimpl-syntaxstatemachine-lambdassm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DLambdaSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-gcobject-varref
FACET_PKG xo_alloc2
# REPR VarRef
INPUT idl/IGCObject_DVarRef.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-printable-varref
TARGET xo-reader2-facetimpl-printable-lambdassm
FACET_PKG xo_printable2
# REPR VarRef
INPUT idl/IPrintable_DVarRef.json5
INPUT idl/IPrintable_DLambdaSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-expression-defineexpr
FACET_PKG xo_expression2
# REPR DefineExpr
INPUT idl/IExpression_DDefineExpr.json5
TARGET xo-reader2-facetimpl-syntaxstatemachine-parenssm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DParenSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-gcobject-defineexpr
FACET_PKG xo_alloc2
# REPR DefineExpr
INPUT idl/IGCObject_DDefineExpr.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-printable-defineexpr
TARGET xo-reader2-facetimpl-printable-parenssm
FACET_PKG xo_printable2
# REPR DefineExpr
INPUT idl/IPrintable_DDefineExpr.json5
INPUT idl/IPrintable_DParenSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-expression-applyexpr
FACET_PKG xo_expression2
# REPR ApplyExpr
INPUT idl/IExpression_DApplyExpr.json5
TARGET xo-reader2-facetimpl-syntaxstatemachine-expectformalarglistssm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DExpectFormalArglistSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-gcobject-applyexpr
FACET_PKG xo_alloc2
# REPR ApplyExpr
INPUT idl/IGCObject_DApplyExpr.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-printable-applyexpr
TARGET xo-reader2-facetimpl-printable-expectformalarglistssm
FACET_PKG xo_printable2
# REPR ApplyExpr
INPUT idl/IPrintable_DApplyExpr.json5
INPUT idl/IPrintable_DExpectFormalArglistSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-expression-lambdaexpr
FACET_PKG xo_expression2
# REPR LambdaExpr
INPUT idl/IExpression_DLambdaExpr.json5
TARGET xo-reader2-facetimpl-syntaxstatemachine-expectformalargssm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DExpectFormalArgSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-gcobject-lambdaexpr
FACET_PKG xo_alloc2
# REPR LambdaExpr
INPUT idl/IGCObject_DLambdaExpr.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-printable-lambdaexpr
TARGET xo-reader2-facetimpl-printable-expectformalargssm
FACET_PKG xo_printable2
# REPR LambdaExpr
INPUT idl/IPrintable_DLambdaExpr.json5
INPUT idl/IPrintable_DExpectFormalArgSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-expression-ifelseexpr
FACET_PKG xo_expression2
# REPR IfElseExpr
INPUT idl/IExpression_DIfElseExpr.json5
TARGET xo-reader2-facetimpl-syntaxstatemachine-ifelsessm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DIfElseSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-gcobject-ifelseexpr
FACET_PKG xo_alloc2
INPUT idl/IGCObject_DIfElseExpr.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-printable-ifelseexpr
TARGET xo-reader2-facetimpl-printable-ifelsessm
FACET_PKG xo_printable2
INPUT idl/IPrintable_DIfElseExpr.json5
INPUT idl/IPrintable_DIfElseSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-expression-sequenceexpr
FACET_PKG xo_expression2
INPUT idl/IExpression_DSequenceExpr.json5
TARGET xo-reader2-facetimpl-syntaxstatemachine-sequencessm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DSequenceSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-gcobject-sequenceexpr
FACET_PKG xo_alloc2
INPUT idl/IGCObject_DSequenceExpr.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-expression2-facetimpl-printable-sequenceexpr
TARGET xo-reader2-facetimpl-printable-sequencessm
FACET_PKG xo_printable2
INPUT idl/IPrintable_DSequenceExpr.json5
INPUT idl/IPrintable_DSequenceSsm.json5
)
# ----------------------------------------------------------------
xo_add_genfacet_all(xo-expression2-genfacet-all)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-syntaxstatemachine-applyssm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DApplySsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-printable-applyssm
FACET_PKG xo_printable2
INPUT idl/IPrintable_DApplySsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-syntaxstatemachine-expectsymbolssm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DExpectSymbolSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-printable-expectsymbolssm
FACET_PKG xo_printable2
INPUT idl/IPrintable_DExpectSymbolSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-syntaxstatemachine-expecttypessm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DExpectTypeSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-printable-expecttypessm
FACET_PKG xo_printable2
INPUT idl/IPrintable_DExpectTypeSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-syntaxstatemachine-expectlisttypessm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DExpectListTypeSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-printable-expectlisttypessm
FACET_PKG xo_printable2
INPUT idl/IPrintable_DExpectListTypeSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-syntaxstatemachine-expectexprssm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DExpectExprSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-printable-expectexprssm
FACET_PKG xo_printable2
INPUT idl/IPrintable_DExpectExprSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-syntaxstatemachine-progressssm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DProgressSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-printable-progressssm
FACET_PKG xo_printable2
INPUT idl/IPrintable_DProgressSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-syntaxstatemachine-quotessm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DQuoteSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-printable-quotessm
FACET_PKG xo_printable2
INPUT idl/IPrintable_DQuoteSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-syntaxstatemachine-expectqliteralssm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DExpectQLiteralSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-printable-expectqliteralssm
FACET_PKG xo_printable2
INPUT idl/IPrintable_DExpectQLiteralSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-syntaxstatemachine-expectqlistssm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DExpectQListSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-printable-expectqlistssm
FACET_PKG xo_printable2
INPUT idl/IPrintable_DExpectQListSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-syntaxstatemachine-expectqdictssm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DExpectQDictSsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-printable-expectqdictssm
FACET_PKG xo_printable2
INPUT idl/IPrintable_DExpectQDictSsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-syntaxstatemachine-expectqarrayssm
FACET_PKG xo_reader2
INPUT idl/ISyntaxStateMachine_DExpectQArraySsm.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-printable-expectqarrayssm
FACET_PKG xo_printable2
INPUT idl/IPrintable_DExpectQArraySsm.json5
)
# ----------------------------------------------------------------
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-gcobject-globalenv
FACET_PKG xo_alloc2
INPUT idl/IGCObject_DGlobalEnv.json5
)
# note: manual target; generated code committed to git
xo_add_genfacetimpl(
TARGET xo-reader2-facetimpl-printable-globalenv
FACET_PKG xo_printable2
INPUT idl/IPrintable_DGlobalEnv.json5
)
# ----------------------------------------------------------------
xo_add_genfacet_all(xo-reader2-genfacet-all)
# ----------------------------------------------------------------
# shared library
add_subdirectory(src/expression2)
add_subdirectory(src/reader2)
# ----------------------------------------------------------------
# cmake helper (for external xo-expression2 users)
# example programs
add_subdirectory(example)
# ----------------------------------------------------------------
# cmake helper (for external xo-reader2 users)
xo_export_cmake_config(${PROJECT_NAME} ${PROJECT_VERSION} ${PROJECT_NAME}Targets)

21
DESIGN.md Normal file
View file

@ -0,0 +1,21 @@
Uses arena allocators for fast+efficient parsing.
Composition of nested state machines.
## SchematikaParser
Parser to convert schematika text to expressions.
### Details
Partial GCObject facet support, so a SchmeatikaParser instance can
be a gc root.
## SyntaxStateMachine
a state machine dedicated to some particular Schematika syntax.
Examples: if-expression, type declaration, function call
## DToplevelSeqSsm
top-level expression sequence

View file

@ -6,14 +6,13 @@ include(CMakeFindDependencyMacro)
# must coordinate with xo_dependency() calls
# in CMakeLists.txt
#
find_dependency(xo_type)
find_dependency(xo_gc)
find_dependency(reflect)
find_dependency(xo_numeric)
find_dependency(xo_procedure2)
find_dependency(xo_printable2)
find_dependency(xo_flatstring)
find_dependency(cmake)
find_dependency(indentlog)
find_dependency(xo_gc)
find_dependency(xo_type)
find_dependency(xo_tokenizer2)
find_dependency(xo_expression2)
find_dependency(subsys)
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Share.cmake")

6
doc/README.md Normal file
View file

@ -0,0 +1,6 @@
diagram for parsing stack.
stack growing down for nested ssm's
`on_if_token` etc going to same state
`on_parsed_xxx` going back up the stack

3
doc/glossary.rst Normal file
View file

@ -0,0 +1,3 @@
ssm = syntax state machine
psm = parser state machine
ckp = checkpoint

1
example/CMakeLists.txt Normal file
View file

@ -0,0 +1 @@
add_subdirectory(readerreplxx)

View file

@ -0,0 +1,14 @@
# xo-reader2/example/readerreplxx/CMakeLists.txt
set(SELF_EXE xo_reader2_readereplxx)
set(SELF_SRCS readerreplxx.cpp)
if (XO_ENABLE_EXAMPLES)
xo_add_executable(${SELF_EXE} ${SELF_SRCS})
xo_self_dependency(${SELF_EXE} xo_reader2)
xo_external_target_dependency(${SELF_EXE} replxx replxx::replxx)
# replxx requires this
find_package(Threads REQUIRED)
target_link_libraries(${SELF_EXE} PUBLIC Threads::Threads)
endif()

View file

@ -0,0 +1,248 @@
/** @file readerreplxx.cpp **/
#include <xo/reader2/init_reader2.hpp>
#include <xo/reader2/SchematikaReader.hpp>
#include <xo/gc/X1Collector.hpp>
#include <xo/gc/detail/IAllocator_DX1Collector.hpp>
#include <xo/alloc2/Arena.hpp>
#include <xo/alloc2/Allocator.hpp>
#include <xo/printable2/Printable.hpp>
#include <xo/facet/FacetRegistry.hpp>
#include <xo/facet/obj.hpp>
#include <xo/subsys/Subsystem.hpp>
#include <replxx.hxx>
#include <iostream>
#include <unistd.h> // for isatty
// presumeably replxx assumes input is a tty
//
bool replxx_getline(bool interactive,
bool is_at_toplevel,
replxx::Replxx & rx,
const char ** p_input)
{
using namespace std;
char const * prompt = "";
if (interactive) {
prompt = ((is_at_toplevel) ? "> " : ". ");
}
const char * input_cstr = rx.input(prompt);
bool retval = (input_cstr != nullptr);
if (retval)
*p_input = input_cstr;
if (input_cstr)
rx.history_add(input_cstr);
return retval;
}
void
welcome(std::ostream & os)
{
using namespace std;
os << "read-eval-print loop for schematika expressions" << endl;
os << " ctrl-a/ctrl-e beginning/end of line" << endl;
os << " ctrl-u delete entire line" << endl;
os << " ctrl-k delete to end of line" << endl;
os << " meta-<bs> backward delete word" << endl;
os << " <up>|meta-p previous command from history" << endl;
os << " <down>|meta-n next command from history" << endl;
os << " <pgup>/<pgdown> page through history faster" << endl;
os << " ctrl-s/ctrl-r forward/backward history search" << endl;
os << endl;
}
namespace {
using xo::scm::SchematikaReader;
using xo::scm::AExpression;
using xo::print::APrintable;
using xo::print::ppstate_standalone;
using xo::print::ppconfig;
using xo::facet::FacetRegistry;
using xo::facet::obj;
using xo::xtag;
using xo::scope;
using std::cout;
using std::endl;
/** body of read-parse-print loop
*
* true -> no errors;
* false -> reader encountered error
**/
bool
reader_seq(SchematikaReader * p_reader,
SchematikaReader::span_type * p_input,
bool eof,
bool debug_flag)
{
scope log(XO_DEBUG(debug_flag));
if (!p_input || p_input->empty())
return true;
auto [expr, remaining, error] = p_reader->read_expr(*p_input, eof);
obj<APrintable> expr_pr;
if (expr) {
expr_pr = FacetRegistry::instance().variant<APrintable,AExpression>(expr);
assert(expr_pr);
}
if (log) {
if (expr_pr) {
log(xtag("expr", expr_pr));
}
log(xtag("remaining", remaining));
log(xtag("error", error));
}
if (expr) {
ppconfig ppc;
ppstate_standalone pps(&cout, 0, &ppc);
pps.prettyn(expr_pr);
p_reader->reset_result();
*p_input = remaining;
return true;
} else if (error.is_error()) {
cout << "parsing error (detected in " << error.src_function() << "): " << endl;
error.report(cout);
/* discard stashed remainder of input line
* (for nicely-formatted errors)
*/
p_reader->reset_to_idle_toplevel();
return false;
} else {
*p_input = remaining;
/* partial expression or whitespace input, no error */
return true;
}
}
}
struct AppConfig {
using ReaderConfig = xo::scm::ReaderConfig;
using X1CollectorConfig = xo::mm::X1CollectorConfig;
using ArenaConfig = xo::mm::ArenaConfig;
AppConfig() {
rdr_config_.reader_debug_flag_ = true;
//rdr_config.parser_debug_flag_ = true;
//rdr_config.tk_debug_flag_ = true;
}
std::size_t max_history_size_ = 1000;
std::string repl_history_fname_ = "repl_history.txt";;
ReaderConfig rdr_config_;
X1CollectorConfig x1_config_ = (X1CollectorConfig().with_name("gc").with_size(4*1024*1024));
ArenaConfig fixed_config_ = (ArenaConfig().with_name("fixed").with_size(4*1024));
};
struct AppContext {
using AAllocator = xo::mm::AAllocator;
using DX1Collector = xo::mm::DX1Collector;
using X1CollectorConfig = xo::mm::X1CollectorConfig;
using DArena = xo::mm::DArena;
using ArenaConfig = xo::mm::ArenaConfig;
using Replxx = replxx::Replxx;
AppContext(const AppConfig & cfg = AppConfig()) : config_{cfg},
x1_{cfg.x1_config_},
fixed_{cfg.fixed_config_},
rdr_{config_.rdr_config_,
x1_.ref(),
obj<AAllocator,DArena>(&fixed_)}
{
rx_.set_max_history_size(config_.max_history_size_);
rx_.history_load(config_.repl_history_fname_);
// rx.bind_key_internal(Replxx::KEY::control('p'), "history_previous");
// rx.bind_key_internal(Replxx::KEY::control('n'), "history_next");
}
AppConfig config_;
Replxx rx_;
/** collector/allocator for schematika expressions **/
DX1Collector x1_;
/** e.g. for DArenaHashMap within global symtab **/
DArena fixed_;
SchematikaReader rdr_;
};
int
main()
{
using namespace replxx;
using xo::scm::SchematikaReader;
using xo::scm::ReaderConfig;
using xo::mm::AAllocator;
using xo::mm::DX1Collector;
using xo::mm::DArena;
using xo::facet::with_facet;
using xo::facet::obj;
using xo::S_reader2_tag;
using xo::InitSubsys;
using xo::Subsystem;
using xo::scope;
using namespace std;
bool interactive = isatty(STDIN_FILENO);
InitSubsys<S_reader2_tag>::require();
Subsystem::initialize_all();
AppConfig cfg;
AppContext cx(cfg);
constexpr bool c_debug_flag = false;
scope log(XO_DEBUG(c_debug_flag));
using span_type = SchematikaReader::span_type;
welcome(cerr);
cx.rdr_.begin_interactive_session();
bool eof = false;
const char * input_str = nullptr;
span_type input;
while (replxx_getline(interactive, cx.rdr_.is_at_toplevel(), cx.rx_, &input_str)) {
if (input_str && *input_str) {
input = span_type::from_cstr(input_str);
while (!input.empty()
&& reader_seq(&cx.rdr_, &input, false /*eof*/, c_debug_flag))
{
;
}
/* here: either:
* 1. input.empty() or
* 2. error encountered
*/
}
}
/* reminder: eof can complete at most one token */
reader_seq(&cx.rdr_, &input, true /*eof*/, c_debug_flag);
cx.rx_.history_save(cx.config_.repl_history_fname_);
}
/* end readerreplxx.cpp */

View file

@ -1,74 +0,0 @@
{
mode: "facet",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [ "\"TypeRef.hpp\"",
"\"exprtype.hpp\"",
"<xo/reflect/TypeDescr.hpp>"],
// extra includes in Expression.hpp, if any
user_hpp_includes: [],
namespace1: "xo",
namespace2: "scm",
// text after includes, before AExpression
pretext: [ "// {pretext} here" ],
facet: "Expression",
detail_subdir: "detail",
brief: "a schematika expression",
using_doxygen: true,
doc: [
"Representation for executable Schematika expressions"
],
types: [
// using TypeDescr = xo::reflect::TypeDescr;
{
name: "TypeDescr",
doc: ["struct describing a type"],
definition: "xo::reflect::TypeDescr"
},
],
const_methods: [
{
name: "extype",
doc: ["expression type (constant | apply | ..)"],
return_type: "exprtype",
args: [],
const: true,
noexcept: true,
attributes: [],
},
{
name: "typeref",
doc: ["placeholder for type giving possible values for this expression"],
return_type: "TypeRef",
args: [],
const: true,
noexcept: true,
attributes: [],
},
{
name: "valuetype",
doc: ["type giving possible values for this expression. Maybe null before typecheck"],
return_type: "TypeDescr",
args: [],
const: true,
noexcept: true,
attributes: [],
},
],
nonconst_methods: [
{
name: "assign_valuetype",
doc: ["assing to valuetype member. Useful when scaffolding expressions"],
return_type: "void",
args: [
// void assign_valuetype(TypeDescr td)
{type: "TypeDescr", name: "td"},
],
const: false,
noexcept: true,
attributes: [],
}
],
router_facet_explicit_content: [ ],
}

View file

@ -1,15 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [ "\"Expression.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Expression.json5",
brief: "provide AExpression interface for DApplyExpr state",
using_doxygen: true,
repr: "DApplyExpr",
doc: ["doc for IExpression+DApplyExpr" ],
}

View file

@ -1,15 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [ "\"Expression.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Expression.json5",
brief: "provide AExpression interface for DConstant state",
using_doxygen: true,
repr: "DConstant",
doc: ["doc for something or other IExpression+DConstant" ],
}

View file

@ -1,15 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [ "\"Expression.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Expression.json5",
brief: "provide AExpression interface for DDefineExpr state",
using_doxygen: true,
repr: "DDefineExpr",
doc: ["doc for IExpression+DDefineExpr" ],
}

View file

@ -1,15 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [ "\"Expression.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Expression.json5",
brief: "provide AExpression interface for DIfElseExpr state",
using_doxygen: true,
repr: "DIfElseExpr",
doc: ["doc for IExpression+DIfElseExpr" ],
}

View file

@ -1,15 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [ "\"Expression.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Expression.json5",
brief: "provide AExpression interface for DLambdaExpr state",
using_doxygen: true,
repr: "DLambdaExpr",
doc: ["doc for IExpression+DLambdaExpr" ],
}

View file

@ -1,15 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [ "\"Expression.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Expression.json5",
brief: "provide AExpression interface for DSequenceExpr state",
using_doxygen: true,
repr: "DSequenceExpr",
doc: ["doc for something or other IExpression+DSequenceExpr" ],
}

View file

@ -1,15 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [ "\"Expression.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Expression.json5",
brief: "provide AExpression interface for DVarRef state",
using_doxygen: true,
repr: "DVarRef",
doc: ["doc for IExpression+DVarRef" ],
}

View file

@ -1,15 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2/facet",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "variable",
includes: [ "\"Expression.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Expression.json5",
brief: "provide AExpression interface for DVariable state",
using_doxygen: true,
repr: "DVariable",
doc: ["doc for IExpression+DVariable" ],
}

View file

@ -1,18 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [
"<xo/alloc2/GCObject.hpp>",
"<xo/alloc2/Allocator.hpp>"
],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/GCObject.json5",
brief: "provide AGCObject interface for DApplyExpr",
using_doxygen: true,
repr: "DApplyExpr",
doc: [ "implement AGCObject for DApplyExpr" ],
}

View file

@ -1,18 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [
"<xo/alloc2/GCObject.hpp>",
"<xo/alloc2/Allocator.hpp>"
],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/GCObject.json5",
brief: "provide AGCObject interface for DConstant",
using_doxygen: true,
repr: "DConstant",
doc: [ "implement AGCObject for DConstant" ],
}

View file

@ -1,18 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "define",
includes: [
"<xo/alloc2/GCObject.hpp>",
"<xo/alloc2/Allocator.hpp>"
],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/GCObject.json5",
brief: "provide AGCObject interface for DDefineExpr",
using_doxygen: true,
repr: "DDefineExpr",
doc: [ "implement AGCObject for DDefineExpr" ],
}

View file

@ -1,8 +1,8 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "env",
includes: [
"<xo/alloc2/GCObject.hpp>",
"<xo/alloc2/Allocator.hpp>"
@ -11,8 +11,8 @@
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/GCObject.json5",
brief: "provide AGCObject interface for DVarRef",
brief: "provide AGCObject interface for GlobalEnv",
using_doxygen: true,
repr: "DVarRef",
doc: [ "implement AGCObject for DVarRef" ],
repr: "DGlobalEnv",
doc: [ "implement AGCObject for DGlobalEnv" ],
}

View file

@ -1,18 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "symtab",
includes: [
"<xo/alloc2/GCObject.hpp>",
"<xo/alloc2/Allocator.hpp>"
],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/GCObject.json5",
brief: "provide AGCObject interface for DGlobalSymtab",
using_doxygen: true,
repr: "DGlobalSymtab",
doc: [ "implement AGCObject for DGlobalSymtab" ],
}

View file

@ -1,18 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [
"<xo/alloc2/GCObject.hpp>",
"<xo/alloc2/Allocator.hpp>"
],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/GCObject.json5",
brief: "provide AGCObject interface for DIfElseExpr",
using_doxygen: true,
repr: "DIfElseExpr",
doc: [ "implement AGCObject for DIfElseExpr" ],
}

View file

@ -1,18 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [
"<xo/alloc2/GCObject.hpp>",
"<xo/alloc2/Allocator.hpp>"
],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/GCObject.json5",
brief: "provide AGCObject interface for DLambdaExpr",
using_doxygen: true,
repr: "DLambdaExpr",
doc: [ "implement AGCObject for DLambdaExpr" ],
}

View file

@ -1,18 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "symtab",
includes: [
"<xo/alloc2/GCObject.hpp>",
"<xo/alloc2/Allocator.hpp>"
],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/GCObject.json5",
brief: "provide AGCObject interface for DLocalSymtab",
using_doxygen: true,
repr: "DLocalSymtab",
doc: [ "implement AGCObject for DLocalSymtab" ],
}

View file

@ -0,0 +1,18 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "parser",
includes: [
"<xo/alloc2/GCObject.hpp>",
"<xo/alloc2/Allocator.hpp>"
],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/GCObject.json5",
brief: "provide AGCObject interface for SchematikaParser",
using_doxygen: true,
repr: "DSchematikaParser",
doc: [ "implement AGCObject for DSchematikaParser" ],
}

View file

@ -1,18 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [
"<xo/alloc2/GCObject.hpp>",
"<xo/alloc2/Allocator.hpp>"
],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/GCObject.json5",
brief: "provide AGCObject interface for DSequenceExpr",
using_doxygen: true,
repr: "DSequenceExpr",
doc: [ "implement AGCObject for DSequenceExpr" ],
}

View file

@ -1,18 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "typename",
includes: [
// "<xo/alloc2/GCObject.hpp>",
// "<xo/alloc2/Allocator.hpp>"
],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/GCObject.json5",
brief: "provide AGCObject interface for DTypename",
using_doxygen: true,
repr: "DTypename",
doc: [ "implement AGCObject for DTypename" ],
}

View file

@ -1,18 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2/facet",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "variable",
includes: [
"<xo/alloc2/GCObject.hpp>",
"<xo/alloc2/Allocator.hpp>"
],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/GCObject.json5",
brief: "provide AGCObject interface for DVariable",
using_doxygen: true,
repr: "DVariable",
doc: [ "implement AGCObject for DVariable" ],
}

View file

@ -1,16 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DApplyExpr",
using_doxygen: true,
repr: "DApplyExpr",
doc: [ "implement APrintable for DApplyExpr" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "apply",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DApplySsm",
using_doxygen: true,
repr: "DApplySsm",
doc: [ "implement APrintable for DApplySsm" ],
}

View file

@ -1,16 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DConstant",
using_doxygen: true,
repr: "DConstant",
doc: [ "implement APrintable for DConstant" ],
}

View file

@ -1,16 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DDefineExpr",
using_doxygen: true,
repr: "DDefineExpr",
doc: [ "implement APrintable for DDefineExpr" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "define",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DDefineSsm",
using_doxygen: true,
repr: "DDefineSsm",
doc: [ "implement APrintable for DDefineSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "deftype",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DDeftypeSsm",
using_doxygen: true,
repr: "DDeftypeSsm",
doc: [ "implement APrintable for DDeftypeSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DExpectExprSsm",
using_doxygen: true,
repr: "DExpectExprSsm",
doc: [ "implement APrintable for DExpectExprSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "expect_formal_arg",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DExpectFormalArgSsm",
using_doxygen: true,
repr: "DExpectFormalArgSsm",
doc: [ "implement APrintable for DExpectFormalArgSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DExpectFormalArglistSsm",
using_doxygen: true,
repr: "DExpectFormalArglistSsm",
doc: [ "implement APrintable for DExpectFormalArglistSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "expect_listtype",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DExpectListTypeSsm",
using_doxygen: true,
repr: "DExpectListTypeSsm",
doc: [ "implement APrintable for DExpectListTypeSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DExpectQArraySsm",
using_doxygen: true,
repr: "DExpectQArraySsm",
doc: [ "implement APrintable for DExpectQArraySsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "expect_qdict",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DExpectQDictSsm",
using_doxygen: true,
repr: "DExpectQDictSsm",
doc: [ "implement APrintable for DExpectQDictSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DExpectQListSsm",
using_doxygen: true,
repr: "DExpectQListSsm",
doc: [ "implement APrintable for DExpectQListSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DExpectQLiteralSsm",
using_doxygen: true,
repr: "DExpectQLiteralSsm",
doc: [ "implement APrintable for DExpectQLiteralSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DExpectSymbolSsm",
using_doxygen: true,
repr: "DExpectSymbolSsm",
doc: [ "implement APrintable for DExpectSymbolSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DExpectTypeSsm",
using_doxygen: true,
repr: "DExpectTypeSsm",
doc: [ "implement APrintable for DExpectTypeSsm" ],
}

View file

@ -1,16 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "env",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DVarRef",
brief: "provide APrintable interface for DGlobalEnv",
using_doxygen: true,
repr: "DVarRef",
doc: [ "implement APrintable for DVarRef" ],
repr: "DGlobalEnv",
doc: [ "implement APrintable for DGlobalEnv" ],
}

View file

@ -1,16 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "symtab",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DGlobalSymtab",
using_doxygen: true,
repr: "DGlobalSymtab",
doc: [ "implement APrintable for DGlobalSymtab" ],
}

View file

@ -1,16 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DIfElseExpr",
using_doxygen: true,
repr: "DIfElseExpr",
doc: [ "implement APrintable for DIfElseExpr" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ifelse",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DIfElseSsm",
using_doxygen: true,
repr: "DIfElseSsm",
doc: [ "implement APrintable for DIfElseSsm" ],
}

View file

@ -1,16 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DLambdaExpr",
using_doxygen: true,
repr: "DLambdaExpr",
doc: [ "implement APrintable for DLambdaExpr" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "lambda",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DLambdaSsm",
using_doxygen: true,
repr: "DLambdaSsm",
doc: [ "implement APrintable for DLambdaSsm" ],
}

View file

@ -1,16 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "symtab",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DLocalSymtab",
using_doxygen: true,
repr: "DLocalSymtab",
doc: [ "implement APrintable for DLocalSymtab" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "paren",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DParenSsm",
using_doxygen: true,
repr: "DParenSsm",
doc: [ "implement APrintable for DParenSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DProgressSsm",
using_doxygen: true,
repr: "DProgressSsm",
doc: [ "implement APrintable for DProgressSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "quote",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DQuoteSsm",
using_doxygen: true,
repr: "DQuoteSsm",
doc: [ "implement APrintable for DQuoteSsm" ],
}

View file

@ -1,16 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "detail",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DSequenceExpr",
using_doxygen: true,
repr: "DSequenceExpr",
doc: [ "implement APrintable for DSequenceExpr" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DSequenceSsm",
using_doxygen: true,
repr: "DSequenceSsm",
doc: [ "implement APrintable for DSequenceSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DToplevelSeqSsm",
using_doxygen: true,
repr: "DToplevelSeqSsm",
doc: [ "implement APrintable for DToplevelSeqSsm" ],
}

View file

@ -1,16 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "typename",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DTypename",
using_doxygen: true,
repr: "DTypename",
doc: [ "implement APrintable for DTypename" ],
}

View file

@ -1,16 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2/facet",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "variable",
includes: [ "<xo/printable2/Printable.hpp>",
"<xo/printable2/detail/IPrintable_Xfer.hpp>" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/Printable.json5",
brief: "provide APrintable interface for DVariable",
using_doxygen: true,
repr: "DVariable",
doc: [ "implement APrintable for DVariable" ],
}

View file

@ -1,15 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "symtab",
includes: [ ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SymbolTable.json5",
brief: "provide ASymbolTable interface for DGlobalSymtab",
using_doxygen: true,
repr: "DGlobalSymtab",
doc: [ "implement ASymbolTable for DGlobalSymtab" ],
}

View file

@ -1,15 +0,0 @@
{
mode: "implementation",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "symtab",
includes: [ ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SymbolTable.json5",
brief: "provide ASymbolTable interface for DLocalSymtab",
using_doxygen: true,
repr: "DLocalSymtab",
doc: [ "implement ASymbolTable for DLocalSymtab" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "apply",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DApplySsm",
using_doxygen: true,
repr: "DApplySsm",
doc: [ "implement ASyntaxStateMachine for DApplySsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "define",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DDefineSsm",
using_doxygen: true,
repr: "DDefineSsm",
doc: [ "implement ASyntaxStateMachine for DDefineSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "deftype",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DDeftypeSsm",
using_doxygen: true,
repr: "DDeftypeSsm",
doc: [ "implement ASyntaxStateMachine for DDeftypeSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DExpectExprSsm",
using_doxygen: true,
repr: "DExpectExprSsm",
doc: [ "implement ASyntaxStateMachine for DExpectExprSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "expect_formal_arg",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DExpectFormalArgSsm",
using_doxygen: true,
repr: "DExpectFormalArgSsm",
doc: [ "implement ASyntaxStateMachine for DExpectFormalArgSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DExpectFormalArglistSsm",
using_doxygen: true,
repr: "DExpectFormalArglistSsm",
doc: [ "implement ASyntaxStateMachine for DExpectFormalArglistSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "expect_listtype",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DExpectListTypeSsm",
using_doxygen: true,
repr: "DExpectListTypeSsm",
doc: [ "implement ASyntaxStateMachine for DExpectListTypeSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DExpectQArraySsm",
using_doxygen: true,
repr: "DExpectQArraySsm",
doc: [ "implement ASyntaxStateMachine for DExpectQArraySsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "expect_qdict",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DExpectQDictSsm",
using_doxygen: true,
repr: "DExpectQDictSsm",
doc: [ "implement ASyntaxStateMachine for DExpectQDictSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DExpectQListSsm",
using_doxygen: true,
repr: "DExpectQListSsm",
doc: [ "implement ASyntaxStateMachine for DExpectQListSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DExpectQLiteralSsm",
using_doxygen: true,
repr: "DExpectQLiteralSsm",
doc: [ "implement ASyntaxStateMachine for DExpectQLiteralSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DExpectSymbolSsm",
using_doxygen: true,
repr: "DExpectSymbolSsm",
doc: [ "implement ASyntaxStateMachine for DExpectSymbolSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DExpectTypeSsm",
using_doxygen: true,
repr: "DExpectTypeSsm",
doc: [ "implement ASyntaxStateMachine for DExpectTypeSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ifelse",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DIfElseSsm",
using_doxygen: true,
repr: "DIfElseSsm",
doc: [ "implement ASyntaxStateMachine for DIfElseSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "lambda",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DLambdaSsm",
using_doxygen: true,
repr: "DLambdaSsm",
doc: [ "implement ASyntaxStateMachine for DLambdaSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "paren",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DParenSsm",
using_doxygen: true,
repr: "DParenSsm",
doc: [ "implement ASyntaxStateMachine for DParenSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DProgressSsm",
using_doxygen: true,
repr: "DProgressSsm",
doc: [ "implement ASyntaxStateMachine for DProgressSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2/facet",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "quote",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DQuoteSsm",
using_doxygen: true,
repr: "DQuoteSsm",
doc: [ "implement ASyntaxStateMachine for DQuoteSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DSequenceSsm",
using_doxygen: true,
repr: "DSequenceSsm",
doc: [ "implement ASyntaxStateMachine for DSequenceSsm" ],
}

View file

@ -0,0 +1,16 @@
{
mode: "implementation",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
includes: [ "\"SyntaxStateMachine.hpp\"",
"\"ssm/ISyntaxStateMachine_Xfer.hpp\"" ],
local_types: [ ],
namespace1: "xo",
namespace2: "scm",
facet_idl: "idl/SyntaxStateMachine.json5",
brief: "provide ASyntaxStateMachine interface for DToplevelSeqSsm",
using_doxygen: true,
repr: "DToplevelSeqSsm",
doc: [ "implement ASyntaxStateMachine for DToplevelSeqSsm" ],
}

View file

@ -1,63 +0,0 @@
{
mode: "facet",
output_cpp_dir: "src/expression2",
output_hpp_dir: "include/xo/expression2",
output_impl_subdir: "symtab",
includes: [
"\"Binding.hpp\"",
"\"DUniqueString.hpp\""
],
// extra includes in SymbolTable.hpp, if any
user_hpp_includes: [],
namespace1: "xo",
namespace2: "scm",
// text after includes, before ASymbolTable
pretext: [ "// {pretext} here" ],
facet: "SymbolTable",
detail_subdir: "symtab",
brief: "symbol table derived from a set of schematika expressions",
using_doxygen: true,
doc: [
"Map symbols to schematika expressions. Output of schematika parser"
],
types: [
// { name: string, doc: [ string ], definition: string },
],
const_methods: [
{
// bool is_global_symtab() const noexcept;
name: "is_global_symtab",
doc: ["true iff this is toplevel (global) symbol table."],
return_type: "bool",
args: [],
const: true,
noexcept: true,
attributes: [],
},
{
// Binding lookup_binding(const DUniqueString * sym) const noexcept;
name: "lookup_binding",
doc: ["report ingredients needed to address variable at runtime."],
return_type: "Binding",
args: [
{type: "const DUniqueString *", name: "sym"},
],
const: true,
noexcept: true,
attributes: [],
},
// //
// obj<AExpression> lookup_var(const DUniqueString * sym) const noexcept;
// //
// obj<AExpression> lookup_local(const DUniqueString * sym) const noexcept;
],
nonconst_methods: [
// // Variable gives both {name, type}
// void upsert_local(DVariable * target) = 0;
],
router_facet_explicit_content: [ ],
}

View file

@ -0,0 +1,160 @@
{
mode: "facet",
output_cpp_dir: "src/reader2",
output_hpp_dir: "include/xo/reader2",
output_impl_subdir: "ssm",
// includes in ASyntaxStateMachine.hpp
includes: [
"\"ParserStateMachine.hpp\"",
"\"syntaxstatetype.hpp\"",
"<xo/type/Type.hpp>",
"<xo/tokenizer2/Token.hpp>",
"<xo/reflect/TypeDescr.hpp>",
"<xo/alloc2/GCObjectVisitor.hpp>"
],
// extra includes in SyntaxStateMachine.hpp, if any
user_hpp_includes: [],
namespace1: "xo",
namespace2: "scm",
// text after includes, before ASyntaxStateMachine
pretext: ["// {pretext} here"],
facet: "SyntaxStateMachine",
detail_subdir: "ssm",
brief: "specialized state machine for parsing some particular schematika syntax",
using_doxygen: true,
doc: [
"Assistant to schematika parser dedicated to particular syntax"
],
types: [
{ name: "TypeDescr", doc: [ "reflected c++ type" ], definition: "xo::reflect::TypeDescr" },
{ name: "AGCObjectVisitor", doc: [ "gc visitor interface" ], definition: "xo::mm::AGCObjectVisitor" },
{ name: "AGCObject", doc: [ "gc-aware object" ], definition: "xo::mm::AGCObject" },
{ name: "VisitReason", doc: [ "hint when traversing gco graph" ], definition: "xo::mm::VisitReason" },
],
const_methods: [
{
name: "ssm_type",
doc: ["identify a type of syntax state machine"],
return_type: "syntaxstatetype",
args: [],
const: true,
noexcept: true,
attributes: [],
},
{
name: "get_expect_str",
doc: ["text describing expected/allowed input to this ssm in current state"],
return_type: "std::string_view",
args: [],
const: true,
noexcept: true,
attributes: [],
},
],
nonconst_methods: [
{
name: "on_token",
doc: ["operate state machine for incoming token @p tk"],
return_type: "void",
args: [
{type: "const Token &", name: "tk"},
{type: "ParserStateMachine *", name: "p_psm"},
],
},
{
name: "on_parsed_symbol",
doc: ["update stat machine for incoming parsed symbol @p sym"],
return_type: "void",
args: [
{type: "std::string_view", name: "sym"},
{type: "ParserStateMachine *", name: "p_psm"},
],
},
{
name: "on_parsed_typedescr",
doc: ["operate state machine for incoming type description @p td"],
return_type: "void",
args: [
{type: "TypeDescr", name: "td"},
{type: "ParserStateMachine *", name: "p_psm"},
],
},
{
name: "on_parsed_type",
doc: ["update state machine for type emitted by nested ssm"],
return_type: "void",
args: [
{type: "obj<AType>", name: "type"},
{type: "ParserStateMachine *", name: "p_psm"},
],
},
{
name: "on_parsed_formal",
doc: ["operate state machine for formal emitted by nested ssm"],
return_type: "void",
args: [
{type: "const DUniqueString *", name: "param_name"},
{type: "TypeDescr", name: "param_type"},
{type: "ParserStateMachine *", name: "p_psm"},
],
},
{
name: "on_parsed_formal_with_token",
doc: ["operate state machine for formal emitted by nested ssm"],
return_type: "void",
args: [
{type: "const DUniqueString *", name: "param_name"},
{type: "TypeDescr", name: "param_type"},
{type: "const Token &", name: "tk"},
{type: "ParserStateMachine *", name: "p_psm"},
],
},
{
name: "on_parsed_formal_arglist",
doc: ["consume formal arglist emitted by nested ssm"],
return_type: "void",
args: [
{type: "DArray *", name: "arglist"},
{type: "ParserStateMachine *", name: "p_psm"},
],
},
{
name: "on_parsed_expression",
doc: ["update state machine for nested parsed expression @p expr"],
return_type: "void",
args: [
{type: "obj<AExpression>", name: "expr"},
{type: "ParserStateMachine *", name: "p_psm"},
],
},
{
name: "on_parsed_expression_with_token",
doc: ["update state machine @p p_psm for incoming parsed expression @p expr followed by token @p tk"],
return_type: "void",
args: [
{type: "obj<AExpression>", name: "expr"},
{type: "const Token &", name: "tk"},
{type: "ParserStateMachine *", name: "p_psm"},
],
},
{
name: "on_quoted_literal",
doc: ["update state machine for nested quoted literal @p lit"],
return_type: "void",
args: [
{type: "obj<AGCObject>", name: "lit"},
{type: "ParserStateMachine *", name: "p_psm"},
],
},
{
name: "visit_gco_children",
doc: ["gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each"],
return_type: "void",
args: [
{type: "VisitReason", name: "reason"},
{type: "obj<AGCObjectVisitor>", name: "gc"},
],
}
],
router_facet_explicit_content: [ ],
}

View file

@ -1,13 +0,0 @@
/** @file ApplyExpr.hpp
*
* @author Roland Conybeare, Feb 2026
**/
#pragma once
#include "DApplyExpr.hpp"
#include "detail/IExpression_DApplyExpr.hpp"
#include "detail/IGCObject_DApplyExpr.hpp"
#include "detail/IPrintable_DApplyExpr.hpp"
/* end ApplyExpr.hpp */

View file

@ -1,65 +0,0 @@
/** @file Binding.hpp
*
* @author Roland Conybeare, Jan 2026
**/
#pragma once
#include <iostream>
#include <cstdint>
namespace xo {
namespace scm {
class Binding {
public:
using slot_type = int32_t;
static constexpr int32_t c_link_sentinel = -2;
static constexpr int32_t c_link_global = -1;
public:
Binding() : i_link_{-2}, j_slot_{-1} {}
Binding(int32_t i_link, int32_t j_slot)
: i_link_{i_link}, j_slot_{j_slot} {}
static Binding null() { return Binding(); }
/** global bindings are located by symbol name **/
static Binding global(int32_t j_slot) { return Binding(c_link_global, j_slot); }
static Binding local(int32_t j_slot) { return Binding(0, j_slot); }
static Binding relative(int32_t i_link, Binding def);
bool is_null() const {
return (i_link_ == c_link_sentinel) && (j_slot_ == -1);
}
bool is_global() const { return i_link_ == c_link_global; }
bool is_local() const { return (i_link_ == 0) && (j_slot_ >= 0); }
int32_t i_link() const noexcept { return i_link_; }
int32_t j_slot() const noexcept { return j_slot_; }
/** print human-readable repr to stream @p os **/
void print(std::ostream & os) const;
private:
/**
* >= 0: number of parent links to traverse
* to a fixed-size frame
* -1: resolve globally
* -2: sentinel (binding info not computed)
**/
int32_t i_link_ = c_link_sentinel;
/** if @ref i_link_ >= 0, frame offset
* (in 'variables' not bytes).
* ignored if @ref i_link_ is global
**/
int32_t j_slot_ = -1;
};
inline std::ostream & operator<< (std::ostream & os, Binding x) {
x.print(os);
return os;
}
} /*namespace scm*/
} /*namespace xo*/
/* Binding.hpp */

View file

@ -1,13 +0,0 @@
/** @file Constant.hpp
*
* @author Roland Conybeare, Feb 2026
**/
#pragma once
#include "DConstant.hpp"
#include "detail/IExpression_DConstant.hpp"
#include "detail/IGCObject_DConstant.hpp"
#include "detail/IPrintable_DConstant.hpp"
/* end Constant.hpp */

View file

@ -1,113 +0,0 @@
/** @file DApplyExpr.hpp
*
* @author Roland Conybeare, Jan 2026
**/
#pragma once
#include "Expression.hpp"
#include "TypeRef.hpp"
#include "exprtype.hpp"
#include <xo/alloc2/GCObjectVisitor.hpp>
#include <xo/object2/DArray.hpp>
#include <xo/reflect/TypeDescr.hpp>
#include <xo/indentlog/print/pretty.hpp>
namespace xo {
namespace scm {
/** @class DApplyExpr
* @brief syntax for a procedure/function call
**/
class DApplyExpr {
public:
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
using VisitReason = xo::mm::VisitReason;
using AAllocator = xo::mm::AAllocator;
using TypeDescr = xo::reflect::TypeDescr;
using ppindentinfo = xo::print::ppindentinfo;
using size_type = std::uint32_t;
public:
/** @defgroup scm-applyexpr-constructors **/
///@{
/** construct empty instance, but with argument expressions empty **/
DApplyExpr(TypeRef typeref,
obj<AExpression> fn_expr,
size_type n_args);
/** create apply for function with 2 arguments **/
static obj<AExpression,DApplyExpr> make2(obj<AAllocator> mm,
TypeRef typeref,
obj<AExpression> fn_expr,
obj<AExpression> arg1,
obj<AExpression> arg2);
/** create apply for function with 2 arguments **/
static DApplyExpr * _make2(obj<AAllocator> mm,
TypeRef typeref,
obj<AExpression> fn_expr,
obj<AExpression> arg1,
obj<AExpression> arg2);
/** scaffold incomplete instance.
* apply-expr using memory from @p mm.
* will construct instance with space for @p n_args arguments
* but expressions left empty.
* use @ref assign_arg for all arguments to complete.
**/
static DApplyExpr * scaffold(obj<AAllocator> mm,
TypeRef typeref,
obj<AExpression> fn_expr,
size_type n_args);
void assign_arg(size_type i_arg, obj<AExpression> expr);
///@}
/** @defgroup scm-applyexpr-access-methods **/
///@{
obj<AExpression> fn() const noexcept { return fn_; }
size_type n_args() const noexcept { return n_args_; }
obj<AExpression> arg(size_type i) const;
///@}
/** @defgroup scm-applyexpr-expression-facet **/
///@{
exprtype extype() const noexcept { return exprtype::apply; }
TypeRef typeref() const noexcept { return typeref_; }
TypeDescr valuetype() const noexcept { return typeref_.td(); }
void assign_valuetype(TypeDescr td) noexcept;
///@}
/** @defgroup scm-applyexpr-gcobject-facet **/
///@{
DApplyExpr * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
///@}
/** @defgroup scm-applyexpr-printable-facet **/
///@{
bool pretty(const ppindentinfo & ppii) const;
///@}
private:
/** expression value always has type consistent
* with this description
**/
TypeRef typeref_;
/** expression for function/procedure to invoke **/
obj<AExpression> fn_;
/** number of arguments (not counting @ref fn_ **/
size_type n_args_ = 0;
/** args_[i] is expression for i'th argument to @ref fn_ **/
obj<AExpression> args_[];
};
}
}
/* end DApplyExpr.hpp */

View file

@ -1,91 +0,0 @@
/** @file DConstant.hpp
*
* @author Roland Conybeare, Jan 2026
**/
#pragma once
#include "Expression.hpp"
#include "TypeRef.hpp"
#include "exprtype.hpp"
#include <xo/alloc2/GCObject.hpp>
#include <xo/alloc2/GCObjectVisitor.hpp>
#include <xo/reflect/TaggedPtr.hpp>
namespace xo {
namespace scm {
/** @class DConstant
* @brief Schematika expression respresenting a literal constant
**/
struct DConstant {
public:
using TaggedPtr = xo::reflect::TaggedPtr;
using TypeDescr = xo::reflect::TypeDescr;
using AGCObject = xo::mm::AGCObject;
using VisitReason = xo::mm::VisitReason;
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
using AAllocator = xo::mm::AAllocator;
using typeseq = xo::reflect::typeseq;
using ppindentinfo = xo::print::ppindentinfo;
public:
explicit DConstant(obj<AGCObject> value) noexcept;
/** create isntance
* @p mm memory allocator
* @p value literal constant
**/
static obj<AExpression,DConstant> make(obj<AAllocator> mm,
obj<AGCObject> value);
/** create instance
* @p mm memory allocator
* @p value literal constant
**/
static DConstant * _make(obj<AAllocator> mm,
obj<AGCObject> value);
bool is_resolved() const noexcept { return typeref_.is_resolved(); }
obj<AGCObject> value() const noexcept { return value_; }
TypeDescr value_td() const noexcept { return typeref_.td(); }
TaggedPtr value_tp() const noexcept { return TaggedPtr(typeref_.td(), value_.data()); }
/** @defgroup scm-constant-expression-facet **/
///@{
exprtype extype() const noexcept { return exprtype::constant; }
TypeRef typeref() const noexcept { return typeref_; }
TypeDescr valuetype() const noexcept { return typeref_.td(); }
void assign_valuetype(TypeDescr td) noexcept { typeref_.resolve(td); }
///@}
/** @defgroup scm-constant-gcobject-facet **/
///@{
DConstant * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
///@}
/** @defgroup scm-constant-printable-facet **/
///@{
bool pretty(const ppindentinfo & ppii) const;
///@}
private:
static TypeDescr _lookup_td(typeseq tseq);
private:
/** type for value of this expression
* or unification breadcrumb before unification
**/
TypeRef typeref_;
/** literal value **/
obj<AGCObject> value_;
};
} /*namespace scm*/
} /*namespace xo*/
/* end DConstant.hpp */

View file

@ -1,108 +0,0 @@
/** @file DDefineExpr.hpp
*
* @author Roland Conybeare, Jan 2026
**/
#pragma once
#include "Expression.hpp"
#include "DVariable.hpp"
#include <xo/alloc2/Allocator.hpp>
#include <xo/alloc2/GCObjectVisitor.hpp>
#include <xo/indentlog/print/pretty.hpp>
namespace xo {
namespace scm {
class DUniqueString; // see DUniqueString.hpp
/** @class DDefineExpr
* @brief an expression that introduces a variable.
*
* Variable may optionally be declared with a type,
* and may come with an expression specifying an initial value
**/
class DDefineExpr {
public:
using ppindentinfo = xo::print::ppindentinfo;
using ACollector = xo::mm::ACollector;
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
using VisitReason = xo::mm::VisitReason;
using AAllocator = xo::mm::AAllocator;
using TypeDescr = xo::reflect::TypeDescr;
public:
/** @defgroup scm-defineexpr-constructors **/
///@{
/** create instance: define-expr using memory from @p mm
* with lhs name @p lhs_name and rhs expression @p rhs_expr
**/
static DDefineExpr * make(obj<AAllocator> mm,
const DUniqueString * lhs_name,
obj<AExpression> rhs_expr);
/** create empty skeleton. Rely on this for parsing
**/
static DDefineExpr * make_empty(obj<AAllocator> mm);
DDefineExpr(DVariable * lhs_var,
obj<AExpression> rhs);
///@}
/** @defgroup scm-definexpr-access-methods **/
///@{
DVariable * lhs() const { return lhs_var_; }
obj<AExpression> rhs() const noexcept { return rhs_; }
const DUniqueString * name() const noexcept;
///@}
/** @defgroup scm-definexpr-bookkeeping-methods **/
///@{
void assign_lhs_name(const DUniqueString * name);
void assign_rhs(obj<AExpression> rhs);
///@}
/** @defgroup scm-defineexpr-expression-facet **/
///@{
exprtype extype() const noexcept { return exprtype::define; }
TypeRef typeref() const noexcept { return lhs_var_->typeref(); }
TypeDescr valuetype() const noexcept { return lhs_var_->typeref().td(); }
void assign_valuetype(TypeDescr td) noexcept;
///@}
/** @defgroup scm-defineexpr-gcobject-facet **/
///@{
DDefineExpr * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
///@}
/** @defgroup scm-defineexpr-printable-facet **/
///@{
bool pretty(const ppindentinfo & ppii) const;
///@}
private:
/** @defgrouop scm-defineexpr-instance-vars **/
///@{
/** variable being defined by this expression.
**/
DVariable * lhs_var_ = nullptr;
/** expression for initial value of this expression
**/
obj<AExpression> rhs_;
// std::set<std::string> free_var_set_;
///@}
};
} /*namespace scm*/
} /*namespace xo*/
/* end DDefineExpr.hpp */

View file

@ -1,161 +0,0 @@
/** @file DGlobalSymtab.hpp
*
* @author Roland Conybeare, Jan 2026
**/
#pragma once
#include "Binding.hpp"
#include "DVariable.hpp"
#include "DTypename.hpp"
#include <xo/object2/DArray.hpp>
#include <xo/alloc2/GCObjectVisitor.hpp>
#include <xo/alloc2/dp.hpp>
#include <xo/arena/DArenaHashMap.hpp>
namespace xo {
namespace scm {
class DUniqueString;
/** @class DGlobalSymtab
* @brief symbol table for toplevel environment
*
* We're using DArenaHashMap to store <key,binding> pairs.
* Both of these are outside GC-space, so we don't need collector
* to traverse these.
**/
class DGlobalSymtab {
public:
using key_type = const DUniqueString *;
using value_type = Binding;
using ArenaHashMapConfig = xo::map::ArenaHashMapConfig;
using repr_type = xo::map::DArenaHashMap<key_type, Binding::slot_type>;
using AGCObject = xo::mm::AGCObject;
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
using VisitReason = xo::mm::VisitReason;
using AAllocator = xo::mm::AAllocator;
using MemorySizeVisitor = xo::mm::MemorySizeVisitor;
using ppindentinfo = xo::print::ppindentinfo;
using size_type = std::uint32_t;
public:
/** @defgroup scm-globalsymtab-ctors constructors **/
///@{
DGlobalSymtab(dp<repr_type> var_map, DArray * vars,
dp<repr_type> type_map, DArray * types);
/** move constructor (needed because dp<> deletes copy ctor) **/
DGlobalSymtab(DGlobalSymtab && other);
/** create instance.
* Use memory from @p fixed_mm for @ref map_.
* Use memory from @p mm for DGlobalSymtab instance.
* Hashmap for variables per @p var_cfg; for types per @p type_cfg.
**/
static DGlobalSymtab * _make(obj<AAllocator> mm,
obj<AAllocator> fixed_mm,
const ArenaHashMapConfig & var_cfg,
const ArenaHashMapConfig & type_cfg);
/** like _make(..), but create fop **/
static obj<AGCObject,DGlobalSymtab> make(obj<AAllocator> mm,
obj<AAllocator> fixed_mm,
const ArenaHashMapConfig & var_cfg,
const ArenaHashMapConfig & type_cfg);
/** non-trivial destructor for @ref map_ **/
~DGlobalSymtab() = default;
///@}
/** @defgroup scm-globalsymtab-access-methods access methods **/
///@{
size_type n_vars() const noexcept { return var_map_->size(); }
size_type var_capacity() const noexcept { return var_map_->capacity(); }
/** visit symtab-owned memory pools; call visitor(info) for each **/
void visit_pools(const MemorySizeVisitor & visitor) const;
/** lookup global symbol with name @p sym **/
DVariable * lookup_variable(const DUniqueString * sym) const noexcept;
/** lookup global typename with name @p sym **/
DTypename * lookup_typename(const DUniqueString * sym) const noexcept;
///@}
/** @defgroup scm-globalsymtab-general-methods general methods **/
///@{
/** update this symtab to associate @p var with @c var->name().
* If there was a previous variable with the same name,
* replace it with @p var.
**/
void upsert_variable(obj<AAllocator> mm,
DVariable * var);
/** update this symtab to associate typename @p type with @c type->name().
* If there was a previous type with the same name, replace it with
* @p type.
**/
void upsert_typename(obj<AAllocator> mm,
DTypename * type);
///@}
/** @defgroup scm-globalsymtab-symboltable-facet symboltable facet **/
///@{
/** true for global symbol table **/
bool is_global_symtab() const noexcept { return true; }
/** lookup binding for variable @p sym **/
Binding lookup_binding(const DUniqueString * sym) const noexcept;
///@}
/** @defgroup scm-globalsymtab-gcobject-facet gcobject facet **/
///@{
DGlobalSymtab * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
///@}
/** @defgroup scm-globalsymtab-printable-facet printable facet **/
///@{
/** pretty-printing support **/
bool pretty(const ppindentinfo & ppii) const;
///@}
private:
/** map variable symbol -> index into @ref vars_.
* Minor point: storing offsets instead of Variables allows us to:
* omit hash-map iteration during GC.
* Savings when map_ slots sparsely populated.
**/
dp<repr_type> var_map_;
/** array of variables.
* When S is a unique-string for a global symbol, then:
* 1. var_map_[S] is unique global index i(S) for S.
* 2. vars_[i(S)] is variable-expr var(S) for S
* 3. var(S)->name == S
**/
DArray * vars_ = nullptr;
/** map type name -> index values into @ref types_ **/
dp<repr_type> type_map_;
/** array of types.
* When T is a unique-string for a globally-defined type, then:
* 1. type_map_[T] is unique global index i(T) for T.
* 2. types_[i(T)] is type type(T) for T
* 3. type(T)->name == T
**/
DArray * types_ = nullptr;
};
} /*namespace scm*/
} /*namespace xo*/
/* end DGlobalSymtab.hpp */

View file

@ -1,248 +0,0 @@
/** @file DIfElseExpr.hpp
*
* @author Roland Conybeare, Jan 2026
**/
#pragma once
#include "Expression.hpp"
#include "TypeRef.hpp"
#include "exprtype.hpp"
#include <xo/alloc2/GCObjectVisitor.hpp>
#include <xo/alloc2/Allocator.hpp>
#include <string>
namespace xo {
namespace scm {
/** @class DIfExpr
* @brief abstract syntax tree for a function definition
**/
class DIfElseExpr {
public:
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
using VisitReason = xo::mm::VisitReason;
using AAllocator = xo::mm::AAllocator;
using TypeDescr = xo::reflect::TypeDescr;
using ppindentinfo = xo::print::ppindentinfo;
public:
/** @defgroup scm-ifelseexpr-constructors **/
///@{
/**
* @p ifexpr_type type for value produced by if-expression.
* same as both when_true->valuetype() and
* when_false->valuetype().
* @p test test-expression; always execute
* @p when_true then-branch; executes only when test succeeds
* @p when_false else-branch; executes only when test fails
**/
DIfElseExpr(TypeRef ifexpr_type,
obj<AExpression> test_expr,
obj<AExpression> when_true,
obj<AExpression> when_false);
/** create if-else expression using memory from @p mm.
* @p when_false can be null
**/
static obj<AExpression,DIfElseExpr> make(obj<AAllocator> mm,
obj<AExpression> test,
obj<AExpression> when_true,
obj<AExpression> when_false);
/** create expression for conditional execution of
* @p when_true or @p when_false, depending on result
* of evaluating expression @p test
**/
static DIfElseExpr * _make(obj<AAllocator> mm,
obj<AExpression> test,
obj<AExpression> when_true,
obj<AExpression> when_false);
/** create empty if-else expression using memory from @p mm **/
static obj<AExpression,DIfElseExpr> make_empty(obj<AAllocator> mm);
/** create empty if-else expression using memory from @p mm **/
static DIfElseExpr * _make_empty(obj<AAllocator> mm);
///@}
/** @defgroup scm-ifelseexpr-access-methods **/
///@{
obj<AExpression> test() const noexcept { return test_; }
obj<AExpression> when_true() const noexcept { return when_true_; }
obj<AExpression> when_false() const noexcept { return when_false_; }
void assign_test(obj<AExpression> x) { this->test_ = x; }
void assign_when_true(obj<AExpression> x) { this->when_true_ = x; }
void assign_when_false(obj<AExpression> x) { this->when_false_ = x; }
///@}
/** @defgroup scm-ifelseexpr-expression-facet **/
///@{
exprtype extype() const noexcept { return exprtype::ifexpr; }
TypeRef typeref() const noexcept { return typeref_; }
TypeDescr valuetype() const noexcept { return typeref_.td(); }
void assign_valuetype(TypeDescr td) noexcept;
///@}
/** @defgroup scm-ifelseexpr-printable-facet **/
///@{
bool pretty(const ppindentinfo & ppii) const;
///@}
/** @defgroup scm-ifelseexpr-gcobject-facet **/
///@{
DIfElseExpr * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
///@}
#ifdef NOT_YET
virtual std::set<std::string> get_free_variables() const override {
std::set<std::string> retval = test_->get_free_variables();
std::set<std::string> free_vars;
free_vars = when_true_->get_free_variables();
for (const auto & s : free_vars)
retval.insert(s);
free_vars = when_false_->get_free_variables();
for (const auto & s : free_vars)
retval.insert(s);
return retval;
}
virtual std::size_t visit_preorder(VisitFn visitor_fn) override {
std::size_t n = 1;
visitor_fn(this);
n += this->test_->visit_preorder(visitor_fn);
n += this->when_true_->visit_preorder(visitor_fn);
n += this->when_false_->visit_preorder(visitor_fn);
return n;
}
virtual std::size_t visit_layer(VisitFn visitor_fn) override {
std::size_t n = 1;
visitor_fn(this);
n += this->test_->visit_layer(visitor_fn);
n += this->when_true_->visit_layer(visitor_fn);
n += this->when_false_->visit_layer(visitor_fn);
return n;
}
virtual rp<Expression> xform_layer(TransformFn xform_fn) override {
this->test_ = this->test_->xform_layer(xform_fn);
this->when_true_ = this->when_true_->xform_layer(xform_fn);
this->when_false_= this->when_false_->xform_layer(xform_fn);
return xform_fn(this);
}
virtual void attach_envs(bp<SymbolTable> p) override {
test_->attach_envs(p);
when_true_->attach_envs(p);
when_false_->attach_envs(p);
}
#endif
#ifdef NOT_USING
virtual std::int32_t find_free_vars(std::set<bp<Variable>> * p_set) override {
return (test_->find_free_vars(p_set)
+ when_true_->find_free_vars(p_set)
+ when_false_->find_free_vars(p_set));
}
#endif
#ifdef NOPE
virtual void display(std::ostream & os) const override;
virtual std::uint32_t pretty_print(const ppindentinfo & ppi) const override;
#endif
protected:
#ifdef NOT_YET
/**
* @p ifexpr_type type for value produced by if-expression.
* same as both when_true->valuetype() and
* when_false->valuetype().
* @p test test-expression; always execute
* @p when_true then-branch; executes only when test succeeds
* @p when_false else-branch; executes only when test fails
**/
IfExpr(TypeDescr ifexpr_type,
rp<Expression> test,
rp<Expression> when_true,
rp<Expression> when_false)
: Expression(exprtype::ifexpr, ifexpr_type),
test_{std::move(test)},
when_true_{std::move(when_true)},
when_false_{std::move(when_false)} {}
static TypeDescr check_consistent_valuetype(const rp<Expression> & when_true,
const rp<Expression> & when_false);
/** determine if-expr valuetype **/
void establish_valuetype();
#endif
private:
/** expression value always has type consistent
* with this description
**/
TypeRef typeref_;
/** if:
* (if x y z)
*
* executes x; if true execute y; otherwise execute z
**/
obj<AExpression> test_;
obj<AExpression> when_true_;
obj<AExpression> when_false_;
}; /*IfExpr*/
#ifdef NOPE
inline rp<IfExpr>
make_ifexpr(const rp<Expression> & test,
const rp<Expression> & when_true,
const rp<Expression> & when_false)
{
return IfExpr::make(test, when_true, when_false);
}
class IfExprAccess : public IfExpr {
public:
static rp<IfExprAccess> make(rp<Expression> test,
rp<Expression> when_true,
rp<Expression> when_false);
static rp<IfExprAccess> make_empty();
void assign_test(rp<Expression> x) { test_ = std::move(x); }
void assign_when_true(rp<Expression> x);
void assign_when_false(rp<Expression> x);
private:
IfExprAccess(TypeDescr ifexpr_type,
rp<Expression> test,
rp<Expression> when_true,
rp<Expression> when_false)
: IfExpr(ifexpr_type,
std::move(test),
std::move(when_true),
std::move(when_false)) {}
};
#endif
} /*namespace scm*/
} /*namespace xo*/
/* end DIfElseExpr.hpp */

View file

@ -1,133 +0,0 @@
/** @file DLambdaExpr.hpp
*
* @author Roland Conybeare, Jan 2026
**/
#pragma once
#include "Expression.hpp"
#include "TypeRef.hpp"
#include "exprtype.hpp"
#include "DLocalSymtab.hpp"
#include "DString.hpp"
#include <xo/alloc2/GCObjectVisitor.hpp>
#include <xo/facet/obj.hpp>
namespace xo {
namespace scm {
/** @class DLambdaExpr
* @brief syntax tree for a function/procedure definition
*
**/
class DLambdaExpr {
public:
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
using VisitReason = xo::mm::VisitReason;
using AAllocator = xo::mm::AAllocator;
using TypeDescr = xo::reflect::TypeDescr;
using ppindentinfo = xo::print::ppindentinfo;
using size_type = DLocalSymtab::size_type;
public:
/** @defgroup scm-lambdaexpr-ctors **/
///@{
DLambdaExpr(TypeRef typeref,
const DUniqueString * name,
DLocalSymtab * local_symtab,
obj<AExpression> body);
/** create instance using memory from @p mm **/
static obj<AExpression,DLambdaExpr> make(obj<AAllocator> mm,
TypeRef typeref,
const DUniqueString * name,
DLocalSymtab * local_symtab,
obj<AExpression> body);
/** create instance, using memory from @p mm **/
static DLambdaExpr * _make(obj<AAllocator> mm,
TypeRef typeref,
const DUniqueString * name,
DLocalSymtab * local_symtab,
obj<AExpression> body);
/** create type description for lambda with arguments described by @p symtab
* and return type @p return_td.
* Load-bearing for DLambdaSsm in xo-reader2/
**/
static TypeDescr assemble_lambda_td(DLocalSymtab * symtab,
TypeDescr return_td);
///@}
/** @defgroup scm-lambdaexpr-methods **/
///@{
DLocalSymtab * local_symtab() const noexcept { return local_symtab_; }
size_type n_args() const noexcept { return local_symtab_->n_vars(); }
obj<AExpression> body_expr() const noexcept { return body_expr_; }
// get_free_variables()
// visit_preorder()
// visit_layer()
// xform_layer()
// attach_envs(SymbolTable*)
///@}
/** @defgroup scm-lambdaexpr-expression-facet **/
///@{
exprtype extype() const noexcept;
TypeRef typeref() const noexcept;
TypeDescr valuetype() const noexcept;
void assign_valuetype(TypeDescr td) noexcept;
///@}
/** @defgroup scm-lambdaexpr-gcobject-facet **/
///@{
std::size_t shallow_size() const noexcept;
DLambdaExpr * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
///@}
/** @defgroup scm-lambdaexpr-printable-facet **/
///@{
bool pretty(const ppindentinfo & ppii) const;
///@}
private:
/** expression value always has type consistent
* with description here
**/
TypeRef typeref_;
/** name for this lambda (generated if necessary) **/
const DUniqueString * name_ = nullptr;
#ifdef NOT_YET // when enabled, need to visit forward_children()
/** e.g.
* i64(f64,string)
* for function of two arguments with types (f64, string) respectively,
* that returns an i64.
**/
const DUniqueString * type_name_str_ = nullptr;
#endif
/** symbol table for lambda arguments **/
DLocalSymtab * local_symtab_ = nullptr;;
/** expression for function body **/
obj<AExpression> body_expr_;
// free_var_set
// captured_var_set
// layer_var_map
// nested_lambda_map
};
} /*namespace scm*/
} /*namespace xo*/
/* end DLambdaExpr.hpp */

View file

@ -1,128 +0,0 @@
/** @file DLocalSymtab.hpp
*
* @author Roland Conybeare, Jan 2026
**/
#pragma once
#include "Binding.hpp"
#include "DVariable.hpp"
#include "DUniqueString.hpp"
#include <xo/object2/DArray.hpp>
#include <xo/alloc2/GCObjectVisitor.hpp>
namespace xo {
namespace scm {
/** @class DLocalSymtab
* @brief symbol table for a local stack frame
**/
struct DLocalSymtab {
public:
using DArray = xo::scm::DArray;
using ppindentinfo = xo::print::ppindentinfo;
using AGCObject = xo::mm::AGCObject;
using VisitReason = xo::mm::VisitReason;
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
using AAllocator = xo::mm::AAllocator;
/* note: uint16_t would be fine too */
using size_type = std::uint32_t;
struct Slot {
Slot() = default;
explicit Slot(DVariable * var) : var_{var} {}
/** variable representing a formal argument.
* binding will be correct only within the same layer
* as top-level lambda body
* (i.e. up to the doorstep of each and every nested lambda)
**/
DVariable * var_ = nullptr;
};
public:
/** @defgroup scm-lambdaexpr-constructors **/
///@{
/** empty instance with parent @p p, using arrays @p vars for variables
* and @p types for type definitions.
**/
DLocalSymtab(DLocalSymtab * p, DArray * nv, DArray * nt);
/** scaffold empty symtab instance,
* capacity for @p nv vars and @p nt types,
* using memory from allocator @p mm.
* Symtab chains to parent @p p.
**/
static DLocalSymtab * _make_empty(obj<AAllocator> mm,
DLocalSymtab * p,
size_type nv,
size_type nt);
///@}
/** @defgroup scm-lambdaexpr-methods **/
///@{
DLocalSymtab * parent() const noexcept { return parent_; }
//size_type capacity() const noexcept { return capacity_; }
size_type n_vars() const noexcept { return vars_->size(); }
size_type n_types() const noexcept { return types_->size(); }
DVariable * lookup_var(Binding ix) noexcept;
/** increase slot size (provided below capacity) to append
* binding for one local variable. Local variable will be allocated
* from @p mm, named @p name, with type described by @p typeref.
**/
Binding append_var(obj<AAllocator> mm,
const DUniqueString * name,
TypeRef typeref);
/** increase slot size (provided below capacity) to append
* binding for one local type. Local type will be allocated
* from @p mm, named @p name, with type described by @p type.
**/
void append_type(obj<AAllocator> mm,
const DUniqueString * name,
obj<AType> type);
///@}
/** @defgroup xo-localsymtab-symboltable-facet symboltable facet**/
///@{
/** true for global symbol table **/
bool is_global_symtab() const noexcept { return false; }
/** lookup binding for variable @p sym **/
Binding lookup_binding(const DUniqueString * sym) const noexcept;
///@}
/** @defgroup xo-localsymtab-gcobject-facet gcobject facet **/
///@{
DLocalSymtab * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
///@}
/** @defgroup xo-localsymtab-printable-facet printable facet **/
///@{
bool pretty(const ppindentinfo & ppii) const;
///@}
private:
/** parent symbol table from scoping surrounding this one **/
DLocalSymtab * parent_ = nullptr;
/** variables owned by (declared in) this symbol table
* vars_[i] is convertible to obj<AGCObject>
**/
DArray * vars_ = nullptr;
/** types owned by (defined in) this symbol table
* types_[i] is convertible to obj<AType>
**/
DArray * types_ = nullptr;
};
} /*namespace scm*/
} /*namespace xo*/
/* end DLocalSymtab.hpp */

View file

@ -1,93 +0,0 @@
/** @file DSequenceExpr.hpp
*
* @author Roland Conybeare, Jan 2026
**/
#pragma once
#include "Expression.hpp"
#include "TypeRef.hpp"
#include <xo/object2/DArray.hpp>
#include <xo/alloc2/GCObjectVisitor.hpp>
namespace xo {
namespace scm {
/** syntax for a sequence of expressions
* {
* expr(1);
* expr(2);
* ...
* expr(n);
* }
**/
class DSequenceExpr {
public:
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
using VisitReason = xo::mm::VisitReason;
using AAllocator = xo::mm::AAllocator;
using TypeDescr = xo::reflect::TypeDescr;
using size_type = DArray::size_type;
using ppindentinfo = xo::print::ppindentinfo;
public:
DSequenceExpr() ;
DSequenceExpr(DArray * xv);
/** create empty sequence using memory from @p mm **/
static obj<AExpression,DSequenceExpr> make_empty(obj<AAllocator> mm);
/** create empty sequence expression using mmeory from @p mm **/
static DSequenceExpr * _make_empty(obj<AAllocator> mm);
size_type size() const noexcept;
obj<AExpression> operator[](std::size_t i) const;
/** append @p expr to the end of this sequence;
* use memory from @p mm if need to expand storage
**/
void push_back(obj<AAllocator> mm,
obj<AExpression> expr);
// get_free_variables();
// visit_preorder();
// visit_layer();
// xform_layer()
// attach_envs()
/** @defgroup scm-ifelseexpr-expression-facets **/
///@{
exprtype extype() const noexcept { return exprtype::sequence; }
TypeRef typeref() const noexcept { return typeref_; }
TypeDescr valuetype() const noexcept { return typeref_.td(); }
void assign_valuetype(TypeDescr td) noexcept;
///@}
/** @defgroup scm-sequenceexpr-printable-facet printable facet methods **/
///@{
/** pretty-printing driver; combine layout+printing **/
bool pretty(const ppindentinfo & ppii) const;
///@}
/** @defgroup scm-sequenceexpr-gcobject-facet gcobject facet methods **/
///@{
DSequenceExpr * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
///@}
private:
/** expression value always has type consistent with this description
**/
TypeRef typeref_;
/** array of expressions **/
DArray * expr_v_ = nullptr;
};
} /*namespace scm*/
} /*namespace xo*/
/* end DSequenceExpr.hpp */

View file

@ -1,78 +0,0 @@
/** @file DTypename.hpp
*
* @author Roland Conybeare, Mar 2026
**/
#pragma once
#include "DUniqueString.hpp"
#include <xo/type/Type.hpp>
#include <xo/alloc2/GCObjectVisitor.hpp>
#include <xo/printable2/Printable.hpp>
#include <xo/indentlog/print/pretty.hpp>
namespace xo {
namespace scm {
/** @class DTypename
* @brief Container for a named type
*
* Represents the result of syntax like
* 1. deftype Foo :: i64;
* 2. deftype FooAlias :: Foo;
**/
class DTypename {
public:
using ppindentinfo = xo::print::ppindentinfo;
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
using VisitReason = xo::mm::VisitReason;
using AGCObject = xo::mm::AGCObject;
using AAllocator = xo::mm::AAllocator;
public:
DTypename(const DUniqueString * name,
obj<AType> type);
/** create instance
* @p mm memory allocator
* @p name type name
* @p type type definition
**/
static DTypename * _make(obj<AAllocator> mm,
const DUniqueString * name,
obj<AType> type);
/** create fop for new instance **/
static obj<AGCObject,DTypename> make(obj<AAllocator> mm,
const DUniqueString * name,
obj<AType> type);
const DUniqueString * name() const noexcept { return name_; }
obj<AType> type() const noexcept { return type_; }
void assign_name(const DUniqueString * name) { this->name_ = name; }
/** @defgroup scm-typename-gcobject-facet **/
///@{
DTypename * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
///@}
/** @defgroup scm-typename-printable-facet **/
///@{
bool pretty(const ppindentinfo & ppii) const;
///@}
private:
/** symbol name **/
const DUniqueString * name_ = nullptr;
/** type defintion. Everything but the name **/
obj<AType> type_;
};
} /*namespace scm*/
} /*namespace xo*/
/* end DTypename.hpp */

View file

@ -1,85 +0,0 @@
/** @file DVarRef.hpp
*
* @author Roland Conybeare, Feb 2026
**/
#pragma once
#include "Variable.hpp"
#include <xo/alloc2/GCObjectVisitor.hpp>
namespace xo {
namespace scm {
/** @class DVarRef
* @brief syntax for a variable reference
*
* Reference to a known variable possibly
* defined in another scope.
* For non-local non-global variables,
**/
class DVarRef {
public:
using ppindentinfo = xo::print::ppindentinfo;
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
using VisitReason = xo::mm::VisitReason;
using AAllocator = xo::mm::AAllocator;
using TypeDescr = xo::reflect::TypeDescr;
public:
DVarRef(DVariable * vardef,
Binding path);
/** create instance
* @p mm memory allocator
* @p vardef variable definition (name, typeref, binding)
* @p link number of lexical scope boundaries we must cross
* to reach scope containing @p vardef.
* Only relevant for non-global vardef
**/
static DVarRef * make(obj<AAllocator> mm,
DVariable * vardef,
int32_t link);
const DUniqueString * name() const;
Binding path() const { return path_; }
/** @defgroup scm-variable-expression-facet **/
///@{
exprtype extype() const noexcept { return exprtype::varref; }
TypeRef typeref() const noexcept;
TypeDescr valuetype() const noexcept;
void assign_valuetype(TypeDescr td) noexcept;
///@}
/** @defgroup scm-variable-gcobject-facet **/
///@{
DVarRef * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
///@}
/** @defgroup scm-variable-printable-facet **/
///@{
bool pretty(const ppindentinfo & ppii) const;
///@}
private:
/** variable definition. Created in the sccope where variable introduced.
* Has an associated @ref Binding, but that binding is only correct
* around any nested scopes.
**/
DVariable * vardef_ = nullptr;
/** at runtime: navigate environemnt via this path to get
* runtime memory location for this variable
**/
Binding path_;
};
} /*namespace scm*/
} /*namespace xo*/
/* end DVarRef.hpp */

View file

@ -1,93 +0,0 @@
/** @file DVariable.hpp
*
* @author Roland Conybeare, Jan 2026
**/
#pragma once
#include "DUniqueString.hpp"
#include "Binding.hpp"
#include "TypeRef.hpp"
#include "exprtype.hpp"
#include <xo/alloc2/GCObjectVisitor.hpp>
#include <xo/reflect/TypeDescr.hpp>
#include <xo/indentlog/print/pretty.hpp>
namespace xo {
namespace scm {
/** @class DVariable
* @brief syntax for a variable reference
**/
class DVariable {
public:
using ppindentinfo = xo::print::ppindentinfo;
using AGCObjectVisitor = xo::mm::AGCObjectVisitor;
using VisitReason = xo::mm::VisitReason;
using AAllocator = xo::mm::AAllocator;
using TypeDescr = xo::reflect::TypeDescr;
public:
/** create instance
* @p mm memory allocator
* @p name variable name
* @p typeref type information for legal values
* (possibly just placeholder when relying on inference)
* @p path binding path to runtime value.
* This may be computed after parsing;
* mnust be resolved before execution.
**/
static DVariable * make(obj<AAllocator> mm,
const DUniqueString * name,
const TypeRef & typeref,
Binding path = Binding());
DVariable(const DUniqueString * name,
const TypeRef & typeref,
Binding path);
const DUniqueString * name() const { return name_; }
Binding path() const { return path_; }
void assign_name(const DUniqueString * name) { this->name_ = name; }
void assign_path(Binding b) { this->path_ = b; }
/** @defgroup scm-variable-expression-facet **/
///@{
exprtype extype() const noexcept { return exprtype::variable; }
TypeRef typeref() const noexcept { return typeref_; }
TypeDescr valuetype() const noexcept { return typeref_.td(); };
void assign_valuetype(TypeDescr td) noexcept;
///@}
/** @defgroup scm-variable-gcobject-facet **/
///@{
DVariable * gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept;
void visit_gco_children(VisitReason reason, obj<AGCObjectVisitor> gc) noexcept;
///@}
/** @defgroup scm-variable-printable-facet **/
///@{
bool pretty(const ppindentinfo & ppii) const;
///@}
private:
/** symbol name **/
const DUniqueString * name_ = nullptr;
/** variable value always has type consistent
* with this description
**/
TypeRef typeref_;
/** at runtime: navigate environemnt via this path to get
* runtime memory location for this variable
**/
Binding path_;
};
} /*namespace scm*/
} /*namespace xo*/
/* end DVariable.hpp */

View file

@ -1,13 +0,0 @@
/** @file DefineExpr.hpp
*
* @author Roland Conybeare, Feb 2026
**/
#pragma once
#include "DDefineExpr.hpp"
#include "detail/IExpression_DDefineExpr.hpp"
#include "define/IGCObject_DDefineExpr.hpp"
#include "detail/IPrintable_DDefineExpr.hpp"
/* end DefineExpr.hpp */

Some files were not shown because too many files have changed in this diff Show more