From a341ac1f069e1c284ba01503ee15c54bcbf4dd11 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Thu, 22 Jan 2026 15:18:35 -0500 Subject: [PATCH] xo-reader2: + on_f64_token() + handle in DDefineSsm+DProgressSsm --- CMakeLists.txt | 4 ++++ include/xo/expression2/DConstant.hpp | 8 ++++++++ include/xo/expression2/Expression.hpp | 2 +- include/xo/expression2/SymbolTable.hpp | 2 +- include/xo/expression2/detail/AExpression.hpp | 2 +- include/xo/expression2/detail/IExpression_Any.hpp | 2 +- .../expression2/{ => detail}/IExpression_DConstant.hpp | 5 ++++- .../xo/expression2/detail/IExpression_DVariable.hpp | 6 +++--- include/xo/expression2/detail/IExpression_Xfer.hpp | 2 +- include/xo/expression2/detail/RExpression.hpp | 2 +- include/xo/expression2/symtab/ASymbolTable.hpp | 2 +- include/xo/expression2/symtab/ISymbolTable_Any.hpp | 2 +- include/xo/expression2/symtab/ISymbolTable_Xfer.hpp | 2 +- include/xo/expression2/symtab/RSymbolTable.hpp | 2 +- src/expression2/DConstant.cpp | 10 ++++++++++ src/expression2/IExpression_DConstant.cpp | 2 +- src/expression2/IExpression_DVariable.cpp | 2 +- 17 files changed, 41 insertions(+), 16 deletions(-) rename include/xo/expression2/{ => detail}/IExpression_DConstant.hpp (91%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3de04758..f286f2ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,6 +134,10 @@ xo_add_genfacetimpl( OUTPUT_CPP_DIR src/expression2 ) +# ---------------------------------------------------------------- + +xo_add_genfacet_all(xo-expression2-genfacet-all) + # ---------------------------------------------------------------- # shared library diff --git a/include/xo/expression2/DConstant.hpp b/include/xo/expression2/DConstant.hpp index 9d2014b9..a73ea2df 100644 --- a/include/xo/expression2/DConstant.hpp +++ b/include/xo/expression2/DConstant.hpp @@ -19,12 +19,20 @@ namespace xo { public: using TaggedPtr = xo::reflect::TaggedPtr; using TypeDescr = xo::reflect::TypeDescr; + using AAllocator = xo::mm::AAllocator; using AGCObject = xo::mm::AGCObject; using typeseq = xo::reflect::typeseq; public: explicit DConstant(obj value) noexcept; + /** create instance + * @p mm memory allocator + * @p value literal constant + **/ + static DConstant * make(obj mm, + obj value); + bool is_resolved() const noexcept { return typeref_.is_resolved(); } exprtype extype() const noexcept { return exprtype::constant; } diff --git a/include/xo/expression2/Expression.hpp b/include/xo/expression2/Expression.hpp index 60e8a402..df4161a1 100644 --- a/include/xo/expression2/Expression.hpp +++ b/include/xo/expression2/Expression.hpp @@ -2,7 +2,7 @@ * * Generated automagically from ingredients: * 1. code generator: - * [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] + * [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet] * arguments: * --input [idl/Expression.json5] * 2. jinja2 template for facet .hpp file: diff --git a/include/xo/expression2/SymbolTable.hpp b/include/xo/expression2/SymbolTable.hpp index 09fc04a8..26576ed6 100644 --- a/include/xo/expression2/SymbolTable.hpp +++ b/include/xo/expression2/SymbolTable.hpp @@ -2,7 +2,7 @@ * * Generated automagically from ingredients: * 1. code generator: - * [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] + * [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet] * arguments: * --input [idl/SymbolTable.json5] * 2. jinja2 template for facet .hpp file: diff --git a/include/xo/expression2/detail/AExpression.hpp b/include/xo/expression2/detail/AExpression.hpp index 10375114..e080ece8 100644 --- a/include/xo/expression2/detail/AExpression.hpp +++ b/include/xo/expression2/detail/AExpression.hpp @@ -2,7 +2,7 @@ * * Generated automagically from ingredients: * 1. code generator: - * [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] + * [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet] * arguments: * --input [idl/Expression.json5] * 2. jinja2 template for abstract facet .hpp file: diff --git a/include/xo/expression2/detail/IExpression_Any.hpp b/include/xo/expression2/detail/IExpression_Any.hpp index c92c2c4a..17545afb 100644 --- a/include/xo/expression2/detail/IExpression_Any.hpp +++ b/include/xo/expression2/detail/IExpression_Any.hpp @@ -2,7 +2,7 @@ * * Generated automagically from ingredients: * 1. code generator: - * [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] + * [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet] * arguments: * --input [idl/Expression.json5] * 2. jinja2 template for abstract facet .hpp file: diff --git a/include/xo/expression2/IExpression_DConstant.hpp b/include/xo/expression2/detail/IExpression_DConstant.hpp similarity index 91% rename from include/xo/expression2/IExpression_DConstant.hpp rename to include/xo/expression2/detail/IExpression_DConstant.hpp index b08d8814..61b92e12 100644 --- a/include/xo/expression2/IExpression_DConstant.hpp +++ b/include/xo/expression2/detail/IExpression_DConstant.hpp @@ -6,13 +6,14 @@ * arguments: * --input [idl/IExpression_DConstant.json5] * 2. jinja2 template for abstract facet .hpp file: - * [iface_facet_any.hpp.j2] + * [iface_facet_repr.hpp.j2] * 3. idl for facet methods * [idl/IExpression_DConstant.json5] **/ #pragma once +#include "Expression.hpp" #include "Expression.hpp" #include "DConstant.hpp" @@ -40,6 +41,8 @@ namespace xo { /** @defgroup scm-expression-dconstant-type-traits **/ ///@{ using TypeDescr = xo::scm::AExpression::TypeDescr; + using Copaque = xo::scm::AExpression::Copaque; + using Opaque = xo::scm::AExpression::Opaque; ///@} /** @defgroup scm-expression-dconstant-methods **/ ///@{ diff --git a/include/xo/expression2/detail/IExpression_DVariable.hpp b/include/xo/expression2/detail/IExpression_DVariable.hpp index b4186f55..6b9b702f 100644 --- a/include/xo/expression2/detail/IExpression_DVariable.hpp +++ b/include/xo/expression2/detail/IExpression_DVariable.hpp @@ -2,7 +2,7 @@ * * Generated automagically from ingredients: * 1. code generator: - * [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] + * [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet] * arguments: * --input [idl/IExpression_DVariable.json5] * 2. jinja2 template for abstract facet .hpp file: @@ -55,7 +55,7 @@ namespace xo { static TypeDescr valuetype(const DVariable & self) noexcept; // non-const methods - /** assign to valuetype member. Useful when scaffolding expressions **/ + /** assing to valuetype member. Useful when scaffolding expressions **/ static void assign_valuetype(DVariable & self, TypeDescr td) noexcept; ///@} }; @@ -63,4 +63,4 @@ namespace xo { } /*namespace scm*/ } /*namespace xo*/ -/* end */ +/* end */ \ No newline at end of file diff --git a/include/xo/expression2/detail/IExpression_Xfer.hpp b/include/xo/expression2/detail/IExpression_Xfer.hpp index 9f7356bc..fac8c541 100644 --- a/include/xo/expression2/detail/IExpression_Xfer.hpp +++ b/include/xo/expression2/detail/IExpression_Xfer.hpp @@ -2,7 +2,7 @@ * * Generated automagically from ingredients: * 1. code generator: - * [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] + * [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet] * arguments: * --input [idl/Expression.json5] * 2. jinja2 template for abstract facet .hpp file: diff --git a/include/xo/expression2/detail/RExpression.hpp b/include/xo/expression2/detail/RExpression.hpp index caf69fe0..4d717640 100644 --- a/include/xo/expression2/detail/RExpression.hpp +++ b/include/xo/expression2/detail/RExpression.hpp @@ -2,7 +2,7 @@ * * Generated automagically from ingredients: * 1. code generator: - * [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] + * [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet] * arguments: * --input [idl/Expression.json5] * 2. jinja2 template for abstract facet .hpp file: diff --git a/include/xo/expression2/symtab/ASymbolTable.hpp b/include/xo/expression2/symtab/ASymbolTable.hpp index 36d4c812..f0c6e10f 100644 --- a/include/xo/expression2/symtab/ASymbolTable.hpp +++ b/include/xo/expression2/symtab/ASymbolTable.hpp @@ -2,7 +2,7 @@ * * Generated automagically from ingredients: * 1. code generator: - * [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] + * [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet] * arguments: * --input [idl/SymbolTable.json5] * 2. jinja2 template for abstract facet .hpp file: diff --git a/include/xo/expression2/symtab/ISymbolTable_Any.hpp b/include/xo/expression2/symtab/ISymbolTable_Any.hpp index 6a119832..b642adb7 100644 --- a/include/xo/expression2/symtab/ISymbolTable_Any.hpp +++ b/include/xo/expression2/symtab/ISymbolTable_Any.hpp @@ -2,7 +2,7 @@ * * Generated automagically from ingredients: * 1. code generator: - * [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] + * [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet] * arguments: * --input [idl/SymbolTable.json5] * 2. jinja2 template for abstract facet .hpp file: diff --git a/include/xo/expression2/symtab/ISymbolTable_Xfer.hpp b/include/xo/expression2/symtab/ISymbolTable_Xfer.hpp index 2333bb05..3d5f7221 100644 --- a/include/xo/expression2/symtab/ISymbolTable_Xfer.hpp +++ b/include/xo/expression2/symtab/ISymbolTable_Xfer.hpp @@ -2,7 +2,7 @@ * * Generated automagically from ingredients: * 1. code generator: - * [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] + * [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet] * arguments: * --input [idl/SymbolTable.json5] * 2. jinja2 template for abstract facet .hpp file: diff --git a/include/xo/expression2/symtab/RSymbolTable.hpp b/include/xo/expression2/symtab/RSymbolTable.hpp index c72503cc..600ea4f8 100644 --- a/include/xo/expression2/symtab/RSymbolTable.hpp +++ b/include/xo/expression2/symtab/RSymbolTable.hpp @@ -2,7 +2,7 @@ * * Generated automagically from ingredients: * 1. code generator: - * [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] + * [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet] * arguments: * --input [idl/SymbolTable.json5] * 2. jinja2 template for abstract facet .hpp file: diff --git a/src/expression2/DConstant.cpp b/src/expression2/DConstant.cpp index fcb38f54..5bf98bfc 100644 --- a/src/expression2/DConstant.cpp +++ b/src/expression2/DConstant.cpp @@ -34,6 +34,16 @@ namespace xo { } } + DConstant * + DConstant::make(obj mm, + obj value) + { + void * mem = mm.alloc(typeseq::id(), + sizeof(DConstant)); + + return new (mem) DConstant(value); + } + TypeDescr DConstant::_lookup_td(typeseq tseq) { diff --git a/src/expression2/IExpression_DConstant.cpp b/src/expression2/IExpression_DConstant.cpp index 39f8135c..2d39c36d 100644 --- a/src/expression2/IExpression_DConstant.cpp +++ b/src/expression2/IExpression_DConstant.cpp @@ -11,7 +11,7 @@ * [idl/IExpression_DConstant.json5] **/ -#include "IExpression_DConstant.hpp" +#include "detail/IExpression_DConstant.hpp" namespace xo { namespace scm { diff --git a/src/expression2/IExpression_DVariable.cpp b/src/expression2/IExpression_DVariable.cpp index ca657c36..2b4a007b 100644 --- a/src/expression2/IExpression_DVariable.cpp +++ b/src/expression2/IExpression_DVariable.cpp @@ -2,7 +2,7 @@ * * Generated automagically from ingredients: * 1. code generator: - * [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] + * [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet] * arguments: * --input [idl/IExpression_DVariable.json5] * 2. jinja2 template for abstract facet .hpp file: