home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / CLISP-1.LHA / CLISP960530-sr.lha / tests / tread.tst < prev    next >
Encoding:
Text File  |  1996-04-15  |  47.5 KB  |  2,093 lines

  1.  ;       ***********************************************************
  2.  ;       *  ROSENMUELLER  143   Tel.340   TREAD.dat   04.11.1987   *
  3.  ;       ***********************************************************
  4. ;&----- Tread0.tst -------------------------------------------------------------
  5.  
  6.  ;      Testdaten aus den Beispielen der Sprachbeschreibung
  7.  ;
  8.  ;      Eingabe der Zahl 27 und der Liste (a b)         Seite 334
  9.  
  10.  
  11.      27
  12.    27
  13.      27.
  14.    27
  15.      #o33 
  16.    27
  17.        #x1b 
  18.    27
  19.        #b11011
  20.    27
  21.         #.(* 3 3 3)
  22.    27
  23.         81/3
  24.    27
  25.         '(A B)
  26.    (A B)
  27.         '(a b)
  28.    (A B)
  29.         '( a b )
  30.    (A B)
  31.         '(\A |B|)
  32.    (A B)
  33.  
  34.            '(|\A|
  35.            B
  36.         )
  37.    (A B)
  38.  
  39.  
  40.  ;      Test auf Gleichheit                             Seite 338
  41.         '|foo||bar| 
  42.    |foobar|
  43.        '|foobar|
  44.  
  45.    |foobar|
  46.  ;      Test auf Gleichheit
  47.         '|foo|bar|baz| 
  48.    |foo|BAR|baz|
  49.        '|fooBARbaz|
  50.  
  51.    |foo|BAR|baz|
  52.  ;      Test auf Ungleichheit
  53.  
  54.  
  55. (progn (unless (find-package '|foo| )(make-package '|foo|)) t)
  56.    T
  57.  
  58.         '|foo:bar| 
  59.    |foo:bar|
  60.       
  61.         (read-from-string "|foo|:|bar|")
  62.  
  63.    ERROR
  64.  
  65.  
  66.  
  67.  ;      reserved token : potential numbers              Seite 341
  68.  ;              eingelesen als Symbol und 
  69.  ;              als solches gedruckt (dh. mit '\' als 1.Zeichen)
  70.         '1b5000 
  71.    \1B5000
  72.        '777777q 
  73.    \777777Q
  74.        '1.7J 
  75.    \1.7J
  76.        '-3/4+6.7J
  77.  
  78.    \-3/4+6.7J
  79.         '12/25/83 
  80.    \12/25/83
  81.      '27^19 
  82.    \27^19
  83.          '3^4/5 
  84.    \3^4/5
  85.       '6//7
  86.  
  87.    \6//7
  88.         '3.1.2.6 
  89.    \3.1.2.6
  90.       '^-43^ 
  91.    \^-43^
  92.          '3.141_592_653_589_793_238_4
  93.  
  94.    \3.141_592_653_589_793_238_4
  95.         '-3.7+2.6i-6.17j+19.6k
  96.  
  97.    \-3.7+2.6I-6.17J+19.6K
  98.  
  99.  ;      not potential numbers
  100.  ;          sind immer Symbole :
  101.         '/ 
  102.    /
  103.          '/5 
  104.    /5
  105.        '+ 
  106.    +
  107.        '1+ 
  108.    1+
  109.          '1-
  110.  
  111.    1-
  112.         'foo+ 
  113.    FOO+
  114.       'ab.cd 
  115.    AB.CD
  116.     '_ 
  117.    _
  118.        '^ 
  119.    ^
  120.           '^/-
  121.  
  122.    ^/-
  123.  
  124.  ;      die folgenden token sind Symbole , wenn *read-base* == 10 :
  125.         'bad-face 
  126.    BAD-FACE
  127.         '25-sec-83 
  128.    25-SEC-83
  129.        'a/b 
  130.    A/B
  131.        'fad_cafe
  132.  
  133.    FAD_CAFE
  134.         'f^
  135.  
  136.    F^
  137.  
  138. (progn  (setq *print-base* 16)t)
  139. T
  140.  
  141.  ;      und sind reserved token, wenn *read-base* == 16
  142.  ;      und werden mit '\' gedruckt, falls *print-base* == 16 :
  143.         'bad-face 
  144.    \BAD-FACE
  145.         '25-sec-83 
  146.    \25-SEC-83
  147.        'a/b 
  148.    \A/B
  149.        'fad_cafe
  150.  
  151.    \FAD_CAFE
  152.         'f^
  153.  
  154.    \F^
  155.  
  156. (progn (setq *print-base* 10)t)
  157. T
  158.  
  159.  
  160.  ;      folgende "Zahlen"-Atome muessen mit '\' gedruckt werden :
  161.         '\123 
  162.    \123
  163.        '\123E12 
  164.    \123E12
  165.      '\123S12 
  166.    \123S12
  167.       '\123L12
  168.  
  169.    \123L12
  170.         '\123D12 
  171.    \123D12
  172.     '\123F12 
  173.    \123F12
  174.      '\123/12
  175.  
  176.    \123/12
  177.  
  178.  
  179. ;
  180.  ;        Test der Punktsyntax
  181.         '(a . b)
  182.    (A . B)
  183.         '(a.b)
  184.    (A.B)
  185.                 '(a. b)
  186.    (A. B)
  187.                 
  188.         '(a \. b c)
  189.    (A \. B C)
  190.         '(a |.| b c)
  191.    (A \. B C)
  192.         '(a \... b c)
  193.    (A \... B C)
  194.  
  195.         '(a |...| b c)
  196.    (A \... B C)
  197.         '(a b . c)
  198.    (A B . C)
  199.         '.ab
  200.  
  201.    .AB
  202.         (read-from-string "(. b)")
  203.    ERROR
  204.         (read-from-string "(a .. b)")
  205.    ERROR
  206.         
  207.         (read-from-string "(a . . 'b   )")
  208.    ERROR
  209.         ; Fehler
  210.         (read-from-string "(a b c ...)")
  211.    ERROR
  212.  
  213. ;-------------------------------------------------------------------------------
  214. ;(progn (print "etwa ein achtel") t) T
  215. ;-------------------------------------------------------------------------------
  216.  
  217.  ;        test zeichen einlesen
  218.      #\control-meta-a
  219.  
  220.    #\M-C-A
  221.      #\control-meta-\a
  222.    #\M-C-\a
  223.  
  224.      #\linefeed
  225.  
  226.    #\NEWLINE
  227.      #\newline
  228.  
  229.    #\NEWLINE
  230.      #\space
  231.  
  232.    #\SPACE
  233.      #\rubout
  234.  
  235.    #\RUBOUT
  236.      #\page
  237.  
  238.    #\PAGE
  239.      #\tab
  240.  
  241.    #\TAB
  242.      #\backspace
  243.  
  244.    #\BACKSPACE
  245.      #\return
  246.  
  247.    #\RETURN
  248.      #\control-space
  249.  
  250.    #\C-SPACE
  251.      #\c-m-return
  252.  
  253.    #\M-C-RETURN
  254.      #\control-meta-tab
  255.  
  256.    #\M-C-TAB
  257.      #\h-s-m-c-rubout
  258.  
  259.    #\H-S-M-C-RUBOUT
  260.      #\control-%
  261.  
  262.    #\C-%
  263.      #\control-\"
  264.    #\C-\"
  265.  
  266.      #\meta->
  267.  
  268.    #\M->
  269.  
  270.  ;        Test *read-base*
  271. (setq *read-base* 2)
  272. 2
  273.  
  274. (setq *print-radix* t)
  275. T
  276.  
  277. #+XCL (prin1-to-string 4/3.) #+XCL "4/3."
  278. #-XCL (prin1-to-string #10r4/3) #-XCL "#10r4/3"
  279.  
  280. (setq *print-base* 2.) 2.
  281.  
  282. #+XCL (prin1-to-string 4/3.) #+XCL "#2r100/11"
  283. #-XCL (prin1-to-string #10r4/3) #-XCL "#b100/11"
  284.  
  285. (setq *print-base* 10.) 10.
  286.  
  287.        '123 
  288.    \123
  289.         123. 
  290.    123.
  291.        312.
  292.  
  293.    312.
  294.  
  295. (progn (setq *read-base* 10. ) t)
  296. T
  297.  
  298. (setq *print-radix* nil)
  299. NIL
  300.  
  301.  ;        Test floatings extrema 
  302.         .1      
  303.    0.1
  304. +.1     
  305.    0.1
  306. -.1     
  307.    -0.1
  308. .1e1    
  309.    1.0
  310. +.1e1   
  311.    1.0
  312. -.1e1   
  313.    -1.0
  314. 1e1     
  315.    10.0
  316. +1e1    
  317.    10.0
  318. -1e1
  319.  
  320.    -10.0
  321.         1.e1    
  322.    10.0
  323. +1.e1   
  324.    10.0
  325. -1.e1
  326.  
  327.    -10.0
  328.  
  329. (setq *read-base* 16)
  330. 16
  331.  
  332.         '1a1.   
  333.    \1A1.
  334. ; fehler symbol
  335.         '1r1.   
  336.    \1R1.
  337. ; fehler symbol
  338.  
  339. (progn (setq *read-base* 10. ) t)
  340. T
  341.  
  342.  ;        Test *print-level*
  343. (setq *print-level* 10)
  344. 10
  345.  
  346. (setq *print-circle* t) 
  347. T
  348.  
  349. ;-- NSUBST ging in Zyklus ! 
  350. (prin1-to-string '(#1=(a b #1#)) ) 
  351. "(#1=(a b #1#))"  
  352.  
  353. (prin1-to-string '(#1=(#1#)))
  354. "(#1=(#1#))"
  355.  
  356. (prin1-to-string '(#1=(a b #1#) (c d #1#)))
  357. "(#1=(a b #1#) (c d #1#))"
  358.  
  359. (setq *print-level* nil)
  360. NIL
  361.  
  362.  ;        Test *print-length*
  363. (setq *print-length* 11)
  364. 11
  365.  
  366. (prin1-to-string '(1 2 3 4 (5 5) 6 7 8 9 10 11 12 13))
  367. "(1 2 3 4 (5 5) 6 7 8 9 10 11 ...)"
  368.  
  369. ;;;; NSUBST  
  370. (prin1-to-string '#1=(a b . #1#))
  371. #+XCL "#2=(a b . #2#)"
  372. #-XCL "#1=(A B . #1#)"
  373.  
  374. (setq *print-length* nil)
  375. NIL
  376.  
  377.  ;        Test packagemarker
  378.         ':abc
  379.  
  380.    :ABC
  381.  ;        zur Zeit noch nicht implementiert :
  382. (progn (unless (find-package 'abc)(make-package 'abc)) t)
  383.    T
  384.  
  385.         (read-from-string "abc:de")
  386.    ERROR
  387.         'abc::de
  388.    ABC::DE
  389.         (read-from-string "::111")
  390.    #+XCL ERROR #+CLISP :|111|
  391.         (read-from-string ":abc:")
  392.    ERROR
  393.         (read-from-string ":abc:00")
  394.    ERROR
  395.        ;Fehler
  396.         (read-from-string "ab:cd:2")
  397.    ERROR
  398.         (read-from-string "ab:")
  399.    ERROR
  400.         (read-from-string "ab:cd:")
  401.    ERROR
  402.         (read-from-string "abc::")
  403.    #+XCL ERROR #+CLISP abc::||
  404.  ;
  405.  
  406. ;&----- Tread1.tst -------------------------------------------------------------
  407.  
  408.  ;        Test array
  409.         '#0a7
  410.    #0A7
  411.         '#1a(1 2 3 4 5 6 7 8)
  412.    #(1 2 3 4 5 6 7 8)
  413.  
  414.         '#2a((1 2 3)(3 2 1))
  415.    #2A((1 2 3)(3 2 1))
  416.  
  417.         '#3a(((1 2 3 ) (4 5 6))
  418.              ((1 2 3 ) (4 5 6)))
  419.    #3A(((1 2 3)(4 5 6))((1 2 3)(4 5 6)))
  420.  
  421.    #+XCL '#a7
  422.    #+XCL #0A7
  423.    #+CLISP '#a7
  424.    #+CLISP #(NIL NIL NIL NIL NIL NIL NIL)
  425.  
  426.         '#2a((1 2)(3 4)(5 6))
  427.    #2A((1 2)(3 4)(5 6))
  428.  
  429.         '#3a(((1 2)(3 4)(5 6))
  430.              ((7 8)(9 10)(11 12)))
  431.    #3A(((1 2)(3 4)(5 6))((7 8)(9 10)(11 12)))
  432.  
  433.  ;
  434.  ;        Test ehemaliger Fehler
  435.         (multiple-value-list (read-from-string "1(123)"))
  436.    (1 1)
  437.  
  438.  
  439.         (read-from-string "#0*111") 
  440.    ERROR
  441.                                ; Fehler
  442.         (read-from-string "#0(1 1 1 )")
  443.    ERROR
  444.                         ; Fehler
  445.         (read-from-string "#0r111")
  446.    ERROR
  447.         (read-from-string "#1r111")
  448.    ERROR
  449.                ; Fehler
  450.         #2r111 
  451.    7
  452.                #36r111
  453.  
  454.    1333
  455.         (read-from-string "#37r111")
  456.    ERROR
  457.                                ; Fehler
  458.         (read-from-string "#011010")
  459. ERROR
  460.  
  461.         -01     
  462.    -1
  463. -001    
  464.    -1
  465. -01.    
  466.    -1
  467. -0.     
  468.    0
  469. -0/12   
  470.    0
  471. -00.    
  472.    0
  473. -00/12  
  474.    0
  475. ;zahlen
  476.         '-12./12        
  477.    \-12./12
  478. '-0./12 
  479.    \-0./12
  480.                                 ;symbole
  481.  
  482.         (list 1 2 #\a)
  483.    (1 2 #\a)
  484.  
  485.  
  486. ;;        '{1 2 3 { 4 5 6) (7 8 9 }
  487. ;;   (1 2 3 (4 5 6) (7 8 9))
  488.  
  489. ;-------------------------------------------------------------------------------
  490. ;(progn (print "etwa ein viertel") t) T
  491. ;-------------------------------------------------------------------------------
  492.  
  493.  ;
  494.  ;        Test der Fehlerbehandlung
  495.  ;
  496.  ;        -2        <esc> als 1. zeichen
  497.           (read-from-string "")
  498.    ERROR
  499.  
  500.  ;        -3       <esc> im token
  501.           (read-from-string "abc")
  502.    ERROR
  503.  
  504.  
  505.  
  506.  ;        -4       <esc> innerhalb von |.....|
  507.           (read-from-string "a|bc")
  508.    ERROR
  509.  
  510.  ;        -5         zu langer vektor
  511.           (read-from-string "#2(a b c)")
  512.    ERROR
  513.  
  514.  ;        -6         packagezeichenfehler
  515.           (read-from-string "::")
  516.    #+XCL ERROR #+CLISP :||
  517.  ;        -7         zu langer bitvektor
  518.           (read-from-string "#2*1010")
  519.    ERROR
  520.  
  521. ;        -9         labelfehler
  522.           (read-from-string "#1#")
  523.    ERROR
  524.  
  525.  ;        -10        punkttoken
  526.         (READ-FROM-STRING "... ")
  527.    ERROR
  528.  
  529. ;        -11        unzulaessige *read-base*
  530. ;                wird auf 10 gesetzt durch Fehlerbehandlung
  531.         (progn (setq *read-base* 40) (read-from-string "123"))
  532.    ERROR
  533.  
  534. ;        Bindung nach Rueckkehr aus Debug
  535. *read-base*
  536. 10.
  537.  
  538. (progn (setq *read-base* 10.) t)
  539. T
  540.  
  541. *read-base*
  542. 10
  543.  
  544. ;        -12        falsche printbase
  545. (progn (setq *print-base* nil) (prin1-to-string *print-base*))
  546. ERROR
  547.  
  548. (progn  (setq *print-base* 10.)t)
  549. T
  550.  
  551. *print-base*
  552. 10
  553.  
  554. ;        -14        feldfehler
  555.         (read-from-string "#2a((1 2 3)(1 2)")
  556.    ERROR
  557.         (read-from-string "#2a((1 2 3)(1 2))")
  558.    ERROR
  559.  
  560. ;;        (read-from-string "#2a(1 2 3}")
  561. ;;   ERROR
  562.  
  563. ;        -16        unzulaessige printlevel
  564. (setq *print-level* t)
  565. T
  566.  
  567. *print-level*
  568. T
  569.  
  570. (setq *print-level* nil)
  571. NIL
  572.  
  573. *print-level*
  574. NIL
  575.  
  576. ;        -17        unzulaessige printlength
  577. (setq *print-length* t)
  578. T
  579.  
  580. *print-length*
  581. T
  582.  
  583. (setq *print-length* nil)
  584. NIL
  585.  
  586. *print-length*
  587. NIL
  588.  
  589. ;&----- Tread2.tst -------------------------------------------------------------
  590.  
  591.  ;        -22        kein Atom fuer synonym
  592. ;;;;; typsystem notwendig        
  593. (make-synonym-stream 123)
  594. ERROR
  595.  
  596.  ;        -23        kein stream als wert 
  597.         (prin1-to-string (make-synonym-stream '*read-base*))
  598.    #+XCL "#<SYSTEM::%TYPE-SYNONYM-STREAM *READ-BASE*>"
  599.    #+CLISP "#<SYNONYM-STREAM *READ-BASE*>"
  600.  
  601.  ;        -24        falscher abschluss fuer vektor
  602.  
  603.         (read-from-string "#(1 2 3 .               )")
  604.    ERROR
  605.  
  606.  ;      -29     falsch gepunktete liste
  607.         (read-from-string "(a .)")
  608.    ERROR
  609.  
  610.  
  611.         (read-from-string "(. a)")
  612.    ERROR
  613.  
  614.  
  615.  ;      -30     kein stream als argument
  616.         (make-echo-stream pi *standard-output*)
  617.    ERROR
  618.  
  619.  
  620.         (make-two-way-stream pi *standard-output*)
  621.    ERROR
  622.  
  623.  ;      -31     kein stream als argument
  624.         (make-echo-stream *standard-input* pi)
  625.    ERROR
  626.  
  627.  
  628.         (make-two-way-stream *standard-input* pi)
  629.    ERROR
  630.  
  631.  
  632.  ;      -33     illegale readtable
  633. (progn (setq *readtable* t) (read-from-string "123"))
  634. ERROR
  635.  
  636. (progn (setq *readtable* (copy-readtable nil)) t)
  637. T
  638.  
  639.  ;      -35     illegale readbase in #xxR
  640.         (read-from-string "#37R")
  641.    ERROR
  642.  
  643.  ;      -36     illegale ziffern in #xxR
  644.         (read-from-string "#10rabc")
  645.    ERROR
  646.  
  647.         (read-from-string "#10ra/b")
  648.    ERROR
  649.  ;      -37     illegaler #\-string
  650.         (read-from-string "#\nocontrol-")
  651.    ERROR
  652.         (read-from-string "#\control-")
  653.    ERROR
  654.  ;      -38     ????????
  655. ;;        }
  656. ;;   ERROR
  657.  
  658.  ;
  659.  ;      test print-radix
  660.  ;
  661. (setq *print-radix* t)
  662. T
  663.  
  664. (WRITE-TO-STRING 11111 )
  665.    "11111."
  666.  
  667. (progn  (setq *print-base* 2)t)
  668. T
  669.  
  670. (WRITE-TO-STRING 11111 )
  671.    #+XCL "#2r10101101100111"
  672.    #-XCL "#b10101101100111"
  673.  
  674. (progn  (setq *print-base* 8)t)
  675. T
  676.  
  677. (WRITE-TO-STRING 11111 )
  678.    "#o25547"
  679.  
  680. (progn  (setq *print-base* 16)t)
  681. T
  682.  
  683. (WRITE-TO-STRING 11111 )
  684.    "#x2B67"
  685.  
  686. (progn  (setq *print-base* 22)t)
  687. T
  688.  
  689. (WRITE-TO-STRING 11111 )
  690.    "#22r10L1"
  691.  
  692. (progn  (setq *print-base* 10)t)
  693. T
  694.  
  695. (setq *print-radix* nil)
  696. NIL
  697.  
  698. (WRITE-TO-STRING 11111 )
  699.    "11111"
  700.  
  701. (progn  (setq *print-base* 2)t)
  702. T
  703.  
  704. (WRITE-TO-STRING 11111 )
  705.    "10101101100111"
  706.  
  707. (progn  (setq *print-base* 8)t)
  708. T
  709.  
  710. (WRITE-TO-STRING 11111 )
  711.    "25547"
  712.  
  713. (progn  (setq *print-base* 16)t)
  714. T
  715.  
  716. (WRITE-TO-STRING 11111 )
  717.    "2B67"
  718.  
  719. (progn  (setq *print-base* 22)t)
  720. T
  721.  
  722. (WRITE-TO-STRING 11111 )
  723.    "10L1"
  724.  
  725. (progn  (setq *print-base* 10)t)
  726. T
  727.  
  728.  ;
  729.  ;      test read-default-float-format (besser write-to-string ?)
  730.  ;
  731.         0.00999998
  732.  
  733.    0.00999998
  734.         0.009999998
  735.  
  736.    0.009999998
  737.         0.0099999997
  738.  
  739.    0.01
  740.         1.23
  741.  
  742.    1.23
  743. (prin1-to-string        1.23e20)
  744.    "1.23E20" ; "1.229999E20"
  745.  
  746. (prin1-to-string        1.23f20)
  747.    "1.23E20" ; "1.229999E20"
  748.  
  749. (prin1-to-string        1.23s20)
  750.    #+XCL "1.229S20" #+CLISP "1.23s20"
  751.  
  752.         1.23d20
  753.    1.23D20
  754.         1.23l20
  755.    1.23D20
  756. (prin1-to-string        123456789.123456789)
  757.    "1.2345679E8" ; "1.234567E8"
  758.  
  759. (prin1-to-string        12345678.12345678)
  760.    "1.2345678E7" ; "1.234567E7"
  761.  
  762. (prin1-to-string        1234567.1234567)
  763.    "1234567.1" ; "1234567.0"
  764.  
  765. (prin1-to-string        123456.123456)
  766.    #-CLISP "123456.12" ; "123456.1"
  767.    #+CLISP "123456.125" ; Anzeigefehler
  768.  
  769. (prin1-to-string        12345.12345)
  770.    "12345.123" ; "12345.12"
  771.  
  772. (prin1-to-string        1234.1234)
  773.    "1234.1234" ; "1234.123"
  774.  
  775.         123.123
  776.    123.123
  777.         12.12
  778.    12.12
  779.         1.1
  780.    1.1
  781.  
  782. (setq *read-default-float-format* 'short-float)
  783. SHORT-FLOAT
  784.  
  785.         1.23
  786.    1.23
  787. (prin1-to-string        1.23e20)
  788.    "1.23E20" ; "1.229E20"
  789.  
  790. (prin1-to-string        1.23f20)
  791.    "1.23f20" ; "1.229999F20"
  792.  
  793. (prin1-to-string        1.23s20)
  794.    "1.23E20" ; "1.229E20"
  795.  
  796.         1.23d20
  797.    1.23D20
  798.         1.23l20
  799.    1.23D20
  800. (prin1-to-string        123456789.123456789)
  801.    "1.23457E8" ; "1.234E8"
  802.  
  803. (prin1-to-string        12345678.12345678)
  804.    "1.23457E7" ; "1.234E7"
  805.  
  806. (prin1-to-string        1234567.1234567)
  807.    "1234560.0"
  808.  
  809. (prin1-to-string        123456.123456)
  810.    "123456.0"
  811.  
  812. (prin1-to-string        12345.12345)
  813.    "12345.1" ; "12345.0"
  814.  
  815. (prin1-to-string        1234.1234)
  816.    #-CLISP "1234.12" ; "1234.0"
  817.    #+CLISP "1234.13" ; Anzeigefehler
  818.  
  819. (prin1-to-string        123.123)
  820.    "123.123" ; "123.1"
  821.  
  822.         12.12
  823.    12.12
  824.         1.1
  825.    1.1
  826.  
  827. (setq *read-default-float-format* 'double-float)
  828. DOUBLE-FLOAT
  829.  
  830.         1.23
  831.    1.23
  832.         1.23e20
  833.    1.23E20
  834. (prin1-to-string        1.23f20)
  835.    "1.23f20" ; "1.229999F20"
  836.  
  837. (prin1-to-string        1.23s20)
  838.    "1.23s20" ; "1.229S20"
  839.  
  840.         1.23d20
  841.    1.23E20
  842.         1.23l20
  843.    1.23E20
  844. (prin1-to-string        123456789.123456789)
  845.    "1.2345678912345679E8" ; "1.234567891234568E8"
  846.  
  847.         12345678.12345678
  848.    1.234567812345678E7
  849.         1234567.1234567
  850.    1234567.1234567
  851.         123456.123456
  852.    123456.123456
  853.         12345.12345
  854.    12345.12345
  855.         1234.1234
  856.    1234.1234
  857.         123.123
  858.    123.123
  859.         12.12
  860.    12.12
  861.         1.1
  862.    1.1
  863.  
  864. (setq *read-default-float-format* 'long-float)
  865. LONG-FLOAT
  866.  
  867.         1.23
  868.    #+XCL 1.23D0 #-XCL 1.23
  869.         1.23e20
  870.    #+XCL 1.23D20 #-XCL 1.23E20
  871. (prin1-to-string        1.23f20)
  872.    "1.23f20" ; "1.229999F20"
  873.  
  874. (prin1-to-string        1.23s20)
  875.    "1.23s20" ; "1.229S20"
  876.  
  877.         1.23d20
  878.    1.23D20
  879.         1.23l20
  880.    #+XCL 1.23D20 #-XCL 1.23E20
  881. (prin1-to-string        123456789.123456789)
  882.    "1.23456789123456789E8" ; "1.234567891234568D8"
  883.  
  884.         12345678.12345678
  885.    #+XCL 1.234567812345678D7 #-XCL 1.234567812345678E7
  886.         1234567.1234567
  887.    #+XCL 1234567.1234567D0 #-XCL 1234567.1234567
  888.         123456.123456
  889.    #+XCL 123456.123456D0 #-XCL 123456.123456
  890.         12345.12345
  891.    #+XCL 12345.12345D0 #-XCL 12345.12345
  892.         1234.1234
  893.    #+XCL 1234.1234D0 #-XCL 1234.1234
  894.         123.123
  895.    #+XCL 123.123D0 #-XCL 123.123
  896.         12.12
  897.    #+XCL 12.12D0 #-XCL 12.12
  898.         1.1
  899.    #+XCL 1.1D0 #-XCL 1.1
  900.  
  901. (setq *read-default-float-format* 'single-float)
  902. SINGLE-FLOAT
  903.  
  904.  ;
  905.  ;      test print-case
  906.  ;
  907. (WRITE-TO-STRING 'abcde)
  908.    "ABCDE"
  909.  
  910. (WRITE-TO-STRING        'abcde-efghij)
  911.    "ABCDE-EFGHIJ"
  912.  
  913. (WRITE-TO-STRING        'abcde1efghij)
  914.    "ABCDE1EFGHIJ"
  915.  
  916. (WRITE-TO-STRING        'abcde-1efgh)
  917.    "ABCDE-1EFGH"
  918.  
  919. (setq *print-case* :downcase)
  920. :downcase
  921.  
  922. (WRITE-TO-STRING        'abcde)
  923.    "abcde"
  924.  
  925. (WRITE-TO-STRING        'abcde-efghij)
  926.    "abcde-efghij"
  927.  
  928. (WRITE-TO-STRING        'abcde1efghij)
  929.    "abcde1efghij"
  930.  
  931. (WRITE-TO-STRING        'abcde-1efgh)
  932.    "abcde-1efgh"
  933.  
  934. (setq *print-case* :capitalize)
  935. :Capitalize
  936.  
  937. (WRITE-TO-STRING        'abcde)
  938.    "Abcde"
  939.  
  940. (WRITE-TO-STRING        'abcde-efghij)
  941.    "Abcde-Efghij"
  942.  
  943. (WRITE-TO-STRING        'abcde1efghij)
  944.    "Abcde1efghij"
  945.  
  946. (WRITE-TO-STRING        'abcde-1efgh)
  947.    "Abcde-1efgh"
  948.  
  949. (setq *print-case* :upcase)
  950. :UPCASE
  951.  
  952.  ;
  953.  ;      test print-gensym
  954.  ;
  955. (progn (gensym "test")(gensym 77) t)
  956.    T
  957.  
  958. (setq *print-gensym* nil)
  959. NIL
  960.  
  961. (WRITE-TO-STRING        (gensym))
  962.    #+XCL "|test|78" #+CLISP "|test78|"
  963.  
  964. (setq *print-gensym* t)
  965. T
  966.  
  967. (WRITE-TO-STRING        (gensym))
  968.    #+XCL "#:|test|79" #+CLISP "#:|test79|"
  969.  
  970.  ;
  971.  ;      test print-escape-pretty NIL
  972.  ;
  973. (WRITE-TO-STRING        nil)
  974.    "NIL"
  975.  
  976. (WRITE-TO-STRING        '(a b nil c))
  977.    "(A B NIL C)"
  978.  
  979. (WRITE-TO-STRING        '(a b (nil) c))
  980.    "(A B (NIL) C)"
  981.  
  982. (WRITE-TO-STRING        '(a b (nil c) d))
  983.    "(A B (NIL C) D)"
  984.  
  985. (WRITE-TO-STRING '#(a b nil c (a b nil c) (nil)))
  986. "#(A B NIL C (A B NIL C) (NIL))"
  987.  
  988. (setq *print-pretty* t)
  989. T
  990.  
  991. (WRITE-TO-STRING        nil)
  992.    "NIL"
  993.  
  994. (WRITE-TO-STRING        '(a b nil c))
  995.    "(A B NIL C)"
  996.  
  997. (WRITE-TO-STRING        '(a b (nil) c))
  998. #+XCL
  999. "(A B 
  1000.    (NIL) 
  1001.    C)"
  1002. #+CLISP "(A B (NIL) C)"
  1003.  
  1004. (WRITE-TO-STRING        '(a b (nil c) d))
  1005. #+XCL
  1006. "(A B 
  1007.    (NIL C) 
  1008.    D)"
  1009. #+CLISP "(A B (NIL C) D)"
  1010.  
  1011. (WRITE-TO-STRING '#(a b nil c (a b nil c) (nil)))
  1012. "#(A B NIL C (A B NIL C) (NIL))"
  1013. ;;"#(A B NIL C 
  1014. ;;(A B NIL C) 
  1015. ;;(NIL))"
  1016.  
  1017. ;-------------------------------------------------------------------------------
  1018. ;(progn (print "etwa mitte") t) T
  1019. ;-------------------------------------------------------------------------------
  1020.  
  1021. (setq *print-pretty* nil)
  1022. NIL
  1023.  
  1024.  ;
  1025.  ;      test read-suppress
  1026.  ;
  1027. (let ((*read-suppress* t)) (read-from-string "#o33"))
  1028. NIL
  1029.  
  1030. (let ((*read-suppress* t)) (read-from-string "#x1b"))
  1031. NIL
  1032.  
  1033. (let ((*read-suppress* t)) (read-from-string "#b11011"))
  1034. NIL
  1035.  
  1036. (let ((*read-suppress* t)) (read-from-string "#.(* 3 3 3)"))
  1037. NIL
  1038.  
  1039. (let ((*read-suppress* t)) (read-from-string "(a . b)"))
  1040. #+XCL NIL #-XCL (NIL NIL NIL)
  1041.  
  1042. (let ((*read-suppress* t)) (read-from-string "(a.b)"))
  1043. #+XCL (A.B) #-XCL (NIL)
  1044.  
  1045. (let ((*read-suppress* t)) (read-from-string "(a. b)"))
  1046. #+XCL (A. B) #-XCL (NIL NIL)
  1047.                 
  1048. (let ((*read-suppress* t)) (read-from-string "(a \. b c)"))
  1049. #+XCL (A \. B C) #-XCL (NIL NIL NIL NIL)
  1050.  
  1051. (let ((*read-suppress* t)) (read-from-string "(a |.| b c)"))
  1052. #+XCL (A \. B C) #-XCL (NIL NIL NIL NIL)
  1053.  
  1054. (let ((*read-suppress* t)) (read-from-string "(a \... b c)"))
  1055. #+XCL (A \... B C) #-XCL (NIL NIL NIL NIL)
  1056.  
  1057. (let ((*read-suppress* t)) (read-from-string "(a |...| b c)"))
  1058. #+XCL (A \... B C) #-XCL (NIL NIL NIL NIL)
  1059.  
  1060. (let ((*read-suppress* t)) (read-from-string "(a b . c)"))
  1061. #+XCL NIL #-XCL (NIL NIL NIL NIL)
  1062.  
  1063. (let ((*read-suppress* t)) (read-from-string ".ab"))
  1064. #+XCL .AB #-XCL NIL
  1065.  
  1066. (let ((*read-suppress* t)) (read-from-string "(. b)"))
  1067. #+XCL NIL #-XCL (NIL NIL)
  1068.  
  1069. (let ((*read-suppress* t)) (read-from-string "(a .. b)"))
  1070. #+XCL (A NIL B) #-XCL (NIL NIL NIL)
  1071.         
  1072. (let ((*read-suppress* t)) (read-from-string "(a . . 'b   )"))
  1073. #+XCL NIL #-XCL (NIL NIL NIL 'NIL)
  1074.  
  1075. (let ((*read-suppress* t)) (read-from-string "(a b c ...)"))
  1076. #+XCL (A B C NIL) #-XCL (NIL NIL NIL NIL)
  1077.  
  1078. (let ((*read-suppress* t)) (read-from-string "#\\control-meta-a"))
  1079. NIL
  1080.  
  1081. (let ((*read-suppress* t)) (read-from-string "#\\control-meta-\\a"))
  1082. NIL
  1083.  
  1084. (let ((*read-suppress* t)) (read-from-string "#\\linefeed"))
  1085. NIL
  1086.  
  1087. (let ((*read-suppress* t)) (read-from-string "#\\newline"))
  1088. NIL
  1089.  
  1090. (let ((*read-suppress* t)) (read-from-string "#\\space"))
  1091. NIL
  1092.  
  1093. (let ((*read-suppress* t)) (read-from-string "#\\rubout"))
  1094. NIL
  1095.  
  1096. (let ((*read-suppress* t)) (read-from-string "#\\page"))
  1097. NIL
  1098.  
  1099. (let ((*read-suppress* t)) (read-from-string "#\\tab"))
  1100. NIL
  1101.  
  1102. (let ((*read-suppress* t)) (read-from-string "#\\backspace"))
  1103. NIL
  1104.  
  1105. (let ((*read-suppress* t)) (read-from-string "#\\return"))
  1106. NIL
  1107.  
  1108. (let ((*read-suppress* t)) (read-from-string "#\\control-space"))
  1109. NIL
  1110.  
  1111. (let ((*read-suppress* t)) (read-from-string "#\\c-m-return"))
  1112. NIL
  1113.  
  1114. (let ((*read-suppress* t)) (read-from-string "#\\control-meta-tab"))
  1115. NIL
  1116.  
  1117. (let ((*read-suppress* t)) (read-from-string "#\\h-s-m-c-rubout"))
  1118. NIL
  1119.  
  1120. (let ((*read-suppress* t)) (read-from-string "#\\control-%"))
  1121. NIL
  1122.  
  1123. (let ((*read-suppress* t)) (read-from-string "#\\control-\""))
  1124. NIL
  1125.  
  1126. (let ((*read-suppress* t)) (read-from-string "#\\meta->"))
  1127. NIL
  1128.  
  1129. (let ((*read-suppress* t)) (read-from-string "xx:xx")) nil
  1130.  
  1131. (let ((*read-suppress* t)) (read-from-string "xx::xx")) nil
  1132.  
  1133. (setq *print-level* 10)
  1134. 10
  1135.  
  1136.         (let ((*read-suppress* t)) (read-from-string "(#1=(a b #1#))"))
  1137.    #+XCL ((A B NIL)) #-XCL ((NIL NIL NIL))
  1138.         (let ((*read-suppress* t)) (read-from-string "(#1=(#1#))"))
  1139.    ((NIL))
  1140.  
  1141.         (let ((*read-suppress* t)) (read-from-string "(#1=(a b #1#) (c d #1#))"))
  1142.    #+XCL ((A B NIL) (C D NIL)) #-XCL ((NIL NIL NIL) (NIL NIL NIL))
  1143.  
  1144. (setq *print-level* nil)
  1145. NIL
  1146.  
  1147. (setq *print-length* 11)
  1148. 11
  1149.  
  1150.         (let ((*read-suppress* t)) (read-from-string "#1=(a b . #1#)"))
  1151.    #+XCL NIL #-XCL (NIL NIL NIL NIL)
  1152.  
  1153. (setq *print-length* nil)
  1154. NIL
  1155.  
  1156.  
  1157.         (let ((*read-suppress* t)) (read-from-string "#0a7"))
  1158.    NIL
  1159.         (let ((*read-suppress* t)) (read-from-string "#1a(1 2 3 4 5 6 7 8)"))
  1160.    NIL
  1161.         (let ((*read-suppress* t)) (read-from-string "#2a((1 2 3)(3 2 1))"))
  1162.    NIL
  1163.         (let ((*read-suppress* t)) (read-from-string "#3a(((1 2 3 ) (4 5 6))
  1164.                                                           ((1 2 3 ) (4 5 6)))"))
  1165.    NIL
  1166.         (let ((*read-suppress* t)) (read-from-string "#a7"))
  1167.    NIL
  1168.         (let ((*read-suppress* t)) (read-from-string "#2a((1 2)(3 4)(5 6))"))
  1169.    NIL
  1170.         (let ((*read-suppress* t)) (read-from-string "#3a(((1 2)(3 4)(5 6))
  1171.                                                           ((7 8)(9 10)(11 12)))"))
  1172.    NIL
  1173.  
  1174.         (let ((*read-suppress* t)) (read-from-string "#0*111"))
  1175.    NIL
  1176.    
  1177.         (let ((*read-suppress* t)) (read-from-string "#0(1 1 1 )"))
  1178.    #+XCL ERROR #-XCL NIL
  1179.  
  1180.         (let ((*read-suppress* t)) (read-from-string "#0r111"))
  1181.    NIL
  1182.         (let ((*read-suppress* t)) (read-from-string "#1r111"))
  1183.    NIL
  1184.         (let ((*read-suppress* t)) (read-from-string "#2r111"))
  1185.    NIL
  1186.         (let ((*read-suppress* t)) (read-from-string "#36r111"))
  1187.    NIL
  1188.         (let ((*read-suppress* t)) (read-from-string "#37r111"))
  1189.    NIL
  1190.  
  1191. ;        (list 1 2 #\a)
  1192. ;   (1 2 NIL)
  1193.  
  1194.         (let ((*read-suppress* t)) (read-from-string "#2(a b c)"))
  1195.    #+XCL ERROR #-XCL NIL
  1196.         (let ((*read-suppress* t)) (read-from-string "#2*1010"))
  1197.    NIL
  1198.         (let ((*read-suppress* t)) (read-from-string "#1#"))
  1199.    NIL
  1200.  
  1201. ;;        #2a((1 2 3)(1 2)
  1202. ;;        #2a(1 2 3}
  1203. ;;   NIL
  1204.  
  1205.         (let ((*read-suppress* t)) (read-from-string "#(1 2 3 .               )"))
  1206.    #+XCL ERROR #-XCL NIL
  1207.  
  1208.         (let ((*read-suppress* t)) (read-from-string "(a .)"))
  1209.    #+XCL NIL #-XCL (NIL NIL)
  1210.         (let ((*read-suppress* t)) (read-from-string "(. a)"))
  1211.    #+XCL NIL #-XCL (NIL NIL)
  1212.  
  1213.         (let ((*read-suppress* t)) (read-from-string "#37R"))
  1214.    NIL
  1215.         (let ((*read-suppress* t)) (read-from-string "#10rabc"))
  1216.    NIL
  1217.         (let ((*read-suppress* t)) (read-from-string "#10ra/b"))
  1218.    NIL
  1219.         (let ((*read-suppress* t)) (read-from-string "#\\nocontrol-"))
  1220.    NIL
  1221.         (let ((*read-suppress* t)) (read-from-string "#\\control-"))
  1222.    NIL
  1223.  
  1224.  
  1225. ;&----- Tread3.tst -------------------------------------------------------------
  1226.  
  1227. ;******** Readfehler ***********************************************************
  1228. (read-from-string "#\\break")
  1229. ERROR
  1230.  
  1231. (read-from-string "#\\home-up")
  1232. ERROR
  1233.  
  1234. (read-from-string "#\\escape")
  1235. #+XCL ERROR #+CLISP #\Escape
  1236.  
  1237. (#+xx 1 #+xx 2) nil
  1238. (#+xx xx:xx)    nil
  1239.  
  1240. ;;;; typsystem notwendig
  1241. (read-from-string "#c(pi 0)")
  1242. ERROR
  1243.  
  1244. (read-from-string "#c(0 pi)")
  1245. ERROR
  1246.  
  1247. #|
  1248. ;******** test fehlerbehandlung ***********************************************
  1249. (setq lisptest::*error-message* t)
  1250. T
  1251.  
  1252.  
  1253. ;;;;    test fehlerbehandlung in COMREAD                                   ;;;;
  1254. ;;;;    --------------------------------                                   ;;;;
  1255. ;;;     test fehlerbehandlung in Shift                                      ;;;
  1256. ;;;     ------------------------------                                      ;;;
  1257. ;;      1.zeichen                                                            ;;
  1258. ;;      ---------                                                            ;;
  1259. ;       EOF
  1260.  
  1261. (read-from-string "")
  1262. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"\"))"
  1263. ;;"(LT-ERROR LISP::E-READ-TOKEN 4 (\"\"))"
  1264.  
  1265. ;       constituent/illegal2                            ; nicht moeglich
  1266. ;sinnlos !      (setq illegal2 (code-char 8))
  1267. ;   #\BACKSPACE
  1268.         ; 127 ?         ; illegal2 wird nicht
  1269. ;       (set-syntax-from-char #\A illegal2)
  1270. ;   T
  1271.                 ; kopiert !
  1272. ;       'Abc
  1273.  
  1274. ;   ABC
  1275. ;       : nach #:
  1276.         #::abc
  1277.  
  1278.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"#::ABC\"))"
  1279. ;       unbekannte typ oder illegal1
  1280. (setq illegal1 (code-char 7))
  1281. #\
  1282.  
  1283.         (set-syntax-from-char #\B illegal1)
  1284.    T
  1285.  
  1286.         B
  1287.    "(LT-ERROR LISP::E-READ-TOKEN 5 (\"\" 66))"
  1288. ;cd
  1289.  
  1290. ;   "(LT-ERROR LISP::UNBOUND-VARIABLE 1 CD)"
  1291. ;;      token 1                                                              ;;
  1292. ;;      -------                                                              ;;
  1293. ;       EOF
  1294.         (read-from-string "ab")
  1295.    ab
  1296.  
  1297. ;       constituent/illegal2
  1298. ;       'abAcd  
  1299. ;   ABACD
  1300.                                         ; s.o.
  1301. ;       unzulaessige :
  1302.         ::abc
  1303.  
  1304.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"<:>:ABC\"))"
  1305.         #::abc
  1306.  
  1307.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"#::ABC\"))"
  1308.         :::abc
  1309.  
  1310.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"<:>::ABC\"))"
  1311.         #:::abc
  1312.  
  1313.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"#:::ABC\"))"
  1314.         :a:bc
  1315.  
  1316.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"A<:>:BC\"))"
  1317.         #:a:bc
  1318.  
  1319.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"A<#:>:BC\"))"
  1320.         :a::bc
  1321.  
  1322.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"A<:>::BC\"))"
  1323.         #:a::bc
  1324.  
  1325.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"A<#:>::BC\"))"
  1326.         :abc:
  1327.  
  1328.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"ABC<:>:\"))"
  1329.         #:abc:
  1330.  
  1331.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"ABC<#:>:\"))"
  1332.         ab:
  1333.  
  1334.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"AB:
  1335. \"))"
  1336.         ab:cd:
  1337.  
  1338.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"AB:CD:\"))"
  1339.         ab::
  1340.  
  1341.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"AB::
  1342. \"))"
  1343.         a:b:c
  1344.  
  1345.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"A:B:C\"))"
  1346.         a:b::c
  1347.  
  1348.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"A:B::C\"))"
  1349.         a::b:c
  1350.  
  1351.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"A::B:C\"))"
  1352.         a::b::c
  1353.  
  1354.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"A::B::C\"))"
  1355.  
  1356. ;       EOF nach \
  1357. (read-from-string "ab\\")
  1358. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"AB\\\\\"))"
  1359. ;;"(LT-ERROR LISP::E-READ-TOKEN 4 (\"AB\\\\\"))"
  1360.  
  1361. ;       unbekannte typ oder illegal1
  1362.         abB
  1363.    "(LT-ERROR LISP::E-READ-TOKEN 5 (\"AB\" 66))"
  1364.         ;cd
  1365. ;;      token 2                                                              ;;
  1366. ;;      -------                                                              ;;
  1367. ;       EOF
  1368. (read-from-string "xx::a|bc")
  1369. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"Abc<|>\"))"
  1370. ;;"(LT-ERROR LISP::E-READ-TOKEN 4 (\"Abc<|>\"))"
  1371.         
  1372. (read-from-string "xx::a\\")
  1373. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"A\\\\\"))"
  1374. ;;"(LT-ERROR LISP::E-READ-TOKEN 4 (\"A\\\\\"))"
  1375.  
  1376. (read-from-string "xx:a\\")
  1377. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"A\\\\\"))"
  1378. ;;"(LT-ERROR LISP::E-READ-TOKEN 4 (\"A\\\\\"))"
  1379.  
  1380. (read-from-string "ab|cd")
  1381. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"ABcd<|>\"))"
  1382. ;;"(LT-ERROR LISP::E-READ-TOKEN 4 (\"ABcd<|>\"))"
  1383.  
  1384. (read-from-string "ab|")
  1385. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"AB<|>\"))"
  1386. ;;"(LT-ERROR LISP::E-READ-TOKEN 4 (\"AB<|>\"))"
  1387.  
  1388. ;       EOF nach \
  1389. (read-from-string "ab|c\\")
  1390. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"ABc<|>\\\\\"))"
  1391. ;;"(LT-ERROR LISP::E-READ-TOKEN 4 (\"ABc<|>\\\\\"))"
  1392.  
  1393. ;       unbekannter typ oder illegal1
  1394. (read-from-string "ab|cdB")
  1395. "(LT-ERROR LISP::E-READ-TOKEN 5 (\"ABcd<|>\" 66))"
  1396.         ;ef
  1397. ;;      ende                                                                 ;;
  1398. ;;      ----                                                                 ;;
  1399. ;       : leer
  1400.         (read-from-string ":")
  1401.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\":*\"))"
  1402.         
  1403.         (read-from-string ": ")
  1404.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\": \"))"
  1405.         
  1406.         (read-from-string "#:")
  1407.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"#:\"))"
  1408.  
  1409.         (read-from-string "#: ")
  1410.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"#: \"))"
  1411.         
  1412.         (read-from-string "a:")
  1413.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"A:*\"))"
  1414.         
  1415.         (read-from-string "a: ")
  1416.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"A: \"))"
  1417.         
  1418.         (read-from-string "a::")
  1419.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"A::*\"))"
  1420.         
  1421.         (read-from-string "a:: ")
  1422.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"A:: \"))"
  1423.         
  1424. ;       punkttoken
  1425.         ....
  1426.  
  1427.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"....\"))"
  1428. ;;;     fehlerbehandlung in scanobj                                         ;;;
  1429. ;;;     ---------------------------                                         ;;;
  1430. ;;      listen                                                               ;;
  1431. ;;      ------                                                               ;;
  1432. ;       EOF 
  1433.         (read-from-string "(a b" )
  1434.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((A B)) LISP::E-READ-TOKEN 4 
  1435. (\"\"))"
  1436.  
  1437.         (read-from-string "(a b " )
  1438.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((A B)) LISP::E-READ-TOKEN 4 
  1439. (\"\"))"
  1440.  
  1441.         (read-from-string "(a b" nil 'dummy)
  1442.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((A B)))"
  1443.  
  1444.         (read-from-string "(a b " nil 'dummy)
  1445.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((A B)))"
  1446.  
  1447. ;       EOF nach .
  1448.         (read-from-string "(a b . ")
  1449.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((A B #\\.)) LISP::E-READ-TOKEN 
  1450. 4 (\"\"))"
  1451.  
  1452.         (read-from-string "(a b ." nil 'dummy)
  1453.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((A B)))"
  1454.  
  1455.         (read-from-string "(a b . "  nil 'dummy)
  1456.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((A B)))"
  1457.  
  1458.         (read-from-string "(a b .")
  1459. ;   "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((A B #\\.)))"
  1460.     "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((A B)))"
  1461.  
  1462.         (read-from-string "(a b . c")
  1463.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((A B C)) LISP::E-READ-TOKEN 
  1464. 4 (\"\"))"
  1465.  
  1466. ;       2. .obj
  1467.         (a b . . c d)
  1468.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((A B #\\. #\\. C D)))"
  1469.  
  1470. ;       nur 1 obj fuer gep. paar
  1471.         (a .)
  1472.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((A #\\.)))"
  1473.  
  1474.         (. a)
  1475.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((A)))"
  1476.  
  1477. ;       keine klammer nach 2.obj
  1478.         (a . b c d)
  1479.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((A B C D)))"
  1480.  
  1481.         (a . )
  1482.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((A #\\.)))"
  1483.  
  1484. ;-------------------------------------------------------------------------------
  1485. ;(progn (print "etwa drei viertel") t) T
  1486. ;-------------------------------------------------------------------------------
  1487.  
  1488. ;;      macros                                                               ;;
  1489. ;;      ------                                                               ;;
  1490. ;       EOF nach backquotekomma
  1491.         (read-from-string ",")
  1492.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((UNQUOTE)))"
  1493.  
  1494.         (read-from-string ", ")
  1495.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((UNQUOTE)) LISP::E-READ-TOKEN 
  1496. 4 (\"\"))"
  1497.  
  1498.         (read-from-string "," nil 'dummy)
  1499.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((UNQUOTE)))"
  1500.  
  1501.         (read-from-string ", " nil 'dummy)
  1502.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((UNQUOTE)))"
  1503.  
  1504. ;       . nach backquotekomma
  1505.         (read-from-string ",.")
  1506.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((LISP::UNQUOTE-NSPLICING)) 
  1507.  
  1508. LISP::E-READ-TOKEN 4 (\"\"))"
  1509.  
  1510.         (read-from-string ",. ")
  1511.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((LISP::UNQUOTE-NSPLICING)) 
  1512.  
  1513. LISP::E-READ-TOKEN 4 (\"\"))"
  1514.  
  1515.         (read-from-string ",." nil 'dummy)
  1516.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((LISP::UNQUOTE-NSPLICING)))"
  1517.  
  1518.         (read-from-string ",. " nil 'dummy)
  1519.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((LISP::UNQUOTE-NSPLICING)))"
  1520.  
  1521. ;       ) nach backquotekomma
  1522.         (read-from-string ",)")
  1523.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((UNQUOTE)))"
  1524.  
  1525.         (read-from-string ",) ")
  1526.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((UNQUOTE)))"
  1527.  
  1528.         (read-from-string ",)" nil 'dummy)
  1529.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((UNQUOTE)))"
  1530.  
  1531.         (read-from-string ",) " nil 'dummy)
  1532.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((UNQUOTE)))"
  1533.  
  1534. ;       } nach backquotekomma
  1535. ;;        (read-from-string ",}")
  1536. ;;   "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((UNQUOTE)))"
  1537.  
  1538. ;;        (read-from-string ",} ")
  1539. ;;   "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((UNQUOTE)))"
  1540.  
  1541. ;;        (read-from-string ",}" nil 'dummy)
  1542. ;;   "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((UNQUOTE)))"
  1543.  
  1544. ;;        (read-from-string ",} " nil 'dummy)
  1545. ;;   "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((UNQUOTE)))"
  1546.  
  1547. ;       EOF nach quote
  1548.         (read-from-string "'")
  1549.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((QUOTE)) LISP::E-READ-TOKEN 
  1550. 4 (\"\"))"
  1551.  
  1552.         (read-from-string "' ")
  1553.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((QUOTE)) LISP::E-READ-TOKEN 
  1554. 4 (\"\"))"
  1555.  
  1556.         (read-from-string "'" nil 'dummy)
  1557.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 (NIL))"
  1558.  
  1559.         (read-from-string "' " nil 'dummy)
  1560.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 (NIL))"
  1561.  
  1562. ;       . nach quote
  1563.         (read-from-string "'.")
  1564.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((QUOTE)))"
  1565.  
  1566.         (read-from-string "'. ")
  1567.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUOTE)))"
  1568.  
  1569.         (read-from-string "'." nil 'dummy)
  1570.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((QUOTE)))"
  1571.  
  1572.         (read-from-string "'. " nil 'dummy)
  1573.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUOTE)))"
  1574.  
  1575. ;       ) nach quote
  1576.         (read-from-string "')")
  1577.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUOTE)))"
  1578.  
  1579.         (read-from-string "') ")
  1580.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUOTE)))"
  1581.  
  1582.         (read-from-string "')" nil 'dummy)
  1583.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUOTE)))"
  1584.  
  1585.         (read-from-string "') " nil 'dummy)
  1586.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUOTE)))"
  1587.  
  1588. ;       } nach quote
  1589. ;;        (read-from-string "'}")
  1590. ;;   "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUOTE)))"
  1591.  
  1592. ;;        (read-from-string "'} ")
  1593. ;;   "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUOTE)))"
  1594.  
  1595. ;;        (read-from-string "'}" nil 'dummy)
  1596. ;;   "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUOTE)))"
  1597.  
  1598. ;;        (read-from-string "'} " nil 'dummy)
  1599. ;;   "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUOTE)))"
  1600.  
  1601.  
  1602. ;&----- Tread4.tst -------------------------------------------------------------
  1603. ;(setq lisptest::*error-message* t)
  1604. ;   T
  1605. ;(setq illegal1 (code-char 7))
  1606. ;   #\
  1607. ;(set-syntax-from-char #\B illegal1)
  1608. ;   T
  1609. ;       EOF nach backquote
  1610.         (read-from-string "`")
  1611.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((QUASIQUOTE)) LISP::E-READ-TOKEN 
  1612. 4 (\"\"))"
  1613.  
  1614.         (read-from-string "` ")
  1615.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((QUASIQUOTE)) LISP::E-READ-TOKEN 
  1616. 4 (\"\"))"
  1617.  
  1618.         (read-from-string "`" nil 'dummy)
  1619.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 (NIL))"
  1620.  
  1621.         (read-from-string "` " nil 'dummy)
  1622.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 (NIL))"
  1623.  
  1624. ;       . nach backquote
  1625.         (read-from-string "`.")
  1626.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((QUASIQUOTE)))"
  1627.  
  1628.         (read-from-string "`. ")
  1629.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUASIQUOTE)))"
  1630.  
  1631.         (read-from-string "`." nil 'dummy)
  1632.    "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((QUASIQUOTE)))"
  1633.  
  1634.         (read-from-string "`. " nil 'dummy)
  1635.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUASIQUOTE)))"
  1636.  
  1637. ;       ) nach backquote
  1638.         (read-from-string "`)")
  1639.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUASIQUOTE)))"
  1640.  
  1641.         (read-from-string "`) ")
  1642.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUASIQUOTE)))"
  1643.  
  1644.         (read-from-string "`)" nil 'dummy)
  1645.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUASIQUOTE)))"
  1646.  
  1647.         (read-from-string "`) " nil 'dummy)
  1648.    "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUASIQUOTE)))"
  1649.  
  1650. ;       } nach backquote
  1651. ;;        (read-from-string "`}")
  1652. ;;   "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUASIQUOTE)))"
  1653.  
  1654. ;;        (read-from-string "`} ")
  1655. ;;   "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUASIQUOTE)))"
  1656.  
  1657. ;;        (read-from-string "`}" nil 'dummy)
  1658. ;;   "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUASIQUOTE)))"
  1659.  
  1660. ;;        (read-from-string "`} " nil 'dummy)
  1661. ;;   "(LT-ERROR LISP::E-READ-STRUCTURE 1 ((QUASIQUOTE)))"
  1662.  
  1663. ;       EOF im string
  1664.         (read-from-string "\"a")
  1665.    "(LT-ERROR LISP::E-READ-TOKEN 4 (\"a<\\\">\"))"
  1666.  
  1667.         (read-from-string "\"")
  1668.    "(LT-ERROR LISP::E-READ-TOKEN 4 (\"<\\\">\"))"
  1669.  
  1670.         (read-from-string "\"a" nil 'dummy)
  1671.    "(LT-ERROR LISP::E-READ-TOKEN 4 (\"a<\\\">\"))"
  1672.  
  1673.         (read-from-string "\"" nil 'dummy)
  1674.    "(LT-ERROR LISP::E-READ-TOKEN 4 (\"<\\\">\"))"
  1675.  
  1676. ;       EOF nach \ im string
  1677.         (read-from-string "\"a\\")
  1678.    "(LT-ERROR LISP::E-READ-TOKEN 4 (\"a<\\\">\\\\\"))"
  1679.  
  1680.         (read-from-string "\"\\")
  1681.    "(LT-ERROR LISP::E-READ-TOKEN 4 (\"<\\\">\\\\\"))"
  1682.  
  1683.         (read-from-string "\"a\\" nil 'dummy)
  1684.    "(LT-ERROR LISP::E-READ-TOKEN 4 (\"a<\\\">\\\\\"))"
  1685.  
  1686.         (read-from-string "\"\\" nil 'dummy)
  1687.    "(LT-ERROR LISP::E-READ-TOKEN 4 (\"<\\\">\\\\\"))"
  1688.  
  1689. ;;      disp-macros                                                          ;;
  1690. ;;      -----------                                                          ;;
  1691. ;       EOF in infixarg
  1692.         (read-from-string "#12")
  1693.    "(LT-ERROR E-READ-MACRO 0 (#\\# 12 #\\SPACE NIL))"
  1694.  
  1695.         (read-from-string "#")
  1696.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\SPACE NIL))"
  1697.  
  1698.         (read-from-string "#12" nil 'dummy)
  1699.    "(LT-ERROR E-READ-MACRO 0 (#\\# 12 #\\SPACE NIL))"
  1700.  
  1701.         (read-from-string "#" nil 'dummy)
  1702.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\SPACE NIL))"
  1703.  
  1704. ;       EOF oder illegale zeichenfolge in char
  1705.         (read-from-string "#\\")
  1706.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\\\ \"\"))"
  1707.  
  1708.         (read-from-string "#\\" nil 'dummy)
  1709.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\\\ \"\"))"
  1710.  
  1711.         (read-from-string "#\\con")
  1712.    "(LT-ERROR E-READ-MACRO 0 (#\\# 256 #\\\\ \"\"))"
  1713.  
  1714.         (read-from-string "#\\con" nil 'dummy)
  1715.    "(LT-ERROR E-READ-MACRO 0 (#\\# 256 #\\\\ \"\"))"
  1716.  
  1717.         (read-from-string "#\\m-com-a")
  1718.    "(LT-ERROR E-READ-MACRO 0 (#\\# 512 #\\\\ \"COM-a\"))"
  1719.  
  1720.  
  1721. ;       keine Zahl in #R
  1722.         #10R1a2
  1723.  
  1724.    "(LT-ERROR E-READ-MACRO 1 (#\\# 10 #\\R \"1A2\"))"
  1725. ;       keine zahlensyntax in #R
  1726.         #10Ra12
  1727.  
  1728.    "(LT-ERROR E-READ-MACRO 1 (#\\# 10 #\\R \"A12\"))"
  1729. ;       keine Readbase in #R
  1730.         #40R123
  1731.  
  1732.    "(LT-ERROR E-READ-MACRO 1 (#\\# 40 #\\R \"123\"))"
  1733. ;       EOF oder nichtconstituent nach #:
  1734.         (read-from-string "#:")
  1735.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"#:\"))"
  1736.  
  1737.         (read-from-string "#:" nil 'dummy)
  1738.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"#:\"))"
  1739.  
  1740.         (read-from-string "#:B")
  1741.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"#:B\"))"
  1742.  
  1743. ;       kein Atom nach #:
  1744.         (read-from-string "#:( a b )")
  1745.    "(LT-ERROR LISP::E-READ-TOKEN 3 (\"#:(\"))"
  1746.  
  1747. #:123   
  1748. "(LT-ERROR UNBOUND-VARIABLE 1 #:\\123)"
  1749.  
  1750. ;       kein subchar
  1751. #0111010
  1752. "(LT-ERROR E-READ-MACRO 2 (#\\# 111010 #\\NEWLINE NIL))"
  1753.  
  1754. ;;;;    test fehlerbehandlung in COMREAD1                                  ;;;;
  1755. ;;;;    ---------------------------------                                  ;;;;
  1756. ;;      kommentar                                                            ;;
  1757. ;;      ---------                                                            ;;
  1758. ;       EOF
  1759.         (read-from-string "#|")  ;; |#
  1760.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\| NIL))"
  1761.  
  1762.         (read-from-string "#|abc")  ;; |#
  1763.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\| NIL))"
  1764.  
  1765.         (read-from-string "#|abc|")  ;; |#
  1766.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\| NIL))"
  1767.  
  1768.         (read-from-string "#|abc#")  ;; |#
  1769.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\| NIL))"
  1770.  
  1771.         (read-from-string "#|abc#|de#xyz")  ;; |# |#
  1772.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\| NIL))"
  1773.  
  1774. ;;      vektor                                                              ;;
  1775. ;;      ------                                                              ;;
  1776. ;       EOF
  1777.         (read-from-string "#(a b c")
  1778.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\( (A B C)) LISP::E-READ-TOKEN 
  1779. 4 (\"\"))"
  1780.  
  1781. ;       gelesene anzahl zu gross
  1782.         #3(a b c d e f)
  1783.    "(LT-ERROR E-READ-MACRO 1 (#\\# 3 #\\( (A B C D E F)))"
  1784.  
  1785. ;       falscher abschluss fuer vector
  1786.         (read-from-string "#(a b c . d e f)")
  1787.    "(LT-ERROR E-READ-MACRO 1 (#\\# 0 #\\( (A B C #\\. D E F)))"
  1788.  
  1789. ;;      Zeichen                                                             ;;
  1790. ;;      -------                                                             ;;
  1791. ;       EOF als 1.zeichen
  1792.         (read-from-string "#\\")
  1793.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\\\ \"\"))"
  1794.  
  1795.         (read-from-string "#\\a")
  1796.    #\a
  1797.  
  1798.         #\a\abc-de
  1799.  
  1800.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\\\ \"a\\\\abc-de
  1801. \"))"
  1802.         (read-from-string "#\\a|abc-de")
  1803.  
  1804.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\\\ \"a|abc-de
  1805. \"))"
  1806.         #\a#abc-de
  1807.  
  1808.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\\\ \"a#abc-de
  1809. \"))"
  1810.         #\con\abc-de
  1811.  
  1812.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\\\ \"CON\\\\abc-de
  1813. \"))"
  1814.         (read-from-string "#\\\\")
  1815.    #\\
  1816.  
  1817.         (read-from-string "#\\con-\\")
  1818.    "(LT-ERROR E-READ-MACRO 0 (#\\# 256 #\\\\ \"\\\\\"))"
  1819.  
  1820.         (read-from-string "#\\con|abc-de")
  1821.  
  1822.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\\\ \"CON|abc-de
  1823. \"))"
  1824.         #\con#abc-de
  1825.  
  1826.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\\\ \"CON#abc-de
  1827. \"))"
  1828.         #\con-abc
  1829.  
  1830.    "(LT-ERROR E-READ-MACRO 0 (#\\# 256 #\\\\ \"ABC\"))"
  1831.  
  1832. ;;;     test fehlerbehandlung in COMREAD2                                 ;;;
  1833. ;;;     ---------------------------------                                 ;;;
  1834. ;;      Searcalm                                                           ;;
  1835. ;;      --------                                                           ;;
  1836. ;       keine funktionsliste
  1837. (make-dispatch-macro-character #\X t)
  1838. T
  1839.  
  1840. Xa
  1841. "(LT-ERROR E-READ-MACRO 2 (#\\X NIL #\\a NIL))"
  1842.  
  1843. ;       keine dispatchmacroliste am zeichen
  1844. (set-macro-character #\Y #'cdr t)
  1845. T
  1846.  
  1847. (make-dispatch-macro-character #\Y t)
  1848. T
  1849.  
  1850. Ya
  1851. "(LT-ERROR E-READ-MACRO 2 (#\\Y NIL #\\a NIL))"
  1852.  
  1853. ;       subchar nicht in liste
  1854. (set-dispatch-macro-character #\Y #\. #'car)
  1855. T
  1856.  
  1857. Y,
  1858. "(LT-ERROR E-READ-MACRO 2 (#\\Y NIL #\\, NIL))"
  1859.  
  1860. (progn (SETQ *READTAbLE* (COPY-READTAbLE nil)) t) 
  1861. T
  1862.  
  1863. ;;      Makearray                                                         ;;
  1864. ;;      ---------                                                         ;;
  1865. ;       dimension = 0 und EOF
  1866.         (read-from-string "#0a")
  1867.    "(LT-ERROR E-READ-MACRO 1 (#\\# 0 #\\a NIL) LISP::E-READ-TOKEN 4 
  1868. (\"\"))"
  1869.  
  1870.         (read-from-string "#0a" nil 'dummy)
  1871.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\a NIL))"
  1872.  
  1873. ;       dimension = 0 und ERROR
  1874.         #0a.
  1875.  
  1876.    "(LT-ERROR E-READ-MACRO 1 (#\\# 0 #\\a #\\.))"
  1877.         (read-from-string "#0a)")
  1878.    "(LT-ERROR E-READ-MACRO 1 (#\\# 0 #\\a #\\)))"
  1879.  
  1880. ;;        (read-from-string "#0a}")
  1881. ;;   "(LT-ERROR E-READ-MACRO 1 (#\\# 0 #\\a #\\}))"
  1882.  
  1883. ;       klammereinlesen EOF
  1884.         (read-from-string "#3a(((1)(2))(" )
  1885.    "(LT-ERROR E-READ-MACRO 0 (#\\# 3 #\\a (1 2)))"
  1886.  
  1887.         (read-from-string "#3a(((1)(2))((3" )
  1888.    "(LT-ERROR E-READ-MACRO 0 (#\\# 3 #\\a (1 2 3)) LISP::E-READ-TOKEN 
  1889. 4 (\"\"))"
  1890.  
  1891. ;       klammereinlesen falsche termacro 
  1892.         (multiple-value-list (read-from-string "#3a(((1)(2))(;xyz"))
  1893.    "(LT-ERROR E-READ-MACRO 1 (#\\# 3 #\\a (1 2 #\\;)))"
  1894.  
  1895.         (multiple-value-list (read-from-string "#3a(((1)(2))((3;xyz"))
  1896.    "(LT-ERROR E-READ-MACRO 0 (#\\# 3 #\\a (1 2 3)) LISP::E-READ-TOKEN 
  1897. 4 (\"\"))"
  1898.  
  1899. ;       klammereinlesen falsche zeichen
  1900. (read-from-string "#3a(((1)(2))(axyz")
  1901. "(LT-ERROR E-READ-MACRO 1 (#\\# 3 #\\a (1 2 #\\a)))"
  1902.  
  1903.  
  1904. ;&----- Tread5.tst -------------------------------------------------------------
  1905. (setq lisptest::*error-message* t)
  1906. T
  1907.  
  1908. (read-from-string "#3a(((1)(2))((3 axyz")
  1909. "(LT-ERROR E-READ-MACRO 0 (#\\# 3 #\\a (1 2 3 AXYZ)) LISP::E-READ-TOKEN 
  1910. 4 (\"\"))"
  1911.  
  1912. ;       EOF in obj
  1913.         (read-from-string "#3a(((1)(2))((" )
  1914.    "(LT-ERROR E-READ-MACRO 0 (#\\# 3 #\\a (1 2)) LISP::E-READ-TOKEN 
  1915. 4 (\"\"))"
  1916.  
  1917.         (read-from-string "#3a(((1)(2))((" nil 'dummy)
  1918.    "(LT-ERROR E-READ-MACRO 0 (#\\# 3 #\\a (1 2)))"
  1919.  
  1920. ;       falsche zeichen fuer klammer zu
  1921.         #3a(((1)(2))((3 )(4))((5)(6)))
  1922.    #3A(((1)(2))((3)(4))((5)(6)))
  1923.  
  1924. ;;#3a(((1)(2))((3}
  1925. ;;"(LT-ERROR E-READ-MACRO 1 (#\\# 3 #\\a (1 2 3)))"
  1926.  
  1927. xyz
  1928. "(LT-ERROR UNBOUND-VARIABLE 1 XYZ)"
  1929.  
  1930. (read-from-string "#3a(((1)(2))((3(xyz")
  1931. "(LT-ERROR LISP::E-READ-STRUCTURE 0 ((XYZ)) LISP::E-READ-TOKEN 4 (\"\"))"
  1932.  
  1933.         (read-from-string "#3a(((1)(2))((3" )
  1934.    "(LT-ERROR E-READ-MACRO 0 (#\\# 3 #\\a (1 2 3)) LISP::E-READ-TOKEN 
  1935. 4 (\"\"))"
  1936.  
  1937. ;       falsche klammerung
  1938.         #3a(((1) (2))((3 4)
  1939.    "(LT-ERROR E-READ-MACRO 1 (#\\# 3 #\\a (1 2 3 4)))"
  1940.  
  1941. ;;      Mbitvector                                                           ;;
  1942. ;;      ----------                                                           ;;
  1943. ;       falsche zeichen
  1944.         #*11001a11
  1945.  
  1946.    "(LT-ERROR E-READ-MACRO 1 (#\\# 0 #\\* (49 49 48 48 49 97 49 49)))"
  1947. ;       zu viele elemente
  1948.         #5*111001101
  1949.  
  1950.    "(LT-ERROR E-READ-MACRO 1 (#\\# 5 #\\* (49 49 49 48 48 49 49 48 
  1951. 49)))"
  1952. ;;      Makemacro                                                            ;;
  1953. ;;      ---------                                                            ;;
  1954. ;       complex-obj nicht 2elementige liste
  1955.  
  1956. ;;;declare ?    
  1957. #cab
  1958. "(LT-ERROR E-READ-MACRO 1 (#\\# NIL #\\c AB))"
  1959. ;;;declare ?
  1960. #c(1)
  1961. "(LT-ERROR E-READ-MACRO 1 (#\\# NIL #\\c (1)))"
  1962.  
  1963. #c(1 2 3)
  1964. "(LT-ERROR E-READ-MACRO 1 (#\\# NIL #\\c (1 2 3)))"
  1965.  
  1966. (read-from-string "#c")
  1967. ;alt   "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\c NIL) LISP::E-READ-TOKEN 
  1968. 4 (\"\"))"
  1969. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"\"))"
  1970.  
  1971. ;       EOF nach #'
  1972.         (read-from-string "#'" )
  1973.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\' NIL) LISP::E-READ-TOKEN 4 
  1974. (\"\"))"
  1975.  
  1976.         (read-from-string "#'" nil 'dummy)
  1977.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\' NIL))"
  1978.  
  1979. ;       ERROR nach #'
  1980.         #')
  1981.    "(LT-ERROR E-READ-MACRO 1 (#\\# 0 #\\' #\\)))"
  1982.  
  1983. ;;        #'}
  1984. ;;   "(LT-ERROR E-READ-MACRO 1 (#\\# 0 #\\' #\\}))"
  1985.  
  1986.         #'.
  1987.  
  1988.    "(LT-ERROR E-READ-MACRO 1 (#\\# 0 #\\' #\\.))"
  1989. ;       EOF nach #+
  1990.         (read-from-string "#+" )
  1991. ;alt   "(LT-ERROR LISP::E-READ-TOKEN 4 (\"\"))"
  1992. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"\"))"
  1993.  
  1994.         (read-from-string "#+" nil 'dummy)
  1995. ;falsch   DUMMY
  1996. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"\"))"
  1997.  
  1998.  
  1999. ;       ERROR nach #+
  2000.         (READ-FROM-STRING "#+)")
  2001.    "(LT-ERROR E-READ-MACRO 3 (#\\)))"
  2002.  
  2003. ;;        (READ-FROM-STRING "#+}")
  2004. ;;   "(LT-ERROR E-READ-MACRO 3 (#\\}))"
  2005.  
  2006.         (READ-FROM-STRING "#+.")
  2007.    "(LT-ERROR E-READ-MACRO 3 (#\\.))"
  2008.  
  2009. ;       kein symbol oder liste nach #+
  2010.         (READ-FROM-STRING "#+123")
  2011. ;alt   "(LT-ERROR LISP::E-READ-TOKEN 4 (\"\"))"
  2012. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"\"))"
  2013.  
  2014. ;       EOF nach #-
  2015.         (read-from-string "#-" )
  2016. ;alt   "(LT-ERROR LISP::E-READ-TOKEN 4 (\"\"))"
  2017. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"\"))"
  2018.  
  2019.         (read-from-string "#-" nil 'dummy)
  2020. ;fatsch   DUMMY
  2021. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"\"))"
  2022.  
  2023. ;       ERROR nach #-
  2024.         (read-from-string "#-)")
  2025.    "(LT-ERROR E-READ-MACRO 3 (#\\)))"
  2026.  
  2027. ;;        (read-from-string "#-}")
  2028. ;;   "(LT-ERROR E-READ-MACRO 3 (#\\}))"
  2029.  
  2030.         (read-from-string "#-.")
  2031.    "(LT-ERROR E-READ-MACRO 3 (#\\.))"
  2032.  
  2033. ;       kein symbol oder liste nach #-
  2034.         (read-from-string "#-123")
  2035. ;alt   "(LT-ERROR LISP::E-READ-TOKEN 4 (\"\"))"
  2036. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"\"))"
  2037.  
  2038. ;       EOF nach #.
  2039.         (read-from-string "#." )
  2040.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\. NIL) LISP::E-READ-TOKEN 4 
  2041. (\"\"))"
  2042.  
  2043.         (read-from-string "#." nil 'dummy)
  2044.    "(LT-ERROR E-READ-MACRO 0 (#\\# 0 #\\. NIL))"
  2045.  
  2046. ;       ERROR nach #.
  2047.         #.)
  2048.    "(LT-ERROR E-READ-MACRO 1 (#\\# 0 #\\. #\\)))"
  2049.  
  2050. ;;        #.}
  2051. ;;   "(LT-ERROR E-READ-MACRO 1 (#\\# 0 #\\. #\\}))"
  2052.  
  2053.         #..
  2054.  
  2055.    "(LT-ERROR E-READ-MACRO 1 (#\\# 0 #\\. #\\.))"
  2056. ;       nach #1a keine (
  2057.         #1ax
  2058.    "(LT-ERROR E-READ-MACRO 1 (#\\# 1 #\\a #\\x))"
  2059.  
  2060.         (read-from-string "#1a")
  2061.    "(LT-ERROR E-READ-MACRO 1 (#\\# 1 #\\a #\\*))"       
  2062. ;       EOF nach #n=
  2063.         (read-from-string "#1=" )
  2064. ;alt   "(LT-ERROR LISP::E-READ-TOKEN 4 (\"\"))"
  2065. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"\"))"
  2066.  
  2067.         (read-from-string "#1=" nil 'dummy)
  2068. ;falsch   DUMMY
  2069. "(LT-ERROR E-READ-MACRO 3 (NIL) LISP::E-READ-TOKEN 4 (\"\"))"
  2070.  
  2071. ;       ERROR nach #1=
  2072.         (READ-FROM-STRING "#1=)")
  2073.    "(LT-ERROR E-READ-MACRO 3 (#\\)))"
  2074.  
  2075. ;;        (READ-FROM-STRING "#1=}")
  2076. ;;   "(LT-ERROR E-READ-MACRO 3 (#\\}))"
  2077.  
  2078.         (READ-FROM-STRING "#1=.")
  2079.    "(LT-ERROR E-READ-MACRO 3 (#\\.))"
  2080.  
  2081. ;       label nicht gefunden
  2082.         (READ-FROM-STRING "#11111#")
  2083.    "(LT-ERROR E-READ-MACRO 1 (#\\# 11111 #\\# NIL))"
  2084.  
  2085. (progn
  2086. (makunbound 'illegal1)
  2087. (setq lisptest::*error-message* nil)
  2088. (setq *print-circle* t) 
  2089. T)
  2090. T
  2091. |#
  2092.  
  2093.