next up previous index
Next: Operators Up: Syntax Previous: Formal definition of clause   Index

Subsections


Syntax Differences between ECLiPSe and other Prologs

Properties of ECLiPSe

Some particularities exist in the default syntax of ECLiPSe. Most of these properties can be configured and are in fact changed by the compatibility packages.


Changing the Parser behaviour

Some of these properties can be changed by choosing one of the following syntax_options. The following options exist:
blanks_in_nil
allow blanks between the brackets in [].
doubled_quote_is_quote
parse a pair of quotes within a quoted item as one occurrence of the quote within the string. If this option is off (the default), consecutive string-quoted and list-quoted items are parsed as a single (concatenated) item, and consecutive quoted atoms are parsed as consecutive atoms.
limit_arg_precedence
do not allow terms with a precedence higher than 999 as structure arguments, unless parenthesised.
nested_comments
allow bracketed comments to be nested.
nl_in_quotes
allow newlines to occur inside quotes.
no_blanks
do not allow blanks between functor an opening parenthesis
iso_escapes
ISO-Prolog compatible escape sequences within strings and atoms.
iso_base_prefix
allow binary, octal or hexadecimal numbers to be written with 0b, 0o or 0x prefix respectively, and disallow the base'number notation.
$VAR
terms of the form '$VAR'(N) are printed in a special way by all the predicates that obey operator declarations (i.e. write, writeq, print and partly printf). '$VAR'(0) is printed as A, '$VAR'(25) as Z, '$VAR'(26) as A1 and so on. When the argument is an atom or a string, just this argument is printed.
based_bignums
Allow base notation even to write integers longer than the wordsize (i.e. they are always positive).
Syntax option settings can be local to a module or exported, e.g.
:- local syntax_option(not nl_in_quotes).
:- export syntax_option(no_blanks).

next up previous index
Next: Operators Up: Syntax Previous: Formal definition of clause   Index
Warwick Harvey
2004-08-07