///////////////////////////////////////////////////////////////////////////////
//                             Lisaac Library                                //
//                                                                           //
//                   LSIIT - ULP - CNRS - INRIA - FRANCE                     //
//                                                                           //
//   This program is free software: you can redistribute it and/or modify    //
//   it under the terms of the GNU General Public License as published by    //
//   the Free Software Foundation, either version 3 of the License, or       //
//   (at your option) any later version.                                     //
//                                                                           //
//   This program is distributed in the hope that it will be useful,         //
//   but WITHOUT ANY WARRANTY; without even the implied warranty of          //
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           //
//   GNU General Public License for more details.                            //
//                                                                           //
//   You should have received a copy of the GNU General Public License       //
//   along with this program.  If not, see <http://www.gnu.org/licenses/>.   //
//                                                                           //
//                     http://isaacproject.u-strasbg.fr/                     //
///////////////////////////////////////////////////////////////////////////////
Section Header
  
  + name    := Expanded TRUE;


  - copyright   := "2003-2005 Jérome Boutet, 2003-2007 Benoit Sonntag";

  - comment := "TRUE object";

  - type    := `char`;
  - default := TRUE;
  
Section Inherit
  
  - parent_boolean:BOOLEAN := BOOLEAN;
  
Section Public
  
  //
  // Conditional :
  //
  
  - if_true block:BLOCK  <-
  (
    block.value;
  );
  
  - if_false block:BLOCK;
  
  - if true_block:BLOCK else false_block:BLOCK <-
  (
    true_block.value;
  );
  
  - if_true true_block:BLOCK else false_block:BLOCK <-
  (
    true_block.value;
  );
  
  - if_false true_block:BLOCK else false_block:BLOCK <- 
  (
    false_block.value;
  );
  
  - if true_block:BLOCK :BOOLEAN <-
  (
    true_block.value;
    TRUE
  );
  
  - elseif cond:BLOCK then block:BLOCK :BOOLEAN <- TRUE;
  
  - elseif cond:BLOCK then block:BLOCK else block_else:BLOCK;
  
  //
  // Binary operator :
  //
  
  - '=='  Right 60 other:BOOLEAN :BOOLEAN <- other;
  
  - '!==' Right 60 other:BOOLEAN :BOOLEAN <- ! other;
  
  - '||'  Left 10  other:BLOCK   :BOOLEAN <- TRUE;   // or else
  
  - '&&'  Left 20  other:BLOCK   :BOOLEAN <- other.value;  // and then
  
  - '|'   Left 10  other:BOOLEAN :BOOLEAN <- TRUE;  // or
  
  - '&'   Left 20  other:BOOLEAN :BOOLEAN <- other; // and
  
  - '^'  Left 10  other:BOOLEAN :BOOLEAN <- ! other;
  
  - '->'  Right 25 other:BOOLEAN :BOOLEAN <- other;

  - '->>' Right 25 other:BLOCK  :BOOLEAN <- other.value;
  
  - '=>' s:ABSTRACT_STRING <-
  (
    s.print;
    `while (1)`;
  );
  
  //
  // Prefix operator
  //
  
  - '!':BOOLEAN <- FALSE;
  
  //
  // Conversion
  //
  
  - to_string:STRING       <- "1".to_string; // BSBS: A revoir ...
  
  - to_integer:INTEGER     <- 1;
  
  - to_character:CHARACTER <- '1';







