Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
minLevel3
outlinetrue
stylenone

Introduction

The FacetScript Language is one of the Atomic Domain Languages (ADLs).  It is a low level high performance scripting language natively executed by the TQLEngine without any additional compilation besides initial parsing.

General Syntax Considerations

FacetScript language as well as other domain-specific languages used in Atomiton TQLEngine stack is not bound to a specific syntax. Any syntax capable of expressing structure can be used with various TQL constructs, including Models, Model Facets and Queries.Although not required by all developers, FacetScript is a powerful language to ________to represent language constructs. Out of the box, both XML and JSON can be used.

Since JSON does not have a concept of attributes, it follows that compiler does not make any distinction between XML elements and attributes either. That is, any XML attribute can be given as an element and any element with text value can be given as an attribute. JSON also does not allow multiple entries of the same name so these must be expressed as JSON arrays.

Recommended syntax to use is XML.

Keyword Normalization

Before processing, parser will normalize tags to a canonic form so a variety of keyword styles are allowed in the input. For example keywords “NewFacetInstance”, “newfacetinstance”, “NeWfAcEtInStAnCe”, “new-facet-instance” all will be normalized and interpreted as a canonic camel-case “NewFacetInstance”. Note that Keyword Normalization only applies to reserved keywords of FacetScript.

However, this is only true for defined language constructs. Documents may also contain any number of arbitrary attributes (i.e. key-value pairs) possibly organized into nested/hierarchical structures for the purpose of template processing. Such attributes are not normalized as compiler has no knowledge of their meaning. Normally it does not cause any problems as such attributes are not shared across different files.