Double bar

Under construction.

Motivation

Definition

A partial double quoted list is a partial list (3.125).

If the Prolog flag double_quotes has a value chars, a double quoted list token dql containing L double quoted characters is a partial list l with L elements, where the N-th element of the partial list is the one-char atom whose name is the N-th double quoted character of dql.

If the Prolog flag double_quotes has a value codes, a double quoted list token dql containing L double quoted characters is a partial list l with L elements, where the N-th element of the partial list is the collating sequence integer of the N-th double quoted character of dql.

          term = double quoted list, bar, bar, term ;
Abstract:    l   ccl
Priority:    0   0                               0
Condition:   Prolog flag double_quotes has a value chars or codes.

Examples

?- L = "abc"||K.
   L = [a,b,c|K].

?- L = "a"| |"b"| |"c".
   L = [a,b,c].

?- L = "a"| % multiple lines
      |"b"| /* with comments */
      |"c".
   L = [a,b,c].

?- L = K||[].
   syntax_error(...).

?- L = ("a")||[].
   syntax_error(...).

?- L = ""||K.
   L = K.

Options

  1. only after double quotes (accepted)
  2. use only bar token instead of bar (rejected)
  3. priority 0
  4. for writing, activated with double_quotes(true) or double_bar(true)
  5. interference with max_depth

History

<1997: Added to Ciao by Daniel Cabeza
1997-04-16: Added to Ciao 0.2 supporting "string"||L
2025-03-17: Codification started
2025-06-02: WG17 rejects option 2; accepts option 1
2025-06-18: Added to Trealla
2025-06-19: Used in Trealla to abbreviate answer substitutions