2017 © Pedro Peláez
 

library parser

image

contour/parser

  • Thursday, December 21, 2017
  • by jasekiw
  • Repository
  • 2 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Contour Interpreter

Introduction

This is a interpreter for the Contour project. It parses a basic function syntax for spreadsheets so that operations on tags can be performed., (*1)

Language Examples

Variable Declarations & Assignments

  • Variables can be assigned with arithmetical/boolean operators and expressions and also tag expressions to link to other cells on other sheets.
    • For an integer "num" with value 7:
  let num = 7
  • For a string "name" with value "Alice":, (*2)

    let name = "alice"
    
  • For a variable "cellVal" that links to the spreadsheet cell referenced as #(row, col) + 7, (*3)

    let cellVal = #(row, col) + 7
    

Conditional Statements :

  • Multiline for clear understanding
  • Can use boolean operators to link statements.
  • If statements can nest
  • For an if statement to see if the a string variable "name" is equal to "alice" and if so then set variable "correctName" to true and if not then set name to the value of cell (2, name) :, (*4)

    if (name = "alice")
    then let correctName = true
    else then let name = #(2, name)
    
  • Another example if statement. Notice how & and 'and' can be used in the exact same way and will produce the same result. The return keyword returns the result of the function : if (name = "alice" & age = 22) then return 1 else if (name = "bob" and age = 23) then return 2 else then return 0 If there are any errors in the function code then it is output to the user, giving the type of error and the location of it also.

The Versions

21/12 2017

dev-master

9999999-dev

  Sources   Download

The Development Requires

by Ben Hope
by Jason Gallavin

12/08 2016

dev-FunctionContainer

dev-FunctionContainer

  Sources   Download

The Development Requires

by Ben Hope
by Jason Gallavin

21/07 2016

dev-MultiTagParsing

dev-MultiTagParsing

  Sources   Download

The Development Requires

by Ben Hope
by Jason Gallavin