[Coco] dbg.l

Steven Hirsch snhirsch at gmail.com
Fri May 6 07:50:45 EDT 2011


On Thu, 5 May 2011, Stephen H. Fischer wrote:

> Hi,
>
> Remind me of what LEX is. My idea perhaps matches something else I saw
> during my searches.

It's generically known as a token-scanner or "tokenizer".  Usually the 
first step in writing a language translator.  The tokenizer breaks up the 
original source into tokens (or "lexemes" in the literature) which may 
additionally have a value.  So, something like:

if ( foo ) ..

might become

token		value

IF_SYM		(none)
'('		(none)
IDENTIFIER_SYM	"foo"
')'		(none)

etc.  Single characters are generally represented by their ASCII rank 
(integers in 0..255). Symbolic tokens (e.g. 'if') are defined as integers 
>255.

That token stream is fed to the parser which tries to fit it into the 
defined grammar for the language in question.  In classic Unix 
environments the parser is generated from a grammar definition by 'yacc' 
(or 'bison' in the brave GNU world) which stands for "Yet Another Compiler 
Compiler"...

Probably more than you wanted to know, but language translators are a 
favorite subject of mine.

Steve


>
> I came up with some ideas about expanding the article code I built during
> the searches also.
>
> If the download count of SHF80 increases beyond the current count of two, I
> may look into expanding it. No stuffing the ballot box please, one vote per
> person.
>
> Actual posts by persons wishing to debug "C" code counts much more.
>
> But first the debugger I found on John Collier's hard disk needs looking at.
>
> "mylib.l", and "LI VDG lib", where did they come from?
>
> "CC252", I need a normal ZIP, I am far from a running OS-9 system to burst 
> bad LZH archives (Or AR ones, or Cuts also).
>
> I have been looking only with Windows Explorer, Wordpad and Lotus Magellan 
> 2.0. John Collier's hard disk has suspect copies expanded, that's all that I 
> have been looking at as far as "CC" source. Much quicker for searching than 
> running an emulator with OS-9. I erased my hard disk on the last running 
> system two years ago. I said I was doing it the FBI way.
>
> SHF
>
> ----- Original Message ----- From: "Willard Goosey" <goosey at virgo.sdc.org>
> To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
> Sent: Thursday, May 05, 2011 8:32 PM
> Subject: Re: [Coco] dbg.l
>
>
>> On Thu, May 05, 2011 at 04:52:25PM -0700, Stephen H. Fischer wrote:
>>> I think perhaps you should give up.
>> 
>> Yeah, looks like.  Well, I tried.
>> 
>> I also conclude that lex.l (as supported by CC252) is also vaporware.
>> No one had it, no one used it, no one knows nothing about a port of LEX
>> to OS-9.  As a programming-language nut I think that's sad.
>> 
>> Well, I can always try to figure out the args needed by the function
>> calls for that LI VDG lib, or the mysterious mylib.l.
>> 
>>> Time would be better spent adding to the article code I built, it did
>>> work
>>> and I used it.
>>> 
>>> That is at the "C" source level and requires no knowledge of asm which I
>>> think was what made "dbg.l' not useful.
>>> 
>> Yeah, that does look useful.  I'll try it if my next C program needs
>> some debugging, and looking back at my programs it seems it probly will.
>> :-)
>> 
>> Willard
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>

-- 




More information about the Coco mailing list