Giter Club home page Giter Club logo

s7pp's Introduction

s7pp

S7 Scheme based text preprocessor.

A simple text preprocessor that's designed to process text, evaluating s-expressions prefixed with an @ and run them via S7 and conver their output into text.

Usage

s7pp <input file> [output file]

Takes input file and processes it, writing output to output file or stdout

Building

Currently compilation is only setup for Windows/MSVC, you should be able to execute build.bat from a command line with cl.exe avaliable (i.e. x64 Native Tools Command Prompt for VS 2017), while compilation has not yet been tested on *nix, it should build anywhere that S7 and CRT is avaliable.

Expansion Rules

Prefixes

S-Expressions starting with @ will be evaluated and their results expanded in place.

S-Expressions starting with @; will be consumed and ignored as a comment.

S-Expressions starting with @@ will be evaulated and their results discarded, useful for defining variables, functions and loading other modules.

To emit a literal @ You may prefix it like ;@ XXX, Maybe Broken!

S-Expressions inside of literal double quoted strings are not expanded. XXX Reconsider?

S-Expression Expansion

When expanding an S-Expression after a @, it can be a symbol name, in which case the value is output, otherwise an S-Expression, with matching parenthesis ( and ) is consumed and passed to S7 to be evaluated, and then the output is written.

Output stringification

When the returned value is a literal string or character, it is simply printed directly into an output. Lists are recursively evaluated using the same rules, with non-character, non-whitespace elements interspersed with space characters, and any other s7 object is converted to a string using standard s7 string conversion rules (s7_object_to_c_string)

Examples

s7pp's People

Contributors

scatteredray avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.