This project provides a generic interface for GNU Octave with Terence Parr's popular StringTemplate V4 template engine; MATLAB is supported, too.
The concept is simple. An Octave script wraps your data in suitable Java collections, so that deeply nested data structures can be passed to the template engine just like that - and without the need for a compiled Java interface class, as it would when directly building on Octave's generic Java interface to access StringTemplate.
A major sample presents a simple compiler, which passes its entire parse tree as a single deeply structured data object to the template engine for code generation.
All you have to do is copying the wrapper script somewhere into your Octave search path and adjusting the Java class path such that the StringTemplate jar and all of your template files are found. Now, running the template expansion is one simple Octave command looking like:
txt=st4Render(groupFile, template, attribute, value, attrib2, val2, ..)

Features

  • Octave extension
  • M scripting
  • StringTemplate V4
  • Text processing
  • Code generation

Project Activity

See All Activity >

Follow StringTemplate-for-Octave

StringTemplate-for-Octave Web Site

nel_h2
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of StringTemplate-for-Octave!

Additional Project Details

Registered

2016-10-04