Dev/Config files/Details
General characteristics
A gfs file has the following general characteristics:
- Encoding is UTF-8 (without Byte Order Mark)
-
Line-endings should be
\n
not\r\n
.
-
There is support for
\r\n
, but for safety's sake, please use\n
.
-
Text is case-sensitive. There is a difference between
app
andAPP
.
Comments
Comments can be indicated by the conventional C comments of //
or /**/
. For example, any text between /*
and */
is ignored.
Whitespace
Whitespace is not significant. There is no difference between the following commands.
- no whitespace
app.wikis.get('en.wikipedia.org');
- multiple spaces (ASCII 32)
app . wikis . get ( 'en.wikipedia.org' ) ;
- spaces and new lines (ASCII 32 and ASCII 10)
app . wikis . get ( 'en.wikipedia.org' ) ;
Note that tabs (ASCII 9) and carriage returns (ASCII 13) are permitted but not recommended.
Quotes
-
Strings should be quoted. Quote characters are the apostrophe (
'
) or the quote ("
). Note that'
is often used. -
A special quote sequence of
<:['\n
and\n}':]>
is used to handle text with significant delimiters
-
For example, the following is identical to
app.wikis.get('en.wikipedia.org');
app.wikis.get( <:[' en.wikipedia.org ']:> );
- Note that this quote sequence allows processing a mixture of various syntax forms without escaping. This is especially useful for wiki text which can have elements of HTML and significant other symbols.
Booleans
Booleans can be indicated in different forms as per the following table:
Value | true | false |
Text (uppercase) |
'TRUE'
|
'FALSE'
|
Text (lowercase) |
'true'
|
'false'
|
Text (simple) |
'y'
|
'n'
|
Number |
1
|
0
|
Note that for brevity's sake, 'y'
and 'n'
will be used.
Integers
Integers can be indicated with or without quotes. Note that without quotes is recommended.
Integers can not include commas or decimal places. For example, 1,234
is not valid. Use 1234
instead.