-
Notifications
You must be signed in to change notification settings - Fork 0
DescribeGrammar delimiter mode
A main point in the development of the Describe language is to make the experience as seamless as possible for the user, and one of the main ways to achieve this is by eliminating the need to use escape sequences as much as possible. However, we need to escape angle brackets, because of tags <tagid>
, square brackets, because of links [http://someurl.net/]
, curly brackets because of decorators {color|red}
commas and semicolons - ,
, ;
, and this thing, called a production arrow - ->
. So how to avoid the need to escape those characters?
Version 1.0 of the Describe language utilizes the precompiler and the delimiter-mode
directive to do just that. Basically, we have two modes or flavors of the language - mono
mode and bi
mode. When we have simpler lists, we can write Describe code like usual in mono mode - we don't need to do anything, and we will need to escape the above-mentioned special characters as usual, but when we have more complex lists that might contain special characters we can toggle to bi mode, using the delimiter-mode directive. In bi mode, we need to double the brackets. We don't need to double the commas, semicolons and production arrows, in cases when we write those at the end of the line.
delimiter-mode directive
delimiter-mode <bi>
delimiter-mode <2>
delimiter-mode <mono>
delimiter-mode <1>
in "bi" mode brackets are doubled
<someid>
is <<someid>>
[http://someurl.net/]
is [[http://someurl.net/]]
{color|red}
is { {color|red} }
Bi mode - Commas, production arrows and semicolons does not need to be escaped because they are at the end of the lines.
directives ->
verbosity <<high>>,
namespace <<treeofall.public.unsorted>>,
delimiter-mode <<2>>;
unsorted <<rnode>> ->
Amount of sleep needed, by age
[[http://somelink.net]]
<<amountSleepNeeded>>,
christianity denominations
{{color|blue}} <<christianityDenominations>>,
World's Fastest Cars 2023 <<fastestCars2023>>,
personality types <<personalityTraits>>;
Bi mode - One liner.
directives ->
verbosity <<high>>,
namespace <<treeofall.public.unsorted>>,
delimiter-mode <<2>>;
unsorted <<rnode>> ->> sleep,, religion,, cars;
Home
Grammar How To
Compiler How To
CLI Compiler - How to
CLI Compiler - How to - help
CLI Compiler - How to - parse-file
CLI Compiler - How to - parse-folder
CLI Compiler - How to - encrypt-file
CLI Compiler - How to - decrypt-file
CLI Compiler - How to - recrypt-file
CLI Compiler - How to - encrypt-folder
CLI Compiler - How to - decrypt-folder
CLI Compiler - How to - recrypt-folder
API Compiler - How to
API Compiler - How to - Example 1
API Compiler - How to - Example 2
API Compiler - How to - Example 3
API Compiler - How to - Example 4
API Compiler - How to - Example 5
AWS Compiler - How to
AWS technical overview
API gateway configuration
output - low
output - medium
output - high
output - themes
Grammar - Lists
Grammar - Comments
Grammar - Links
Grammar - Decorators
Grammar - Tags
Grammar - More on Tags
Grammar - Directives
Grammar - Dot Notation
Grammar - Tildes
Grammar - Files
Deprecated - Slash Notation
Deprecated - Delimiter Mode
Describe Basics - v0.6
Describe Tags - v0.7
Describe Links - v0.8
Describe Decorators - v0.9
Describe Lines - v1.0
Describe Doubles - v1.1