Clipper lex & yacc 
Author Message
 Clipper lex & yacc

We would like to propose this thread that finally may bring a complete lex &
yacc specifications for Clipper with the cooperation of all the Clipper
users community.

Our plan is to start discussing them, step by step, so many of you could
make a start on these issues and then be able to cooperate on the project.

Are you interested ?

regards,

Antonio Linares
www.fivetech.com



Sat, 01 Sep 2001 03:00:00 GMT  
 Clipper lex & yacc

Quote:

> We would like to propose this thread that finally may bring a complete lex
> & yacc specifications for Clipper with the cooperation of all the Clipper
> users community.

> Our plan is to start discussing them, step by step, so many of you could
> make a start on these issues and then be able to cooperate on the project.

> Are you interested ?

Sounds of interest to me (and I know of a couple of others who would be
interested as well).

BTW, does your offer of releasing the source for Five under the GPL still
hold good? I've been meaning to mail you about this for a while.

--
Take a look in Hagbard's World: |   w3ng - The WWW Norton Guide reader.
http://www.acemake.com/hagbard/ |     eg - Norton Guide reader for Linux.
http://www.hagbard.demon.co.uk/ |    weg - Norton Guide reader for Windows.
Free software, including........| dgscan - DGROUP scanner for Clipper.



Sat, 01 Sep 2001 03:00:00 GMT  
 Clipper lex & yacc
Sergey,

Lex is a lexical analizer and Yacc is a syntax analizer. What I mean is to
have the lex and yacc rules to be able to parse any clipper PRG. From that
point many tools could be generated:

* A Clipper to C language translator.
* A Clipper to other languages translator (Java, etc.)
* A Clipper compiler.
* etc.

A brief sample:

function Test

return 123

Lex should recognize: "function", "Test", one or more carriage return,
"return", "123"

Yacc should recognize:

A function is made by several tokens:

Function : FunctionHeader Statements

FunctionHeader: FUNCTION Identifier Crlf

Statements: RETURN Expression Crlf

Expression : NUMBER

etc...

Just the beginning :-)

regards,

Antonio Linares
www.fivetech.com



Sat, 01 Sep 2001 03:00:00 GMT  
 Clipper lex & yacc
Dave,

Quote:
> Sounds of interest to me (and I know of a couple of others who would be
> interested as well).

Great.

Quote:
> BTW, does your offer of releasing the source for Five under the GPL still
> hold good? I've been meaning to mail you about this for a while.

I don't like the idea of releasing a 'big thing' that very few will
understand. I am looking for help to get a 'perfect' Lex and Yacc for
Clipper and I think that if I help some other people to start on it, then
everybody will benefit.

regards,

Antonio Linares
www.fivetech.com



Sat, 01 Sep 2001 03:00:00 GMT  
 Clipper lex & yacc
Dave,

My proposed tools for this project are:

* Lex (I do use a ported flex to MsDos. Public domain)
* Byacc (Berkeley Yacc. Public domain).

Certainly I also would like if you could use other available lex and yacc,
as bison, etc... so we may know that what we do will work on many platforms.

If we could find an available FTP I could upload them there so we could all
start using the same tools. Phil, would you help us ?

regards,

Antonio Linares
www.fivetech.com



Sat, 01 Sep 2001 03:00:00 GMT  
 Clipper lex & yacc
Bambang,

Quote:
> Where is the role of lex above ?

lex identifies the tokens from the input file.

Quote:
> and if we compile,link and run this C
> language file. You said it will parse a Clipper PRG - what is the
> output of the parsing  ?

First goal is just to parse it without errors. Then we may start defining
'production rules', that is, what to do on certain matches. We could easily
start a Clipper to C translator, a Clipper compiler, etc.

regards,

Antonio Linares
www.fivetech.com



Sun, 02 Sep 2001 03:00:00 GMT  
 Clipper lex & yacc
On Wed, 17 Mar 1999 09:07:25 +0100, "Antonio Linares"

Quote:

>Phil,

>> Sure, email them to me and I'll get them on the site.

>Done. Many thanks.

>Once you announce their availability I may start discussing how to use them,
>samples, etc.
>They are very interesting tools! The sword to atack the dragon... :-)

ftp://ftp.iag.net/pub/clipper/utils/byacc19.zip

This is the only file I got. Is there a Lex I'm supposed to get out
there?

--

        Oasis WWW  http://www.iag.net/~philb/
         FTP Site  ftp://ftp.iag.net/pub/clipper
      Clipper FAQ  http://www.iag.net/~philb/clipper.html

      Do unto others as you would have it done unto you,

      All of our problems, all of our conflicts, all of
      our difficulties in creating a life on our planet
      of peace and joy are based in our failure to
      understand this simple instruction and follow it.



Mon, 03 Sep 2001 03:00:00 GMT  
 Clipper lex & yacc
Phil,

ftp://ftp.iag.net/pub/clipper/utils/byacc19.zip

Quote:
> This is the only file I got. Is there a Lex I'm supposed to get out
> there?

It is included into the bin directory: lex.exe and lex.sk.

Ok, so we are ready to go for a GNU Clipper :-)

regards,

Antonio Linares
www.fivetech.com



Mon, 03 Sep 2001 03:00:00 GMT  
 Clipper lex & yacc
: first question:      What is LEX?
: second question: What is YACC?
: A better question: Why should I care?

: P.S. I losing the fight with code blocks!

Why should you fight with the code blocks? :-)

--
         *** Learn Esperanto - the International Language! ***
One language for all           |      Unu por chiuj,
the second for everyone!       |     la dua por chiu!



Mon, 03 Sep 2001 03:00:00 GMT  
 Clipper lex & yacc
On Thu, 18 Mar 1999 08:38:20 +0100, "Antonio Linares"

Quote:

>Phil,

>ftp://ftp.iag.net/pub/clipper/utils/byacc19.zip

>> This is the only file I got. Is there a Lex I'm supposed to get out
>> there?

>It is included into the bin directory: lex.exe and lex.sk.

>Ok, so we are ready to go for a GNU Clipper :-)

Where do we begin?

--

        Oasis WWW  http://www.iag.net/~philb/
         FTP Site  ftp://ftp.iag.net/pub/clipper
      Clipper FAQ  http://www.iag.net/~philb/clipper.html

      Do unto others as you would have it done unto you,

      All of our problems, all of our conflicts, all of
      our difficulties in creating a life on our planet
      of peace and joy are based in our failure to
      understand this simple instruction and follow it.



Tue, 04 Sep 2001 03:00:00 GMT  
 Clipper lex & yacc
Scott,

Seeing that you got no answer - and I would like to know as well - I'll make
a guess and hope somebody corrects me. I've seen GNU being mentioned and I
seem to remember that that was the name of a set of tools wriiten by
Berkeley University for the Unix system (GNU Emacs the editor etc....) So I
think they ( the top notch clipperheads here) are going to try to build a
Clipper compiler for Unix.
I hope somebody will explain here in simple language if I'm writing
something very stupid here.

kind regards,
Peter Paul Jansen
The Netherlands

Quote:

>first question:      What is LEX?
>second question: What is YACC?
>A better question: Why should I care?

>P.S. I losing the fight with code blocks!
>--
>Scott Burke




Thu, 06 Sep 2001 03:00:00 GMT  
 Clipper lex & yacc

|Phil can give you the inside story on GNU...but in simple terms... what
|Antonio is trying to start here is a kind of public domain Clipper
|project..with an open source concept such as Linux.

Actually, I think of the regular contributors, Dave Pearson is the
person with the greatest experience and familiarity with GNU, and the
Free Software Foundation.  Perhaps he will correct my below remarks, if
I err.

The "GNU GENERAL PUBLIC LICENSE" (GPL) is a set of terms for
copyrighting software that is promulgated by the Free Software
Foundation (FSF).  Some, but not all, GPL'd software is owned by the
FSF.  The GPL is one example, but not the only one, of "Open Source"
licenses.  The Berkeley Sofware License is a different set of terms that
is generally considered less restrictive than GPL.  Neither of these
copyrights makes the material covered under it *Public Domain*, which is
a term for otherwise copyrightable material that has been released from
copyright protection.

For GPL in particular, the intention is to let the copyright act like a
"virus" by "infecting" all derived work.  The license says, in very
short summary, "This software must be made distributable in source form,
and as part of the terms you agree to in using this software, you must
make all derived works also freely distributable."  Linux is covered by
these general terms, although I believe the kernel has a slightly
different license than the GPL.  The ideological position behind the GPL
is to use copyrights against themselves, for the purpose of creating
cooperation rather than private for-profit ownership of software
"knowledge" (i.e. source code).  Lots of debates rage on the details.

I do not know whether Antonio's idea is to use GPL, BSL, the Perl
"Artistic License", LGPL, or some other license for his "Free Clipper"
project.  Or maybe he actually would prefer to make it public domain.
If it were up to me, I would probably opt for the last option... but I
have not done any work towards it, so it is obviously not up to me.  It
may be that Antonio has not really thought through the differences
between these options, and just has a general notion of a "Free"
project.

It probably makes sense to come to an understanding of the terms that
will be used fairly early in this project, if it moves forward
significantly.  The people who might contribute to it will have a
different set of rights depending on the terms of the whole project.  An
understanding of those rights could very well influence the terms on
which those contributors would be able or willing to contribute their
own work to the project.

All IMHO.

Yours, Lulu...

--

net     | alliance...ideas have nothing to lose but their chains.  Unite
        | against "intellectual property" and anti-privacy regimes!
-------------------------------------------------------------------------



Fri, 07 Sep 2001 03:00:00 GMT  
 Clipper lex & yacc

Quote:
> Actually, I think of the regular contributors, Dave Pearson is the person
> with the greatest experience and familiarity with GNU, and the Free
> Software Foundation. Perhaps he will correct my below remarks, if I err.

As you've done a good job of setting out the details and differences in the
different licensing methods I don't think I've got anything to add, but,
permit me to do a little bit of nit-picking.

Quote:
> The "GNU GENERAL PUBLIC LICENSE" (GPL) is a set of terms for copyrighting
> software that is promulgated by the Free Software Foundation (FSF).

The GPL is more about the licence for use and distribution and the warranty
of a body of code. Copyright is simply a tool used (and abused, hence the
reason the document is sometimes called the "copyleft") to enforce the
licence (if you take my meaning). It's a very subtle difference but one I
think people should understand (it wouldn't hurt for people to read the
likes of the GPL).

Quote:
> I do not know whether Antonio's idea is to use GPL, BSL, the Perl
> "Artistic License", LGPL, or some other license for his "Free Clipper"
> project. Or maybe he actually would prefer to make it public domain. If it
> were up to me, I would probably opt for the last option...

My own opinion right now is GPL for the grammar/parser/compiler and PD for
the library code (as per DJGPP <URL: http://www.*-*-*.com/ ;).

Quote:
> It probably makes sense to come to an understanding of the terms that will
> be used fairly early in this project, if it moves forward significantly.
> The people who might contribute to it will have a different set of rights
> depending on the terms of the whole project. An understanding of those
> rights could very well influence the terms on which those contributors
> would be able or willing to contribute their own work to the project.

[Nodding] For this reason alone I've not made much of an effort to get
involved because I'm unclear as to exactly what terms Antonio wants to
release his work (he's the one with a code "cache"{*filter*} around in the
background) and before I think about putting time and effort into coming up
to speed with the tools and thinking about some of the problems I'd like to
know what I'm contributing to and under what terms.

As it is, Antonio has said he'd like to make this a "GNU project" so I'm
assuming that he'd like it placed under the GPL and that he'd like the
Copyright to be signed over to the FSF. Sometime today or tomorrow I'll be
composing an email to the GNU project to find out more about what sort of
support structure (mailing lists, ftp space, etc...) is available for a
project like this.

--
Take a look in Hagbard's World: |   w3ng - The WWW Norton Guide reader.
http://www.*-*-*.com/ |     eg - Norton Guide reader for Linux.
http://www.*-*-*.com/ |    weg - Norton Guide reader for Windows.
Free software, including........| dgscan - DGROUP scanner for Clipper.



Fri, 07 Sep 2001 03:00:00 GMT  
 Clipper lex & yacc

Quote:
> Seeing that you got no answer - and I would like to know as well - I'll
> make a guess and hope somebody corrects me. I've seen GNU being mentioned
> and I seem to remember that that was the name of a set of tools wriiten by
> Berkeley University for the Unix system (GNU Emacs the editor etc....)

Nope, see GNU project <URL:http://www.gnu.org/> for details about the GNU
project.

Quote:
> So I think they ( the top notch clipperheads here) are going to try to
> build a Clipper compiler for Unix.

What Antonio is doing is he's making available a grammar that will allow
anyone to write a Clipper parser. With this grammar it will be possible to
write a number of different tools that need to grok Clipper source code. For
example, using the grammar you could write a tool to strip all static
strings from your source to make your application multi-lingual (I've done
this using a non-grammar method and take it from me, it isn't fun).

Obviously the grammar will also allow people to write a Clipper compiler,
and it doesn't have to be for Un*x either.

As to the questions about Lex and Yacc, Antonio has already explained what
they are in this thread. Anyone coming in late should consult DejaNews.

--
Take a look in Hagbard's World: |   w3ng - The WWW Norton Guide reader.
http://www.acemake.com/hagbard/ |     eg - Norton Guide reader for Linux.
http://www.hagbard.demon.co.uk/ |    weg - Norton Guide reader for Windows.
Free software, including........| dgscan - DGROUP scanner for Clipper.



Fri, 07 Sep 2001 03:00:00 GMT  
 
 [ 17 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Clipper lex & yacc and parser, build 8

2. Clipper lex & yacc build 6

3. Q: Lex&YACC smalltalk version ?

4. Lex & Yacc for Smalltalk

5. Harbour Project | Lex & Yacc Guide

6. LEX & YACC

7. (YACC&LEX) PL/I Grammar

8. (YACC&LEX) PL/1 Grammar

9. lex & yacc questions

10. YACC & LEX

11. lex & yacc for scheme

12. YACC & lex and Ruby

 

 
Powered by phpBB® Forum Software