{"id":333,"date":"2013-08-07T09:15:28","date_gmt":"2013-08-07T07:15:28","guid":{"rendered":"https:\/\/altarica.labri.fr\/wp\/?page_id=333"},"modified":"2013-08-08T08:44:36","modified_gmt":"2013-08-08T06:44:36","slug":"altarica-basics","status":"publish","type":"page","link":"https:\/\/altarica.labri.fr\/wp\/?page_id=333","title":{"rendered":"AltaRica: Basics"},"content":{"rendered":"<p>An AltaRica description is a list of declarations of <a title=\"AltaRica : Domains\" href=\"https:\/\/altarica.labri.fr\/wp\/?page_id=355\">domains<\/a>, <a title=\"AltaRica: Constants\" href=\"https:\/\/altarica.labri.fr\/wp\/?page_id=358\">constant values<\/a> and <a title=\"AltaRica : Leaf nodes\" href=\"https:\/\/altarica.labri.fr\/wp\/?page_id=360\">nodes<\/a>. As a rule of thumb in AltaRica, an object can not be used before its declaration.<\/p>\n<h1>Reserved words and symbols<\/h1>\n<p>The following words and punctuation symbols are reserved by the AltaRica language:<\/p>\n<ul>\n<li>Reserved keywords:\n<pre>and assert bool case const domain edon else event extern false \r\nflow if imply init integer max min mod node not or param param_set \r\nsig  sort state struct sub sync tcurts then trans true<\/pre>\n<\/li>\n<li>Reserved symbols:\n<pre>? |-\u00a0 -&gt; { } !=\u00a0 &lt;= &gt;=\u00a0 &lt; &gt; = :=\u00a0 | &amp;\u00a0 =&gt; ; , . ( ) [ ] + - * ~ \/<\/pre>\n<\/li>\n<\/ul>\n<p>The AltaRica language is case insensitive for AltaRica keywords.<\/p>\n<h1>Comments<\/h1>\n<p>C\/C++ comment styles are permitted; below are some examples:<\/p>\n<pre>1 \/* a C like comment on one line *\/\r\n2\r\n3 \/* Another comment.\r\n4\u00a0 * Note that C comments cannot be nested\r\n5\u00a0 *\/\r\n6\r\n7 \/\/ This is a C++ like comment. It starts with the two backslashes\r\n8 \/\/ and terminates at the end of the line<\/pre>\n<h1>Identifiers<\/h1>\n<p>The language supports two kinds of identifiers:<\/p>\n<ul>\n<li>Either the ones used in programming languages (except that &#8216; and ^ characters are allowed) i.e. those matching the following regexp: <code>[a-zA-Z_][a-zA-Z_0-9'^]*<\/code><\/li>\n<li>Or any string surrounded by single (&#8216;) or double (&#8220;) quotes: <code>'[^']+' | \"[^\"]*\"<\/code><\/li>\n<\/ul>\n<h1>Expressions<\/h1>\n<p>AltaRica permits many kind of expressions:<\/p>\n<ul>\n<li>Comparisons: <code>=<\/code>, <code>!=<\/code>, <code>&lt;=<\/code>, <code>&gt;=<\/code>, <code>&lt;<\/code>, <code>&gt;<\/code>, <code>min<\/code>, <code>max<\/code><\/li>\n<li>Arithmetic operations: <code>+<\/code>, <code>*<\/code>, <code>\/<\/code>, <code>mod<\/code><\/li>\n<li>Boolean operators: <code>and<\/code> (<code>&amp;<\/code>), <code>or<\/code> (<code>|<\/code>), <code>not<\/code> (<code>~<\/code>), <code>imply<\/code> (<code>=&gt;<\/code>)<\/li>\n<li>If-Then-Else: <code>(<\/code><em>a<\/em> <code>?<\/code> <em>b<\/em> <code>:<\/code> <em>c<\/em><code>)<\/code> or equivalently <code>(if <\/code><em>a<\/em> <code>then<\/code> <em>b<\/em> <code>else<\/code> <em>c<\/em><code>)<\/code><\/li>\n<li>Case statement: <code>case { <\/code><em>cond1<\/em><code>:<\/code><em> value1<\/em><code>,<\/code> <em>cond2<\/em> <code>:<\/code> <em>value2<\/em><code>, ...,<\/code> <em>condn<\/em> <code>:<\/code> <em>valuen<\/em><code>, else<\/code> <em>defvalue<\/em><code> }<\/code><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>An AltaRica description is a list of declarations of domains, constant values and nodes. As a rule of thumb in AltaRica, an object can not be used before its declaration. Reserved words and symbols The following words and punctuation symbols &hellip; <a href=\"https:\/\/altarica.labri.fr\/wp\/?page_id=333\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":25,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-333","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/altarica.labri.fr\/wp\/index.php?rest_route=\/wp\/v2\/pages\/333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/altarica.labri.fr\/wp\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/altarica.labri.fr\/wp\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/altarica.labri.fr\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/altarica.labri.fr\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=333"}],"version-history":[{"count":14,"href":"https:\/\/altarica.labri.fr\/wp\/index.php?rest_route=\/wp\/v2\/pages\/333\/revisions"}],"predecessor-version":[{"id":473,"href":"https:\/\/altarica.labri.fr\/wp\/index.php?rest_route=\/wp\/v2\/pages\/333\/revisions\/473"}],"up":[{"embeddable":true,"href":"https:\/\/altarica.labri.fr\/wp\/index.php?rest_route=\/wp\/v2\/pages\/25"}],"wp:attachment":[{"href":"https:\/\/altarica.labri.fr\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}