Coder Social home page Coder Social logo

chaojunzhou / esstee Goto Github PK

View Code? Open in Web Editor NEW

This project forked from knordman/esstee

0.0 0.0 0.0 635 KB

Structured Text (ST) Interpreter

License: GNU General Public License v3.0

Shell 0.26% C 93.62% Objective-C 0.09% Smalltalk 0.51% Makefile 0.44% HTML 0.65% Yacc 3.12% Lex 1.32%

esstee's Introduction

esstee

Build Status

esstee is an interpreter written in C (GNU C99), currently under work, for the Structured Text (ST) programming language. Structured Text is one of the five languages defined in the IEC-61131-3 standard, and used a lot in the automation industry.

The aim of esstee is to provide a, "free as in freedom", platform for building better testing and debug tools for ST applications.

esstee is licensed under GPLv3. Besides Bison and Flex, esstee has no external dependencies besides the header libraries included in the source. Compiling has so far only been tested under Debian, but should work without problems in any Linux distro.

Quick Start

The first milestone of esstee is to provide a library that allows ST syntax to be parsed into a representation which can be stepped/run. The public interface to the library is defined in src/esstee/esstee.h.

Currently, the parsing step of the library is complete (Flex and Bison grammar). In addition there is support for types (elementary, derived and complex), all statements and expressions, however it is not yet properly tested (automatic integration tests not ready), and should be considered as under work.

A simple test program using the library interface (and building all the current code) can be built by;

make build/program-tester

The program parses ST syntax from a file, then executes possible "pre" queries on the runnable representation, runs N cycles and finally executes possible "post" queries. A query is either a variable reference or an assignment. The program takes the following options:

  • file the file to parse
  • program the PROGRAM in the file that is to be run (a file may contain multiple programs)
  • pre-run-queries the queries to run right after parsing
  • run-cycles number of cycles to run (default 1)
  • post-run-queries the queries to run after the cycles have been run

An example:

build/program-tester --file="src/tests/programs/example.ST" --program="testprgm" --pre-run-queries="testprgm.a:=10*5+1" --post-run-queries="testprgm.a" 

Development

A rudimentary ticket list exists in utils/todos-5.1.2016.

esstee's People

Contributors

knordman 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.