Introduction

Lineparse is a new configuration file format used currently in two places in AllegroGraph. It is a very simple general purpose format that doesn't have strict whitespace rules unlike formats like YAML.

Syntax

A lineparse file consists of a sequence of lines which either specify the beginning of a section or specify an item within the current section.

Each use of a lineparse file as a configuration file has its own rules about what sections are allowed and what items are allowed in a each section and what arguments are permitted for each item.

The file consists of a sequence of lines, each ended by a newline or a semicolon or EOF. After a semicolon the following characters constitute another line (thus a single physical line may contain multiple lineparse lines).

The character # starts a comment and any characters (including semicolons and double quotes) following a # up to a newline or an EOF are part of the comment and ignored when processing the lineparse file.

These characters have a special meaning:

This is similar to the shell processing of arguments but much more limited.

One difference from Lisp is that "a b c"^^xsd:string is a single word and identical to "a b c^^xsd:string". This is similar to how the shell parses arguments.

In lineparse format each line contains zero or more whitespace separated words.

Example:

foo arg1 arg2; bar  # comment text which may include ;, # or " but not newline 

is two lineparse lines and is the same as

foo arg1 arg2; bar 

or

foo arg1 arg2  
bar  

Double quotes or a backslash are used to escape otherwise special characters

So the holiday item below

holiday "Christmas Eve" Christmas New\ Year's\ Day 

has three arguments:

Christmas Eve  
Christmas  
New Year's Day  
 

It's possible to have an empty string as an argument

 foo   a b\ c "" d      e 

has arguments

a  
b c     <-- string with embedded whitespace  
<empty string>  
d  
e  

Currently lineparse is used to define Fedshard definitions and AllegroGraph users and roles.

Lineparse is not used in the agraph.cfg file. Its format is unchanged.