| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| vandalix.tar.bz2 | 2015-03-12 | 172.0 kB | |
| README | 2014-12-02 | 17.5 kB | |
| vxrpc.tar.bz2 | 2012-07-23 | 136.8 kB | |
| Totals: 3 Items | 326.3 kB | 0 |
The vandalix.tar.bz2 contains latests sources for the framework.
Some description of the API is available in the Help forum. The
package contains more detailed information.
The file vxrpc.tar.bz2 contains small application providing RPC
using Vandalix. The application allows signing of code to be
executed with user's RSA key, setting the keyword for encrypting
sensitive data and different access levels for users.
Note, application uses older version of Vandalix. It is created
only as an example of what is possible.
To get the sources from (read-only) git repository use
git clone git://git.code.sf.net/p/vandalix/code vandalix-code
The syntax of the Vandalix code shall follow these rules:
# structure of Vandalix program
/program/ ::= ( user <string-obj> signature? <string-obj> )? code? <vx-block>
<vx-block> ::= <vx-expression>*
# If desired, code can be signed using private RSA key of
# some user. The name of the user must be given after
# keyword 'user'. The signature - after 'signature'.
# The signature must apply to the code starting from
# first non-space character after the signature.
# So, when signing make sure that there are no spaces or
# comments at the start of the code.
# Use of invalid signature results in syntax error.
# The access level needed to execute the code is
# compared with the one given to the user. If they
# don't match, syntax error is produced.
# List of object types with categories to which they belong.
# SrcFile -> <src-file-obj>
# DataDst -> <data-dst-obj>
# Unsigned -> <uint-obj>
# Integer -> <int-obj>
# Boolean -> <bool-obj>
# StrList -> <str-list-obj>
# String -> <string-obj>
# expression outputting space-separated strings
<vx-expression> ::= Sys.echo '(' <string-obj> * ')'
# output is terminated with EOL.
# All text goes to stdout.
# expression directing data into some sink
<vx-expression> ::= Stream.to <data-dst-obj> '(' <data-src-obj>* ')'
# If destination is NoObject, then nothing is done
# If source is NoObject, then it is ignored
# conditional execution of expressions
<vx-expression> ::= if <bool-obj> ( then )? <vx-block> ( else <vx-block> )? fi
# expression initiating jump to label
<vx-expression> ::= goto /name/
# /name/ ::= is something accepted by current names manager
# it corresponds to the label in the code. The label must be
# in the same block or in containing block of code.
# expression declaring label
<vx-expression> ::= /name/ ':'
# Labels must be unique. The labels can't preceed jumps.
# expression representing block of code
<vx-expression> ::= '{' <vx-block> '}'
# The block is actually a loop that is repeated only once
# expression aborting current loop
<vx-expression> ::= break
# This expression can be used only inside of the loops.
# It forces the code to jump to the first expression
# following the loop.
# expression aborting current iteration of the loop
<vx-expression> ::= next
# This expression can be used only inside of the loops.
# It forces the code to jump to the next iteration
# of the loop.
# Create new function type.
<vx-expression> ::= Function.type /name/ ( returns /type/ )? ( using '(' /type/ * ')' )?
# /name/ ::= is something accepted by current names manager
# this name shall be used as name space for operations that
# create and call functions. It should not conflict with
# existing types. It will be available for current parsing.
# /type/ ::= is name of any currently available type.
# First type indicates type of object returned by function.
# Subsequent types indicate types of arguments.
# Note, function types can also be used here.
# This expression is executed at parsing time, so all subsequent
# expressions can use new type name.
# The new type shall have following operations available:
# 1. Create function object using following syntax:
# NewType.new (input /arg-names/)? (captures /var-names/)? code <vx-block> end
# /arg-names/ are any unused names for arguments.
# List is space-separated.
# The presence of arguments depends on function type.
# /obj-names/ are names for variables outside of
# function body. Normally, function can't access
# variables declared outside of it, capturing allows to
# import them there. List is comma-separated.
# Created function can be attached to some variable.
# 2. obtaining from variables
# 3. calling functions
# /return-type/ ::= NewType.call '(' /func-obj/ (with /args/)? ')'
# Functions not returning anything shall be available as
# expressions.
# expression declaring variable of some type.
<vx-expression> ::= /type-name/ /var-name/ ('=' /object/)?
# /type-name/ is name of object type.
# /var-name/ is name to be used for variable.
# If the declaration is followed by '=', then
# new variable shall be attached to specified
# object. Otherwise it shall reference NoObject.
# expression associating name with object of appropriate type
<vx-expression> ::= /var-name/ '=' /object/
# /var-name/ is name of the variable.
# /object/ is object of appropriate category.
# If name was pointing to some object, then that
# object is detached from name and possibly released.
# Comments
<vx-comment> ::= '#' /any-char/ * /eol/
# /any-char/ is any character except for end of line
# /eol/ is byte with ASCII value corresponding to \n (10).
# White-spaces
<vx-comment> ::= /space-char/+
# /space-char/ is any character that isspace considers
# to be space
# Name of code signer
<string-obj> ::= Sys.user
# May produce NoObject.
# definition for constant string
<string-obj> ::= /quoted-string/
/quoted-string/ ::= '"' /escaped-char/* '"'
/quoted-string/ ::= "'" /escaped-char/* "'"
/quoted-string/ ::= 'q(' /delimited-char/* ')'
/quoted-string/ ::= 'q[' /delimited-char/* ']'
/quoted-string/ ::= 'q<' /delimited-char/* '>'
/quoted-string/ ::= 'q{' /delimited-char/* '}'
/quoted-string/ ::= 'q' /delimiter/ /delimited-char/* /delimiter/
/delimiter/ ::= [^[:alnum][:space:]_]
/escaped-char/ ::= '%' /hex-digit/ /hex-digit/ | /delimited-char/
/hex-digit/ ::= [0-9a-fA-F]
/delimited-char/ ::= Any character except for delimiter char.
# The string terminates at the first found string delimeter!
# This format can be used to pass arbitrary binary data
/quoted-string/ ::= %01 /1-byte-length/ [%00-%FF]
/quoted-string/ ::= %02 /2-byte-length/ [%00-%FF]
# first comes byte containing 1 or 2.
# then come 1 or 2 bytes in networking order containing length
# then come specified number of bytes of payload
# the length is considered to be unsigned
# converting signed integer to string
<string-obj> ::= Int.toStr '(' <int-obj> ( /base/ )? ')'
/base/ ::= [BODX]
# default /base/ value is D (decimal)
# B is binary (0 1)
# O is octal (0 - 7)
# X is hexadecimal (0 - 9 A-F )
# The 'NoObject' results in NoObject
# expression capturing data from some source into string object
<string-obj> ::= Str.capture '(' <data-src-obj>* ')'
# If source is NoObject, then it is ignored
# Size of captured data can not exceed 524288 bytes.
# In case of violation exception 7 is thrown.
# Obtain from variable object of type String
<string-obj> ::= /name/
# definition for boolean constants
<bool-obj> ::= Bool.true | Bool.false
# definition for boolean AND function
<bool-obj> ::= Bool.and '(' <bool-obj> <bool-obj>+ ')'
# Returns FALSE if any of its arguments is FALSE
# definition for boolean OR function
<bool-obj> ::= Bool.or '(' <bool-obj> <bool-obj>+ ')'
# returns TRUE if any of its arguments is TRUE
# definition for boolean NOT function
<bool-obj> ::= Bool.not <bool-obj>
# comparing values of type Int.
<bool-obj> ::= Int.ge '(' <int-obj> than ? <int-obj> ')'
# TRUE if first argument is greater than or equal to the second
<bool-obj> ::= Int.gt '(' <int-obj> than ? <int-obj> ')'
# TRUE if first argument is greater than the second
<bool-obj> ::= Int.le '(' <int-obj> than ? <int-obj> ')'
# TRUE if first argument is less than or equal to the second
<bool-obj> ::= Int.lt '(' <int-obj> than ? <int-obj> ')'
# TRUE if first argument is less than the second
# checking equality of values of type Int.
<bool-obj> ::= Int.eq '(' <int-obj> to ? <int-obj> + ')'
# if more than 2 arguments are given, the function
# returns TRUE if any of the arguments is equal to the
# first one
# checking inequality of values of type Int.
<bool-obj> ::= Int.ne '(' <int-obj> to ? <int-obj> + ')'
# if more than 2 arguments are given, the function
# returns TRUE if none of the arguments is equal to the
# first one
# comparing values of type Str.
<bool-obj> ::= Str.ge '(' <string-obj> than ? <string-obj> ')'
# TRUE if first argument is greater than or equal to the second
<bool-obj> ::= Str.gt '(' <string-obj> than ? <string-obj> ')'
# TRUE if first argument is greater than the second
<bool-obj> ::= Str.le '(' <string-obj> than ? <string-obj> ')'
# TRUE if first argument is less than or equal to the second
<bool-obj> ::= Str.lt '(' <string-obj> than ? <string-obj> ')'
# TRUE if first argument is less than the second
# checking equality of values of type Str.
<bool-obj> ::= Str.eq '(' <string-obj> to ? <string-obj> + ')'
# if more than 2 arguments are given, the function
# returns TRUE if any of the arguments is equal to the
# first one
# checking inequality of values of type Str.
<bool-obj> ::= Str.ne '(' <string-obj> to ? <string-obj> + ')'
# if more than 2 arguments are given, the function
# returns TRUE if none of the arguments is equal to the
# first one
# Obtain from variable object of type Boolean
<bool-obj> ::= /name/
# changing sign of an integer
<int-obj> ::= '-' <int-obj>
# The 'NoObject' results in NoObject
# accept unsigned integers as signed ones
<int-obj> ::= <uint-obj>
# The 'NoObject' results in NoObject
# Obtain from variable object of type Integer
<int-obj> ::= /name/
# definition for constant integer
<uint-obj> ::= /hex/ | /octal/ | /decimal/ | /bits/
# decimal integer
/decimal/ ::= [1-9] [0-9]*
# hexadecimal integer
/hex/ ::= '0' ('x' | 'X') [0-9a-fA-F]+
# integer as sequence of bits
/hex/ ::= '0' ('b' | 'B') [01]+
# octal integer
/octal/ ::= '0' [0-7]*
# integer is stored in 64 bits
# integers exceeding this limit are ignored.
# convert integer to unsigned one
<uint-obj> ::= '+' <int-obj>
# The 'NoObject' results in NoObject
# Negative ones become positive (ie. -2 => 2)
# Obtain length of string
<uint-obj> ::= Str.length <string-obj>
# length is expressed in number of bytes, not characters!
# The 'NoObject' results in NoObject
# Obtain size of file
<uint-obj> ::= SrcFile.size <src-file-obj>
# If there's any error then exception 6 is
# thrown. Returns NoObject if gets NoObject.
# Obtain from variable object of type Unsigned
<uint-obj> ::= /name/
# use specified file as source of data
<data-src-obj> ::= <src-file-obj>
# Errors during reading result in exception 6
# make stream by placing specified separator between strings
<data-src-obj> ::= Str.merge <str-list-obj> using? <string-obj>
# The resulting stream shall have specified separator
# between all elements.
# Note, NoObjects in the list are simply ignored so
# that list containing only NoObjects results in
# empty string passed to the output.
# use list of strings as stream
<data-src-obj> ::= <str-list-obj>
# decode base64 encoded input stream
<data-src-obj> ::= Base64.decode <data-src-obj>
# throws exception 1 if text contains invalid data
# returns empty input if gets empty input
# returns NoObject if gets NoObject
# encode input stream using Mime-Base64
<data-src-obj> ::= Base64.encode <data-src-obj>
# returns empty input if gets empty input
# returns NoObject if gets NoObject
# Limit maximum number of bytes obtained from stream.
<data-src-obj> ::= Stream.limit <uint-obj> <data-src-obj>
# returns empty input if limit is 0 or input is empty.
# returns NoObject if gets NoObject as stream.
# applies no limit if limit is NoObject.
# Skip specified number of bytes from stream.
<data-src-obj> ::= Stream.skip <uint-obj> <data-src-obj>
# does not do anything if skip size is 0 or NoObject.
# returns NoObject if gets NoObject as stream.
# Destination for data streams
<data-dst-obj> ::= Sys.stdout
# Destination for data streams
<data-dst-obj> ::= Sys.stderr
# Treat specified file as destination for data
<data-dst-obj> ::= File.append <string-obj>
# Failure to open specified file results
# in exception 6. The exception also happens
# if file name is NoObject.
# Data is appended to specified file. Linebuffering
# is used. If file does not exist, it is created.
# Only users that have security bit 7 set
# can use this expression
# Treat specified file as destination for data
<data-dst-obj> ::= File.store <string-obj>
# Failure to open specified file results
# in exception 6. The exception also happens
# if file name is NoObject.
# Full buffering is used. Old file is erased.
# If file does not exist, it is created.
# Only users that have security bit 1 set
# can use this expression
# Obtain from variable object of type DataDst
<data-dst-obj> ::= /name/
# define list of strings
<str-list-obj> ::= '(' <string-obj>* ')' | <string-obj>
# Obtain from variable object of type StrList
<str-list-obj> ::= /name/
# Treat specified file as source of data
<src-file-obj> ::= SrcFile.new <string-obj>
# Failure to open specified file results
# in exception 6. The exception also happens
# if file name is NoObject.
# Only users that have security bit 0 set
# can use this expression
# Obtain from variable object of type SrcFile
<src-file-obj> ::= /name/