Re: [Oberon] Preprocessing
Hello Gérard,
It find sometimes in Bluebottle sources texts that look like preprocessor instructions ($IF ... $END). Builder.Compile \D=gerard ... $IF gerard THEN ... { $ELSIF ... } [ $ELSE ... ] $END I can't find any documentation about this feature. For "documentation" see Builder.Compile, Builder.get. It's just a Builder goodie.
Regards, Edgar -- edgar@edgarschwarz.de "http://www.edgarschwarz.de" "http://www.edgar-schwarz.de/forum/oberon" Running Active Oberon Make it as simple as possible, but not simpler. Albert Einstein
Hello Gérard,
It find sometimes in Bluebottle sources texts that look like
Thanks, Edgar. I see now. Introduced in 96. A rather old feature. Unfortunately, I see that the grammatical structure of a mod file becomes more and more complex. The grammar of AOS, for example, has no exact EBNF description yet. Regards. Gérard ----- Original Message ----- From: <Edgar@edgarschwarz.de> To: <oberon@inf.ethz.ch> Cc: <Edgar@edgarschwarz.de> Sent: Tuesday, June 17, 2003 9:46 PM Subject: Re: [Oberon] Preprocessing preprocessor
instructions ($IF ... $END). Builder.Compile \D=gerard ... $IF gerard THEN ... { $ELSIF ... } [ $ELSE ... ] $END I can't find any documentation about this feature. For "documentation" see Builder.Compile, Builder.get. It's just a Builder goodie.
Regards, Edgar
-- edgar@edgarschwarz.de "http://www.edgarschwarz.de" "http://www.edgar-schwarz.de/forum/oberon" Running Active Oberon Make it as simple as possible, but not simpler. Albert Einstein -- Oberon@inf.ethz.ch mailing list for ETH Oberon and related systems http://www.lists.inf.ethz.ch/mailman/listinfo/oberon
Unfortunately, I see that the grammatical structure of a mod file becomes more and more complex. The grammar of AOS, for example, has no exact EBNF description yet. Try http://www.bluebottle.ethz.ch/languagereport/node7.html for the EBNF.
--Thomas
Hello Thomas, Sorry, but this syntax is far from exact. I can give many examples. I just give one now: If you read the syntax of OBJECT type, you see that its fields must be given by VAR declarations, each one being followed by a semicolon, right? But omit the last semicolon, before an END, and the compiler accepts your omission. In fact, the right syntax would be a mix of DeclSeq and FieldList; not so easy to write. As long as you use only a standard compiler, no real problem. But if you want to make your own syntactical tools, it's a little tricky. Regards. Gérard ----- Original Message ----- From: Thomas Frey <frey@inf.ethz.ch> To: <oberon@inf.ethz.ch> Sent: Wednesday, June 18, 2003 8:47 AM Subject: Re: [Oberon] Preprocessing
Unfortunately, I see that the grammatical structure of a mod file becomes more and more complex. The grammar of AOS, for example, has no exact EBNF description yet. Try http://www.bluebottle.ethz.ch/languagereport/node7.html for the EBNF.
--Thomas
-- Oberon@inf.ethz.ch mailing list for ETH Oberon and related systems http://www.lists.inf.ethz.ch/mailman/listinfo/oberon
Hello Gérard,
It find sometimes in Bluebottle sources texts that look like
This is correct. The reason why it is not documented is because it is deprecated and we would like to remove it (it is IMHO a bad practice, and makes sources unreadable). We inserted this feature in the builder while experimentating with the handling of multiple system versions. We have since then found a better approach by using file name prefixes, the feature remained to handle old, out-dated, sources. -Patrik ----- Original Message ----- From: <Edgar@EdgarSchwarz.de> To: <oberon@inf.ethz.ch> Cc: <Edgar@EdgarSchwarz.de> Sent: Tuesday, June 17, 2003 9:46 PM Subject: Re: [Oberon] Preprocessing preprocessor
instructions ($IF ... $END). Builder.Compile \D=gerard ... $IF gerard THEN ... { $ELSIF ... } [ $ELSE ... ] $END I can't find any documentation about this feature. For "documentation" see Builder.Compile, Builder.get. It's just a Builder goodie.
Regards, Edgar
-- edgar@edgarschwarz.de "http://www.edgarschwarz.de" "http://www.edgar-schwarz.de/forum/oberon" Running Active Oberon Make it as simple as possible, but not simpler. Albert Einstein -- Oberon@inf.ethz.ch mailing list for ETH Oberon and related systems http://www.lists.inf.ethz.ch/mailman/listinfo/oberon
----- Original Message ----- From: Patrik Reali <reali@acm.org> To: <oberon@inf.ethz.ch> Sent: Wednesday, June 18, 2003 8:51 AM Subject: Re: [Oberon] Preprocessing
This is correct. The reason why it is not documented is because it is deprecated and we would like to remove it (it is IMHO a bad practice, and makes sources unreadable).
We inserted this feature in the builder while experimentating with the handling of multiple system versions. We have since then found a better approach by using file name prefixes, the feature remained to handle old, out-dated, sources.
-Patrik
Not so old. In fact I found my first example in the last files of antsInFields. But I agree with you: IMHO too, this feature makes sources less readable, manually and automatically. Regards. Gérard
Not so old. In fact I found my first example in the last files of antsInFields. But I agree with you: IMHO too, this feature makes sources less readable, manually and automatically.
Stil, I have used the feature to have one makefile for all versions of Oberon. Sometimes it's harder to keep the makefiles up to date than the sources. And I have made the following experience: If having all the different module parts for different versions in one file, it is more likely, that I don't forget one (of the four!) versions. Maybe I should be more organized... But, as the compiler directives are deprecated, I'll remove them in the next release. Felix. -- Felix Friedrich Institut für Biomathematik und Biometrie GSF - Forschungszentrum für Umwelt und Gesundheit, GmbH Ingolstädter Landstraße 1, D-85764 Neuherberg Tel: ++49 89 3187 2436 email: friedrich@gsf.de --
Not so old. In fact I found my first example in the last files of antsInFields. But I agree with you: IMHO too, this feature makes sources less readable, manually and automatically.
Stil, I have used the feature to have one makefile for all versions of Oberon. Sometimes it's harder to keep the makefiles up to date than the sources. And I have made the following experience: If having all the different module parts for different versions in one file, it is more likely, that I don't forget one (of the four!) versions. Maybe I should be more organized... But, as the compiler directives are deprecated, I'll remove them in the next release.
Felix.
Let's be clear. I greatly appreciate your work. It was not a critic. Just a general remark. Regards. Gérard
----- Original Message ----- From: Patrik Reali <reali@acm.org> To: <oberon@inf.ethz.ch> Sent: Wednesday, June 18, 2003 8:51 AM Subject: Re: [Oberon] Preprocessing
This is correct. The reason why it is not documented is because it is deprecated and we would like to remove it (it is IMHO a bad practice, and makes sources unreadable).
We inserted this feature in the builder while experimentating with the handling of multiple system versions. We have since then found a better approach by using file name prefixes, the feature remained to handle
I mean ETH code. We have of course no influence on thirdparty code. -Patrik ----- Original Message ----- From: "Gérard Meunier" <gmeunier@club-internet.fr> To: <oberon@inf.ethz.ch> Sent: Wednesday, June 18, 2003 4:20 PM Subject: Re: [Oberon] Preprocessing old,
out-dated, sources.
-Patrik
Not so old. In fact I found my first example in the last files of antsInFields. But I agree with you: IMHO too, this feature makes sources less readable, manually and automatically.
Regards.
Gérard
-- Oberon@inf.ethz.ch mailing list for ETH Oberon and related systems http://www.lists.inf.ethz.ch/mailman/listinfo/oberon
participants (5)
-
Edgar@EdgarSchwarz.de -
Felix Friedrich -
Gérard Meunier -
Patrik Reali -
Thomas Frey