Compare commits
363 commits
43de5f4f8f
...
e6d3846dbf
| Author | SHA1 | Date | |
|---|---|---|---|
| e6d3846dbf | |||
| 14cad16f1d | |||
| b7357fdbf1 | |||
| f2b9a2b909 | |||
| 87d6b75b39 | |||
| 132be039de | |||
| a6fbb5dde6 | |||
| 250e6f0502 | |||
| 48a082cb6b | |||
| 7cf23f246b | |||
| 7f4ffef585 | |||
| 6fcee73ae1 | |||
| a2b678410d | |||
| 2aa50b22bb | |||
| a56ea8894e | |||
| a6f8c3d3e3 | |||
| a30f52375b | |||
| f3205bdc4b | |||
| 0018f23a7e | |||
| adba8536d9 | |||
| 6068da02af | |||
| 2713050d84 | |||
| 866b6a55e2 | |||
| 3d24a523f3 | |||
| df32ec55c8 | |||
| 32fea42633 | |||
| d14f119a37 | |||
| 31df51ac8e | |||
| 0bc037f1ea | |||
| d740c94406 | |||
| bf8c3628ff | |||
| 1f91e2afdc | |||
| 6251b2bde7 | |||
| 63bdd59fc3 | |||
| 0898733029 | |||
| 73b2561aa8 | |||
| 7e575e6214 | |||
| 77efd433ad | |||
| 1d7339f694 | |||
| c982a2241e | |||
| ce800d700c | |||
| c715f0d8be | |||
| ff471bbc72 | |||
| af96e82c21 | |||
| 3806b46ea1 | |||
| d76622640e | |||
| f8839278c3 | |||
| 7be5869c93 | |||
| f0d4e58010 | |||
| aca798467a | |||
| 1d3af64a7a | |||
| 8331fa8a6b | |||
| 0972cdada3 | |||
| 4304892a7c | |||
| 48d5c323b4 | |||
| 3af72fec64 | |||
| ed3e26e718 | |||
| 25fd378c78 | |||
| 90c4819ef9 | |||
| f4514fc667 | |||
| ed3b5bfb4e | |||
| a3a5311250 | |||
| f4532235c0 | |||
| 14bcd9dec6 | |||
| 956a64df5c | |||
| 7b8e864668 | |||
| e67117c815 | |||
| 4c9771126b | |||
| 4e7b58e3c9 | |||
| 6104515656 | |||
| 41f704f7ab | |||
| 417ad2ac78 | |||
| 8fda8c8f14 | |||
| 88bf0475ec | |||
| 6acad26111 | |||
| e6cf751083 | |||
| ccc9968686 | |||
| b2073f832b | |||
| 3dc6268dfe | |||
| 6f95f38373 | |||
| cc42c98928 | |||
| 31c32cbca7 | |||
| caa8e31d02 | |||
| 46637ec16a | |||
| 6a0333765a | |||
| af978694ac | |||
| 309af002d2 | |||
| afe34f1d8a | |||
| 8bb36ae3e0 | |||
| aaf3f25347 | |||
| a7dcf260d1 | |||
| 458fd04ca2 | |||
| 76af3ff3b5 | |||
| 07b7a7c978 | |||
| a0fdfa2d90 | |||
| b96cf33a21 | |||
| b544a39993 | |||
| 74642dfcfa | |||
| 680416d077 | |||
| f2a9aa3f52 | |||
| 650a9fa95f | |||
| 906bb2a913 | |||
| 3f8be97290 | |||
| 9920812d42 | |||
| 7b70296eb1 | |||
| 34e863d4ea | |||
| df2c13f395 | |||
| 6795c1bc15 | |||
| c221a31efe | |||
| df87f1b313 | |||
| 04076ea983 | |||
| 1d6f1c22ea | |||
| dffaf7fa16 | |||
| 6d039c03e6 | |||
| f83af2fd3e | |||
| fe9ae63892 | |||
| a1e5449d5a | |||
| caa03566da | |||
| d6456ce921 | |||
| 4fc5f7d8ba | |||
| 8743aa44ef | |||
| 6575ab1c11 | |||
| dd0857160b | |||
| 911818e957 | |||
| 9cb3c4b5b6 | |||
| 27c5f66e74 | |||
| 121fb2dfad | |||
| 10db8493f7 | |||
| 5c53ae08a8 | |||
| 221fd85f61 | |||
| e72ab34419 | |||
| 595dc47dee | |||
| f761a38723 | |||
| 9a97bb2680 | |||
| da58e18779 | |||
| 5224799479 | |||
| 8a4f1db08d | |||
| 66d9bc5cd6 | |||
| ce655ed6bd | |||
| 1cab365770 | |||
| 3773946705 | |||
| 4724a781a4 | |||
| 6b7533559a | |||
| 797970cdea | |||
| f655dbb86a | |||
| 65bd5502ff | |||
| fc9ca649dd | |||
| ba7ec387cc | |||
| 9ce05973f4 | |||
| c0e61744bb | |||
| 78f1b8a0b6 | |||
| fc17a6f856 | |||
| 57981d93ef | |||
| 91804f1e57 | |||
| 955eb6d0c1 | |||
| 5f45f368c0 | |||
| 0d74c4f4ab | |||
| 85883c74e8 | |||
| 5ac64cbfdb | |||
| dcb4a8d240 | |||
| 9b8e5baf53 | |||
| a759d3c92e | |||
| 0baa458c5b | |||
| 6a52c00b2e | |||
| 3afe93b6c4 | |||
| 3a516e2866 | |||
| 9c677b28cc | |||
| a15abd8b43 | |||
| e0ab3c5927 | |||
| 65d1fd840b | |||
| 40e1fb531d | |||
| 4744139d74 | |||
| d65eb54102 | |||
| ca1370570b | |||
| 4cd4328f07 | |||
| 2aa6dfd942 | |||
| 0e043f56a4 | |||
| bdccad4087 | |||
| 574185ccdf | |||
| 6621d3900e | |||
| d895083b58 | |||
| 3f19001c94 | |||
| 3f5bd39ed8 | |||
| d243124ea8 | |||
| 415a382442 | |||
| eec85cc217 | |||
| eb929bb693 | |||
| 6b2ebe02ac | |||
| 029fc4ae00 | |||
| 939885a7d2 | |||
| 75b9e62c84 | |||
| 726f821c4e | |||
| 15f779d2f8 | |||
| 334057613e | |||
| bcd95502d2 | |||
| e7bdcbc125 | |||
| 64bc59660b | |||
| ed9733937e | |||
| 2fc57b1478 | |||
| 4614843864 | |||
| 5b21490c68 | |||
| a3cb9b6d8d | |||
| 9f173949ff | |||
| ff62b4e568 | |||
| f6b92e1885 | |||
| e3006f3266 | |||
| fcf171dfb6 | |||
| 900d675caa | |||
| f5ccd99dd2 | |||
| 985e572b21 | |||
| 554c01ffad | |||
| 83d210b968 | |||
| 2f9d49b083 | |||
| eaf224bba0 | |||
| 35a49810e4 | |||
| 753b074994 | |||
| 3e27b8be1e | |||
| 6a9d793c74 | |||
| 724a7f1496 | |||
| e7d4c4ae28 | |||
| 0f4e270707 | |||
| 66158551c7 | |||
| 254d7c179d | |||
| a28b45e4f2 | |||
| fdf2cc8439 | |||
| f0cd32c05f | |||
| 5357407151 | |||
| 3d7c3f8861 | |||
| bbeaadc9e4 | |||
| a346dcc579 | |||
| d720d89fd2 | |||
| 774a6ebe22 | |||
| ce732b3d3a | |||
| 6b2ad521f3 | |||
| c69ce58e15 | |||
| e283ee0126 | |||
| 4b4c69cfed | |||
| a8df123045 | |||
| 4d0c97ab7a | |||
| fa6f6defc1 | |||
| e7930122a7 | |||
| b7a813ec07 | |||
| e94ec86c03 | |||
| bd60b45ae9 | |||
| 7432a0bd1d | |||
| 6894055548 | |||
| 9044e1d196 | |||
| 8f64b05b71 | |||
| 5d8f4b4b92 | |||
| 8c038ed669 | |||
| f6224eefea | |||
| 15e1e50659 | |||
| 81dcd2eb71 | |||
| c33cfd7ae7 | |||
| cfff71c4a9 | |||
| 07d53f73fe | |||
| 5239290388 | |||
| d30412779c | |||
| 55149f0890 | |||
| 124d848a57 | |||
| c60aeda12a | |||
| b738afac9d | |||
| a3f5b12955 | |||
| 7d33440ecb | |||
| 7b62bd7f5c | |||
| c87975ab18 | |||
| 7fadf9662e | |||
| 0d8d928def | |||
| 021625d562 | |||
| 4c84f8c198 | |||
| eca64875fd | |||
| 3bdbb61eba | |||
| 0a7e8468ae | |||
| 4e490e6973 | |||
| 1bca806bf3 | |||
| a836c72a72 | |||
| 6e7524a730 | |||
| 9ab828059b | |||
| 535f48e202 | |||
| 19b6caa89d | |||
| 844b1519ef | |||
| 9d4b50ede4 | |||
| 284ed02de6 | |||
| e3be7ed2de | |||
| b5d2f3efab | |||
| 301a7c7623 | |||
| e38b61ce76 | |||
| a8eb35bd1a | |||
| 0aa1692f8c | |||
| a96196b365 | |||
| 3198e30234 | |||
| f25d1fb738 | |||
| 7ee57309b5 | |||
| a7ed10c16a | |||
| 1575f8a147 | |||
| 185519a22e | |||
| b9921d4108 | |||
| 412697bbb8 | |||
| 05ab69384a | |||
| 7b5198be08 | |||
| 1b93c9a427 | |||
| bd8ca68e7c | |||
| b6ccde3ddc | |||
| 40281c4e0a | |||
| e8d755252a | |||
| bd0b1b1f71 | |||
| 676a9d0d62 | |||
| e4a4e0dc87 | |||
| 3c3709ba15 | |||
| 1a8771dc5d | |||
| 67cf4cc625 | |||
| eee54530ff | |||
| 146b730447 | |||
| 43d79d7809 | |||
| 764e98e12e | |||
| 77f84cabbb | |||
| fd6bdd93c3 | |||
| b32b9151da | |||
| 30a00be262 | |||
| 5e3df1c783 | |||
| 50b0f7698c | |||
| 2febec3c8c | |||
| daf729292e | |||
| e5a72bce36 | |||
| 5c032834c6 | |||
| 66235079a8 | |||
| e10380a792 | |||
| 2f2cb735f3 | |||
| 760bb556b2 | |||
| eec5bc0981 | |||
| 40128c423c | |||
| 54dbbf6944 | |||
| dd41635a56 | |||
| 2c21eede1f | |||
| f3887debca | |||
| 7b82ace806 | |||
| 78c6c5cde9 | |||
| b4c89d8624 | |||
| 1c97e2aa93 | |||
| 954921c641 | |||
| f46c1d613e | |||
| 6c7b13e443 | |||
| a956320470 | |||
| 4c824edbe4 | |||
| 0a19c8b043 | |||
| d751093a87 | |||
| 78195b0218 | |||
| df9ad3b855 | |||
| 8fa254418a | |||
| 2ec5072092 | |||
| 279a1a040c | |||
| 258555e9eb | |||
| d8b3d7a148 | |||
| a6e4430825 | |||
| 8b622e6999 | |||
| 593dc064f9 | |||
| 227b2e5cf7 | |||
| 432e0efce2 | |||
| ff5b0cfb8a | |||
| fc9180363d | |||
| 19520f017b | |||
| c7488cbfd5 | |||
| 5f46b51f12 |
370 changed files with 24699 additions and 9521 deletions
440
CMakeLists.txt
440
CMakeLists.txt
|
|
@ -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
21
DESIGN.md
Normal 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
|
||||
|
|
@ -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
6
doc/README.md
Normal 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
3
doc/glossary.rst
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
ssm = syntax state machine
|
||||
psm = parser state machine
|
||||
ckp = checkpoint
|
||||
1
example/CMakeLists.txt
Normal file
1
example/CMakeLists.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
add_subdirectory(readerreplxx)
|
||||
14
example/readerreplxx/CMakeLists.txt
Normal file
14
example/readerreplxx/CMakeLists.txt
Normal 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()
|
||||
248
example/readerreplxx/readerreplxx.cpp
Normal file
248
example/readerreplxx/readerreplxx.cpp
Normal 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 */
|
||||
|
|
@ -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: [ ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
18
idl/IGCObject_DSchematikaParser.json5
Normal file
18
idl/IGCObject_DSchematikaParser.json5
Normal 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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
16
idl/IPrintable_DApplySsm.json5
Normal file
16
idl/IPrintable_DApplySsm.json5
Normal 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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
16
idl/IPrintable_DDefineSsm.json5
Normal file
16
idl/IPrintable_DDefineSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/IPrintable_DDeftypeSsm.json5
Normal file
16
idl/IPrintable_DDeftypeSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/IPrintable_DExpectExprSsm.json5
Normal file
16
idl/IPrintable_DExpectExprSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/IPrintable_DExpectFormalArgSsm.json5
Normal file
16
idl/IPrintable_DExpectFormalArgSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/IPrintable_DExpectFormalArglistSsm.json5
Normal file
16
idl/IPrintable_DExpectFormalArglistSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/IPrintable_DExpectListTypeSsm.json5
Normal file
16
idl/IPrintable_DExpectListTypeSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/IPrintable_DExpectQArraySsm.json5
Normal file
16
idl/IPrintable_DExpectQArraySsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/IPrintable_DExpectQDictSsm.json5
Normal file
16
idl/IPrintable_DExpectQDictSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/IPrintable_DExpectQListSsm.json5
Normal file
16
idl/IPrintable_DExpectQListSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/IPrintable_DExpectQLiteralSsm.json5
Normal file
16
idl/IPrintable_DExpectQLiteralSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/IPrintable_DExpectSymbolSsm.json5
Normal file
16
idl/IPrintable_DExpectSymbolSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/IPrintable_DExpectTypeSsm.json5
Normal file
16
idl/IPrintable_DExpectTypeSsm.json5
Normal 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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
16
idl/IPrintable_DIfElseSsm.json5
Normal file
16
idl/IPrintable_DIfElseSsm.json5
Normal 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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
16
idl/IPrintable_DLambdaSsm.json5
Normal file
16
idl/IPrintable_DLambdaSsm.json5
Normal 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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
16
idl/IPrintable_DParenSsm.json5
Normal file
16
idl/IPrintable_DParenSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/IPrintable_DProgressSsm.json5
Normal file
16
idl/IPrintable_DProgressSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/IPrintable_DQuoteSsm.json5
Normal file
16
idl/IPrintable_DQuoteSsm.json5
Normal 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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
16
idl/IPrintable_DSequenceSsm.json5
Normal file
16
idl/IPrintable_DSequenceSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/IPrintable_DToplevelSeqSsm.json5
Normal file
16
idl/IPrintable_DToplevelSeqSsm.json5
Normal 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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
|
|
@ -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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DApplySsm.json5
Normal file
16
idl/ISyntaxStateMachine_DApplySsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DDefineSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DDefineSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DDeftypeSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DDeftypeSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DExpectExprSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DExpectExprSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DExpectFormalArgSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DExpectFormalArgSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DExpectFormalArglistSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DExpectFormalArglistSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DExpectListTypeSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DExpectListTypeSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DExpectQArraySsm.json5
Normal file
16
idl/ISyntaxStateMachine_DExpectQArraySsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DExpectQDictSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DExpectQDictSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DExpectQListSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DExpectQListSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DExpectQLiteralSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DExpectQLiteralSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DExpectSymbolSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DExpectSymbolSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DExpectTypeSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DExpectTypeSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DIfElseSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DIfElseSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DLambdaSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DLambdaSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DParenSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DParenSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DProgressSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DProgressSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DQuoteSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DQuoteSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DSequenceSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DSequenceSsm.json5
Normal 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" ],
|
||||
}
|
||||
16
idl/ISyntaxStateMachine_DToplevelSeqSsm.json5
Normal file
16
idl/ISyntaxStateMachine_DToplevelSeqSsm.json5
Normal 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" ],
|
||||
}
|
||||
|
|
@ -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: [ ],
|
||||
}
|
||||
160
idl/SyntaxStateMachine.json5
Normal file
160
idl/SyntaxStateMachine.json5
Normal 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: [ ],
|
||||
}
|
||||
|
|
@ -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 */
|
||||
|
|
@ -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 */
|
||||
|
|
@ -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 */
|
||||
|
|
@ -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 */
|
||||
|
|
@ -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 */
|
||||
|
|
@ -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 */
|
||||
|
|
@ -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 */
|
||||
|
|
@ -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 */
|
||||
|
|
@ -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 */
|
||||
|
|
@ -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 */
|
||||
|
|
@ -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 */
|
||||
|
|
@ -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 */
|
||||
|
|
@ -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 */
|
||||
|
|
@ -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 */
|
||||
|
|
@ -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
Loading…
Add table
Add a link
Reference in a new issue