Compiler Grammar/Token Rules OT
Archiver
Posts: 46,084
At 03:28 PM 6/6/00 -0500, you wrote:
>Wow! I played with Snobol years ago. Still have the old "green book" around
>somewhere. It is plain that Aho, Wienberg, and Kernigham (AWK) knew Snobol
>and Perl borrows from AWK a lot. Not as notationally clean as Snobol, but...
>
>I had not even thought of a PC-based Snobol.
Mark Emmer (at Catspaw, Inc. in Salida, CO) heroically supports SNOBOL4 and
SPITBOL - at least for the following processors: MSDOS, Windows 95/98/NT,
RS/6000, Macintosh -- also for IBM mainframes (MVT).
>
>YACC is nice (or GNU's Bison) but I have found them to be overwrought for
>Basic.
>
>Yes, a #define and #if type facility would be nice. Of course, you can do
>that now with M4. In fact, I wonder if we couldn't cobble up M4 macros so
>you could write:
>
>%if blah then
> yadda
>%else
> yadda
>%end if
>
>My M4 is rusty, I'm afraid.
>
>Regards,
>
>Al Williams
>AWC
>*Expand your Stamp I/O: http://www.al-williams.com/awce/pak3.htm
>
>
>>
Original Message
>> From: Larry Pfeffer [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ZPwuyx6ssSoDgjt_0oLOdtC_suwo7yJWjWl72weNKSvTZzpa9Np1gEwMEE4VfMXOnN0dRRGpQ3bdwA]lpfeffer@a...[/url
>> Sent: Wednesday, June 07, 2000 12:51 AM
>> To: basicstamps@egroups.com
>> Subject: Re: [noparse][[/noparse]basicstamps] Re: Compiler Grammar/Token Rules
>>
>>
>> Suggestions:
>>
>> a) of all languages probably SNOBOL or SPITBOL are most suitable ---
>> probably much faster to write/more malleable than in PERL. S*BOL-s are a
>> vintage 1960 family with amazingly powerful string processing/pattern
>> matching. Downside -- the language is kind of dead (stopped evolving). See
>> www.snobol4.com
>>
>> b) also, there must be many generic macro/pre-processors with ability to
>> define grammar (extended PBasic++) and emitted code (PBasic). Compiler
>> writing tools a la YACC may be worth looking at ...
>>
>> c) one of the most valuable features of a pre-processor is adding compile
>> time capabilities - e.g. to be able to generate device specific PBasic fro
>> a more generic program --- and someting even simpler & essential: #include
>> to be able to include (conditionally or unconditionally) library code. A
>> rudimentary pre-processor would allow support BS1 & BS2 processors from a
>> single PBasic++. ...
>>
>>
>>
>>
>> At 07:30 PM 6/6/00 +0000, you wrote:
>> >> I had been thinking about this and possibly writing a QBASIC
>> >program
>> >> to do it - you could always edit the pre-processor generated PBasic.
>> >> E.g. you could have it recognise IF ... THEN .... ELSE and generate
>> >> the equivalently more complex BSII PBasic text.
>> >>
>> >> Big question? Has anyone done this and is anyone doing this?
>> >
>> ><
>
>> >
>> >I have started a pre-processor for PBASIC like this, however it has
>> >been put
>> >on the back-burner for a short while due to some other priorities of
>> >mine.
>> >
>> >If anyone has any suggestions on what they would like to see in a
>> >program
>> >like this, feel free to email me OFF-LIST at electrolinx@y...
>> >and I
>> >will be sure to add any do-able suggestions to the program.
>> >
>> >Thanks,
>> >Jared
>> >
>> >Electrolinx - http://www.geocities.com/electrolinx/
>> >VB Overdrive - http://extreme-vb.net/vboverdrive/
>> >
>> >
>> >
>> >
>> >
>>
>>
>>
>>
>
>
>
>
>Wow! I played with Snobol years ago. Still have the old "green book" around
>somewhere. It is plain that Aho, Wienberg, and Kernigham (AWK) knew Snobol
>and Perl borrows from AWK a lot. Not as notationally clean as Snobol, but...
>
>I had not even thought of a PC-based Snobol.
Mark Emmer (at Catspaw, Inc. in Salida, CO) heroically supports SNOBOL4 and
SPITBOL - at least for the following processors: MSDOS, Windows 95/98/NT,
RS/6000, Macintosh -- also for IBM mainframes (MVT).
>
>YACC is nice (or GNU's Bison) but I have found them to be overwrought for
>Basic.
>
>Yes, a #define and #if type facility would be nice. Of course, you can do
>that now with M4. In fact, I wonder if we couldn't cobble up M4 macros so
>you could write:
>
>%if blah then
> yadda
>%else
> yadda
>%end if
>
>My M4 is rusty, I'm afraid.
>
>Regards,
>
>Al Williams
>AWC
>*Expand your Stamp I/O: http://www.al-williams.com/awce/pak3.htm
>
>
>>
Original Message
>> From: Larry Pfeffer [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ZPwuyx6ssSoDgjt_0oLOdtC_suwo7yJWjWl72weNKSvTZzpa9Np1gEwMEE4VfMXOnN0dRRGpQ3bdwA]lpfeffer@a...[/url
>> Sent: Wednesday, June 07, 2000 12:51 AM
>> To: basicstamps@egroups.com
>> Subject: Re: [noparse][[/noparse]basicstamps] Re: Compiler Grammar/Token Rules
>>
>>
>> Suggestions:
>>
>> a) of all languages probably SNOBOL or SPITBOL are most suitable ---
>> probably much faster to write/more malleable than in PERL. S*BOL-s are a
>> vintage 1960 family with amazingly powerful string processing/pattern
>> matching. Downside -- the language is kind of dead (stopped evolving). See
>> www.snobol4.com
>>
>> b) also, there must be many generic macro/pre-processors with ability to
>> define grammar (extended PBasic++) and emitted code (PBasic). Compiler
>> writing tools a la YACC may be worth looking at ...
>>
>> c) one of the most valuable features of a pre-processor is adding compile
>> time capabilities - e.g. to be able to generate device specific PBasic fro
>> a more generic program --- and someting even simpler & essential: #include
>> to be able to include (conditionally or unconditionally) library code. A
>> rudimentary pre-processor would allow support BS1 & BS2 processors from a
>> single PBasic++. ...
>>
>>
>>
>>
>> At 07:30 PM 6/6/00 +0000, you wrote:
>> >> I had been thinking about this and possibly writing a QBASIC
>> >program
>> >> to do it - you could always edit the pre-processor generated PBasic.
>> >> E.g. you could have it recognise IF ... THEN .... ELSE and generate
>> >> the equivalently more complex BSII PBasic text.
>> >>
>> >> Big question? Has anyone done this and is anyone doing this?
>> >
>> ><
>
>> >
>> >I have started a pre-processor for PBASIC like this, however it has
>> >been put
>> >on the back-burner for a short while due to some other priorities of
>> >mine.
>> >
>> >If anyone has any suggestions on what they would like to see in a
>> >program
>> >like this, feel free to email me OFF-LIST at electrolinx@y...
>> >and I
>> >will be sure to add any do-able suggestions to the program.
>> >
>> >Thanks,
>> >Jared
>> >
>> >Electrolinx - http://www.geocities.com/electrolinx/
>> >VB Overdrive - http://extreme-vb.net/vboverdrive/
>> >
>> >
>> >
>> >
>> >
>>
>>
>>
>>
>
>
>
>