home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / linux / 25789 < prev    next >
Encoding:
Text File  |  1993-01-28  |  2.9 KB  |  144 lines

  1. Nntp-Posting-Host: maud.ifi.uio.no
  2. Newsgroups: comp.os.linux
  3. Path: sparky!uunet!munnari.oz.au!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sunic!aun.uninett.no!nuug!ifi.uio.no!janl
  4. From: janl@ifi.uio.no (Jan Nicolai Langfeldt)
  5. Subject: 4.2 libs, i/o bug?
  6. Message-ID: <1993Jan27.154154.4669@ifi.uio.no>
  7. Summary: seems like a legit bug.
  8. Sender: janl@ifi.uio.no (Nicolai Langfeldt)
  9. Organization: Folkeaksjonen for gjeninsettelse av Revolvermagasinet
  10. Date: Wed, 27 Jan 1993 15:41:54 GMT
  11. Lines: 130
  12. Originator: janl@maud.ifi.uio.no
  13.  
  14.  
  15. I have been working on getting cim (simula->C translator) compiled on
  16. linux, this fall it was almost done except for some problems with fp
  17. in the ends of the representation spectre. This was with 4.1 libs and
  18. gcc2.2.2d7. When I wanted to look at it again during xmas break all
  19. the old binary produced was parsing errors for a legit program. Now
  20. using 4.2 libs, gcc 2.3.3, the kernel has also been updated.
  21.  
  22. The problem seems to come from the interaction between getc(3) and
  23. ungetc(3). EOF is not reached, and the file is reread from start. See
  24. debug output below. I would welcome any suggestions on how to proceed,
  25. if maybe this is a known bug?
  26.  
  27. Inserting printf("INPUT %d %c",c,c) in the input procedure and
  28. printf("UNPUT %d %c",c,c) in the unput proc. of the tokenizer and
  29. running it on this program:
  30.  
  31. -----
  32. begin
  33.   outtext("Hello world!");
  34.   outimage;
  35. end;
  36. % llllllllllllllllllllllllll
  37. % lllllllllllllllllll
  38. -----
  39.  
  40. Gives this trace:
  41. -------
  42. Compiling helloworld.sim:
  43. "helloworld.sim", line 2: Parse error.
  44. INPUT: 98 b                   # BEGIN
  45. UNPUT: 66 B
  46. INPUT: 66 B
  47. INPUT: 98 b
  48. INPUT: 101 e
  49. INPUT: 103 g
  50. INPUT: 105 i
  51. INPUT: 110 n
  52. INPUT: 10 
  53.  
  54. UNPUT: 10 
  55.  
  56. line: 1 yylex:BBEGIN 
  57. INPUT: 10 
  58.  
  59. INPUT: 32  
  60. UNPUT: 32  
  61. INPUT: 32  
  62. INPUT: 32  
  63. INPUT: 111 o            # Outtext...
  64. INPUT: 117 u
  65. INPUT: 116 t
  66. INPUT: 116 t
  67. INPUT: 101 e
  68. INPUT: 120 x
  69. INPUT: 116 t
  70. INPUT: 40 (
  71. UNPUT: 40 (
  72. line: 2 yylex:OUTTEXT 
  73. lval : 408296 val : 408296
  74. INPUT: 40 (
  75. line: 2 yylex:( 
  76. INPUT: 34 "
  77. INPUT: 72 H
  78. INPUT: 101 e
  79. INPUT: 108 l
  80. INPUT: 108 l
  81. INPUT: 111 o
  82. INPUT: 32  
  83. INPUT: 119 w
  84. INPUT: 111 o
  85. INPUT: 114 r
  86. INPUT: 108 l
  87. INPUT: 100 d
  88. INPUT: 33 !
  89. INPUT: 34 "
  90. INPUT: 41 )
  91. UNPUT: 41 )
  92. line: 2 yylex:"Hello world!" 
  93. INPUT: 41 )
  94. line: 2 yylex:) 
  95. INPUT: 59 ;
  96. line: 2 yylex:; 
  97. INPUT: 10 
  98.  
  99. INPUT: 32  
  100. UNPUT: 32  
  101. INPUT: 32  
  102. INPUT: 32  
  103. INPUT: 111 o            # Outimage
  104. INPUT: 117 u
  105. INPUT: 116 t
  106. INPUT: 105 i
  107. INPUT: 109 m
  108. INPUT: 97 a
  109. INPUT: 103 g
  110. INPUT: 101 e            
  111. INPUT: 59 ;
  112. UNPUT: 59 ;
  113. line: 3 yylex:"helloworld.sim", line 5: Parse error.
  114. OUTIMAGE 
  115. INPUT: 59 ;
  116. line: 3 yylex:; 
  117. lval : 369160 val : 369160
  118. INPUT: 10 
  119.  
  120. INPUT: 101 e            # The fun starts here it seems, the 'e' of
  121. UNPUT: 69 E            # 'end' is read, then the file is restarted.
  122. INPUT: 69 E
  123. INPUT: 98 b
  124. INPUT: 101 e
  125. INPUT: 103 g
  126. INPUT: 105 i
  127. INPUT: 110 n
  128. INPUT: 10 
  129.  
  130. UNPUT: 10 
  131.  
  132. line: 4 yylex:EBEGIN 
  133. INPUT: 10 
  134.  
  135. INPUT: 32  
  136. UNPUT: 32  
  137. INPUT: 32  
  138. ....
  139.  
  140.  
  141. -- 
  142. Nicolai Langfeldt, "Bugs made while you wait"
  143. Internet: janl@ifi.uio.no
  144.