Category : C Source Code
Archive   : TBISON0.ZIP
Filename : !READ.ME

 
Output of file : !READ.ME contained in archive : TBISON0.ZIP
Several modifications were necessary to make the version of Bison
that I selected compile with Turbo C. Four 32767 word arrays were
replaced by pointers. The function meminit, called from main before
anything else is done, allocates 32760 word arrays using calloc.
A few minor errors and warnings were fixed. The result was a Bison
source for the Turbo C large data models.

When conflict messages occured in the ".out" files, the token
names came out as garbage. These strings were saved in temp_block
and later overwritten. I allocated a 16k block for tokens. The
function str_allocate in "allocate.c" is called by copys in
"symtab.c".

In the original version, if the source filename in the command
line did not end in ".y" (in lower case), Bison attempted to append
".c", ".a", etc.; to the whole filename. This version looks for the
last '.' and the last '\' to determine whether the filename has a
'.', and where. If none, the source is assumed to be ".y". In any
case, Bison now knows where to attach the output filetypes.

A parser .c will contain the line:

#define YYWHO ".r"

I am testing a version of the parser that reads rules text and token
names. When yydebug is nonzero, rules and tokens are output instead of
rule and token numbers.

The only implementation of alloca that I found was a source of
potential problems for a Bison-generated parser, particularly if
it is compiled in a small data model. I removed the stack extension
from "simparse" and substituted three defaults for the parser stack.
The small data models have a default stack size of 200. The large
data models have a default stack size of 500. If YYBIGSTACK is
defined in the large data models, the parser stack is allocated
from the heap and the size is the number of YYLTYPE variables that
will fit in 65520 bytes.


  3 Responses to “Category : C Source Code
Archive   : TBISON0.ZIP
Filename : !READ.ME

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/