Changeset 2045


Ignore:
Timestamp:
Aug 1, 2006, 9:34:21 PM (14 years ago)
Author:
orlov
Message:
  • Improved format of messages for a user.
Location:
to-imperative/trunk/library/Debug
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/library/Debug/Debug.cc

    r2036 r2045  
    55#include <refal/Convert.hh>
    66#include <refal/Box.hh>
     7#include <refal/RF_Stack.hh>
    78#include <refal/Static.hh>
    89#include <refal/Table.hh>
    910#include <refal/StdIO.hh>
    10 #include <refal/RF_Stack.hh>
     11#include <refal/List.hh>
    1112
    1213namespace refal
     
    669670          Expr _ve_name (_v_deref__lsplit__nv2, 0, _v_len__name2);
    670671          Expr _ve_value (_v_deref__deref__lsplit__nv2, 0, _v_len__value2);
    671           RF_CALL (StdIO::Print, _c_14, /*void*/);
    672           RF_CALL (StdIO::Write, _ve_name, /*void*/);
    673           RF_CALL (StdIO::Print, _c_15, /*void*/);
     672          RF_CALL (StdIO::Print, (_c_15 + _ve_name + _c_14), /*void*/);
    674673          RF_CALL (StdIO::WriteLN, _ve_value, /*void*/);
    675674          goto _continue2;
     
    796795        goto _block1__branch2;
    797796      }
    798       RF_lsplit (_ve_arg, 0, _ve_fname, _v_lsplit__arg);
    799       for ( ; ; RF_iter(_ve_arg)++)
     797      RF_rsplit (_ve_arg, 0, _v_rsplit__arg, _ve_column);
     798      for ( ; ; RF_iter(_ve_arg)--)
    800799      {
    801800        {
     
    804803            goto _block1__branch2;
    805804          }
    806           if ((_v_lsplit__arg.get_len () < 2))
     805          if ((_v_rsplit__arg.get_len () < 2))
    807806          {
    808807            goto _block1__branch2;
    809808          }
    810           if (!_c_17.term_eq (_v_lsplit__arg, 0))
     809          if (!_c_17.term_eq (_v_rsplit__arg, (_v_rsplit__arg.get_len () - 1)))
    811810          {
    812811            goto _continue1;
    813812          }
    814           Expr _v_subexpr__lsplit__arg (_v_lsplit__arg, 1, (_v_lsplit__arg.get_len () - 1));
    815           RF_lsplit (_v_subexpr__lsplit__arg, 0, _ve_line, _v_lsplit__lsplit__arg);
    816           for ( ; ; RF_iter(_v_subexpr__lsplit__arg)++)
     813          Expr _v_subexpr__rsplit__arg (_v_rsplit__arg, 0, (_v_rsplit__arg.get_len () - 1));
     814          RF_rsplit (_v_subexpr__rsplit__arg, 0, _v_rsplit__rsplit__arg, _ve_line);
     815          for ( ; ; RF_iter(_v_subexpr__rsplit__arg)--)
    817816          {
    818817            {
    819               if (!RF_iter(_v_subexpr__lsplit__arg))
    820               {
    821                 goto _continue1;
    822               }
    823               uintptr_t _v_len1 = _v_lsplit__lsplit__arg.get_len ();
     818              if (!RF_iter(_v_subexpr__rsplit__arg))
     819              {
     820                goto _continue1;
     821              }
     822              uintptr_t _v_len1 = _v_rsplit__rsplit__arg.get_len ();
    824823              uintptr_t _v_len2 = 1;
    825824              if ((_v_len1 < _v_len2))
     
    827826                goto _continue1;
    828827              }
    829               uintptr_t _v_len__column = (_v_len1 - _v_len2);
    830               if (!_c_17.term_eq (_v_lsplit__lsplit__arg, 0))
     828              uintptr_t _v_len__fname = (_v_len1 - _v_len2);
     829              if (!_c_17.term_eq (_v_rsplit__rsplit__arg, _v_len__fname))
    831830              {
    832831                goto _continue2;
    833832              }
    834               Expr _ve_column (_v_lsplit__lsplit__arg, 1, _v_len__column);
     833              Expr _ve_fname (_v_rsplit__rsplit__arg, 0, _v_len__fname);
    835834              Expr _v_To_m_Int1;
    836835              if (!RF_CALL (Convert::To_m_Int, _ve_line, _v_To_m_Int1))
     
    861860    uintptr_t _v_len___e__e_tmp_m_Debugrf_m_110_m_6 = (_v_len3 - _v_len4);
    862861    Expr _ve__e__e_tmp_m_Debugrf_m_110_m_6 (_ve_arg, 0, _v_len___e__e_tmp_m_Debugrf_m_110_m_6);
    863     RF_CALL (StdIO::PrintLN, _c_18, /*void*/);
     862    RF_CALL (StdIO::Print, _c_18, /*void*/);
    864863    Expr _v_Domain1;
    865864    RF_CALL (Table::Domain, Breakpoints, _v_Domain1);
     
    909908    Expr _v_Domain1;
    910909    RF_CALL (Table::Domain, Break_m_Funcs, _v_Domain1);
    911     RF_CALL (StdIO::WriteLN, _v_Domain1, /*void*/);
     910    Expr _v_Concat1;
     911    RF_CALL (List::Concat, _v_Domain1, _v_Concat1);
     912    RF_CALL (StdIO::WriteLN, _v_Concat1, /*void*/);
    912913  }
    913914_block1: {}
     
    954955    Expr _v_Domain1;
    955956    RF_CALL (Table::Domain, Break_m_Funcs, _v_Domain1);
    956     RF_CALL (StdIO::WriteLN, _v_Domain1, /*void*/);
     957    Expr _v_Concat1;
     958    RF_CALL (List::Concat, _v_Domain1, _v_Concat1);
     959    RF_CALL (StdIO::WriteLN, _v_Concat1, /*void*/);
    957960  }
    958961_block1: {}
     
    965968  RF_CALL (Table::Bind, (Ops, _c_27, _c_28), /*void*/);
    966969  RF_CALL (Table::Bind, (Ops, _c_29, _c_30), /*void*/);
    967   RF_CALL (Table::Bind, (Ops, _c_14, _c_31), /*void*/);
     970  RF_CALL (Table::Bind, (Ops, _c_15, _c_31), /*void*/);
    968971  RF_CALL (Table::Bind, (Ops, _c_32, _c_33), /*void*/);
    969972  RF_CALL (Table::Bind, (Ops, _c_34, _c_35), /*void*/);
     
    13171320  _c_12 = Expr::create<Word>("[var-name | /*empty*/] prints value of `var-name` | all variables");
    13181321  _c_13 = Expr::create<Word>("No variable with name ");
    1319   _c_14 = Char::create_expr (L".");
    1320   _c_15 = Char::create_expr (L" : ");
     1322  _c_14 = Char::create_expr (L" : ");
     1323  _c_15 = Char::create_expr (L".");
    13211324  _c_16 = Expr::create<Word>("[file-name line column] sets breakpoint at specified position");
    1322   _c_17 = Expr (_c_15, 0, 1);
     1325  _c_17 = Expr (_c_14, 0, 1);
    13231326  _c_18 = Expr::create<Word>("Breakpoints: ");
    13241327  _c_19 = Expr::create<Word>("[file-name line column] removes breakpoint from specified position");
  • to-imperative/trunk/library/Debug/refal/Debug.rf

    r2036 r2045  
    11// $Id$
    22
    3 $use Apply Arithm Box Compare Convert "RF_Stack" Static StdIO Table;
     3$use Apply Arithm Box Compare Convert List "RF_Stack" Static StdIO Table;
    44
    55$table Break-Funcs Breakpoints Ops;
     
    8484    /*empty*/ = {
    8585      env : e (e.name (e.value)) e,
    86         <Print '.'> <Write e.name> <Print ' : '> <WriteLN e.value>,
     86        <Print '.'e.name' : '> <WriteLN e.value>,
    8787        $fail;;
    8888    };
     
    105105  e.arg : {
    106106    Help = <PrintLN "[file-name line column] removes breakpoint from specified position">;
    107     e.fname' 'e.line' 'e.column,
     107    $r e.fname' 'e.line' 'e.column,
    108108      <Unbind &Breakpoints e.fname <To-Int e.line> <To-Int e.column>>,
    109109      $fail;
    110     e = <PrintLN "Breakpoints: "> <WriteLN <Domain &Breakpoints>>;
     110    e = <Print "Breakpoints: "> <WriteLN <Domain &Breakpoints>>;
    111111  };
    112112
     
    119119      <Bind &Break-Funcs (<To-Word v.fname>) ()>,
    120120      $fail;
    121     e = <Print "Break at functions: "> <WriteLN <Domain &Break-Funcs>>;
     121    e = <Print "Break at functions: "> <WriteLN <Concat <Domain &Break-Funcs>>>;
    122122  };
    123123
     
    131131      <Unbind &Break-Funcs <To-Word v.fname>>,
    132132      $fail;
    133     e = <Print "Break at functions: "> <WriteLN <Domain &Break-Funcs>>;
     133    e = <Print "Break at functions: "> <WriteLN <Concat <Domain &Break-Funcs>>>;
    134134  };
    135135
Note: See TracChangeset for help on using the changeset viewer.