SCOUG-Programming Mailing List Archives
Return to [ 14 |
April |
2005 ]
Content Type: text/plain
> "Why can't we just write the LEX & YACC for PL/I and have
> an open source PL/I compiler?"
>
> It's going to come a shock to you, but LEX & YACC have a C
> result. Now if you had a PL/I version of LEX & YACC.... If you
> don't understand the difference, then I suggest you read K&R's
> "The C Programming Language" to see what they regarded as
> unnecessary and left out. When you have a programming
> language in which keywords, e.g. "int", are reserved words,
> which PL/I does not, then you have a problem. And the list
> goes on and on and on.
>
> " But Lynn, based storage is ghost storage, shadow box
> storage, glass matte storage. It isn't "allocated". It is instead
> a way of interpreting previously allocated storage."
>
> In fact you can allocate and free it as well as use it in
> conjunction with the 'addr' builtin function as a "roaming"
> means of redefining existing data storage. You can do this
> because pointer (address) data in PL/I is a separate data type
> unassociated with (or an attribute of) another data type as in
> C. That creates another reason why LEX & YACC will not
> work.
So because LEX and YACC output a C intermediate, the untimate
compiler can only process C constructs? I guess that the g77
and g95 parts of GCC are figments of my imagination-even though
they manage to compile my old dusty deck FORTRAN programs. I
guess that I must also assume that the Ada and the Java front
ends to GCC are also incapable of compiling real Ada and Java
code.
Do we have here an argument that to write a compiler for some
language X you must use a superset of language X for the compiler?
If I am writing the compiler in language Q, then I am forever
limited to the data types of language Q? So if language X has a
data type "blat", then I can only use the native implementation
of "blat" in language X to compile "blat". Is this because
compiler writers are incapable of using the native data types
of Q to define a DATA STRUCTURE for "blat"? Are the compiler
writers incapable of writing a DLL to carry out the operations
on this DATA STRUCTURE that has been defined for the data type
"blat"?
--
Gregory W. Smith (WD9GAY) gsmith@well.com
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".
For problems, contact the list owner at
"postmaster@scoug.com".
=====================================================
Return to [ 14 |
April |
2005 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
|