Menu

Home

Vasily Verkovich

Reno

RElational NOtes is an extended human-readable data serialization format that is based upon relation notion. It was defined according inability of INI-file format to express data of various types, nesting structures, binary data. It represent all data as n-ary relations, where the basic relation block or string is a pair key- value. Key is statically typed name that can have values among string, integer, vector, tuple (field) types.
The whole string is a concise relation definition. Any other string or relation can refer to that relation comprising more complex structures. Example of simple reno config file:

MajorVersion=2
MinorVersion=23
BuildNumber=1234

Version=’MajorVersion.’MinroVersion.’BuildNumber # is equal to 2.23.1234
ProductIdentifier=TargetSoftwareName_’Version # value is TargetSoftwareName_2.23.1234

Format allows defining vectors, tables and structures.

Myiplist[]=123.123.123.123, 321.321.312.312, 333.333.222.333 # vector of 3 ip’s

Mydata[]=’myiplist,’Version # table with 2 records:

Thus, such format allows any data scheme definition in intuitively user-friendly manner with no typing overheads, no needless squares and extra punctuation.
The design goals of ReNo emphasize simple, extendable, well-readable syntax with no excessive symbols or characters. It should be pretty simple to define several key-value pairs in nowadays to configure a program or sending data across the Internet. XML format requires tree structure always with a lot of needless angle brackets. JSON requires using double quotes in any single situation that are wrapped in braces. ReNo is focused on defining simple pairs in a textual data format with strong support via Unicode for different human languages. It may be widely used for representation of arbitrary data structures with minimalistic look.

** Language Possibilities:**

Simple string definition

My_name= Vasily
My_address=Minsk, Belarus
My_hobby= Traveling, Software Developing and much much more…
My_home_page=reno.sourceforge.net

Vectors:

Myskills[]=C++,C,ReNo,bash
Numbers[]=1,2,3,4,56,77,88,99,0

Tables

Keywords[]=for,include,function
Sizes[]=5,10,15
Pages[]=p1, p2, p3

Table[]=’keywords,’sizes, ‘pages

As you can see, there is a computational mark = ‘ (single quote) that helps to evaluate expression right way. It tells interpreter to interpret the expression and find out its value.

Field access may be done as Table.sizes[1] or Table[1][1]

Math expression

Sum=’4+56+43 * 23
Total=’sum+45

Any number following by single quote switch interpreter to parse math expression, any identifier is considered as a target for evaluation.

Functions

Functions may be implemented in native intuitive manner like func() or func_with_arg(a,3,’sum)
Included functions are: int(arg), str(arg), eval(arg), size(arg), hash(arg), thisscripthash(), keyname(arg, arg)

Structures

MyObject[]= first string, second str, ‘field1=123, ‘f2=some data, ‘total=’123*345
That is equal to structure with first two unknown fileds and three named fields field1, f2, total
Accessing fileds may be done by: MyObject[0] and MyObject[1] for first and second unnamed field, MyObject[3] – for third filed ‘f2’.
Objects MyObject[0] and MyObject[1] are strings
Objects MyObject[2], MyObject[3], MyObject[4] are other objects which values can be accessed by MyObject.f2, MyObject.field1 and MyObject.total

This are notes from user perspective of view and they relate to each other.

Binary Data

Binary or multiline data can be defined with help of [/.] operator. Data begin starts right after equal sign and data end is denoted with [/.] operator. For example:
Bindata[/.]=anything including mytag but without squares: see next line
New line for multiline data
Last line, everything is in asci just for simplicity[/.]

Thus, data can occupy any number of lines be any size.

Other form for having binary characters is to use ‘\’ – backslash.

Myhexval=\x00f5\xff44\x7734

Any hex value is denoted by ‘\x’ and followed by 4 hex characters.

Some Tokens Definitions

ReNo format has special characters:
‘ – evaluation, Single Quote Mark (SQM)
\ - back slash for passing next character as is or switching interpreter
() – squares are used in math expressions and function calls
= equal sign
[] - square brackets
[/...] - multiline or binary data token
+-*/ - math operations
, - comma separate fields or vector elements
. – dot represent usual widely-used notion subobject or field access
Space – is a delimiter for identifier names, vectors elements,
a-z, A-Z, _ - identifier terminals

Identifier terminals are: a-z, A-Z, _ (underscore sign)

Functions and directives

Directives are implemented as functions that starts from beggining of the line.
include() – keyword for including other ReNo scripts
thisitems() - shows how many strings are in this scripts

Strings interpretation.

String as a value of any key is defined as data that starts after ‘=’ to the end of the line. Multiline strings must be wrapped with [/] operator. Formatted strings cab be defined as

Myfmtstr’=some data ‘somekey somedata

Where ‘somekey’ identifier will be evaluated into some value.

Myother_fmt_str’=my data is: \x000d, backslash \, ‘mytag() – one;

Only two non-terminals are valid in formatted string: Backslash and Single Quote Mark.

Having defined that it is visible that ReNo script language get rid user from typing too much brackets, many double quotes and pressing shift key for any key or operator. It reduces delivered data size, increases data integrity and allows defining data in declarative manner using very simple understandable method.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.