XL (programming language): Difference between revisions

Content deleted Content added
warning: two pls with same name!
m dab literal and variable
Line 27:
The parse tree consists of 7 node types, 4 [[leaf node]] types (integer, real, text and symbol) and 3 [[internal node]] types (infix, prefix and block).
 
* ''integer'' nodes represent an integer [[literal (computer science)|literal]], such as <code>2</code>. The <code>#</code> sign can be used to specify a base other than 10, as in (<code>2#1001</code>). A separating underscore can be used to improve readability, as in <code>1_000_000</code>.
* ''real'' nodes represent non-integral numbers, such as <code>2.5</code>. Based-notations and separators can be used, as for integer nodes, for example <code>16#F.FFF#E-10</code> is a valid real literal.
* ''text'' nodes represent textual contents. They are normally surrounded by simple or double quotes, like <code>"Hello"</code> or <code>'a'</code>, but the syntax file can be used to add other separators, including for multi-line textual contents.
Line 65:
X := {Differentiate} d(sin(omega * T) * exp(-T/T0)) / dT
 
The XL1 phase contains a large set of plug-ins, notably <code>XLSemantics</code>, that provide common abstractions like [[subroutine]], [[data type]] and [[variable (programming)|variable]] [[declaration (computer science)|declaration]] and [[definition]], as well as basic [[structured programming]] statements, like conditionals or loops.
 
=== Type System ===