Discussion:
ISO Modula-2 text filter project on Google Code - Enjoy
(too old to reply)
Carl Glassberg
2013-03-29 00:35:29 UTC
Permalink
Hello everyone:

I created a project, "m2-text-filters", on Google Code, for making
available example text filters using ISO Modula-2.

The first filter ISOFilter10.mod, is available on its "Wiki" page
linked to the project's main page at
<http://code.google.com/p/m2-text-filters/>
You can also search for "Modula" from the main Google Code page and
find it that way.

The filters are released under "The M.I.T. License", a "permissive"
license. See the Open Source Initiative page
<http://opensource.org/licenses/mit-license.php> for a copy of the
license.

There is documentation in the form of "Wiki" pages but I need to learn
to be more concise.

The filter was tested on the Stony Brook/ADW and p1 ISO-Modula-2
compilers, but the posted filter is for the
p1 compiler. To adapt the source for SB/ADW m2, you only need to
comment-out the first "ProgramArgs.NextArg()".
SB/ADW m2 already skips the tool-name so that line is only for p1.

I did not test the filters on other ISO m2 systems, such as Gnu m2
(gm2).

The filters are designed to simplify treatment of end-of-line, so that
a EOL character constant is returned instead of the user explicitly
calling SkipLine. It is only important that EOL be a control character
not appearing in the input text file, so I used 36C because Logitech
did. Of course, behind the scene, SkipLine is called.
Pat Terry's FileIO library (ISO m2 version), found in Coco/R, is an
earlier use of this method of simplifying end-of-line handling for the
user.

The emulation of Logitech/Lilith (Medos) is not correct with respect
to nul (0C) characters. At least for SB/ADW, a 0C appearing in the
input signals a logical end-of-file, where in Logitech or Lilith/Medos
it did not. For most input text files, nul (0C) shouldn't appear, so
perhaps this limitation will not be too inconvenient.

As recommended or by definition, input text files should not contain
control codes other than optional horizontal tab and required system
end-of-line characters (cr, lf, cr lf).

Enjoy

Sincerely
Carl Glassberg
Carl Glassberg
2013-03-30 17:18:27 UTC
Permalink
Hello again:

There are 3 text filters now in the project at <http://code.google.com/
p/m2-text-filters/>:
ISOFilter10.MOD
ISOFilter3.MOD
Crunch0.MOD

I apologize that the syntax colorization is inconsistant among the 3
filter's Wiki pages.

I used the recommended {{{...}}} to bracket the source, and
Crunch0.MOD doesn't look too awful.

The other 2 filters (ISOFilter10 & ISOFilter3): something is causing
the displayed source to turn "green" on both when some character is
seen, perhaps a single quote or backslash?

I don't know if this is something that can be fixed.

I don't think Google Code is necessarily supporting Modula-2 syntax-
highlighting.

I tried using <pre> ... </pre> to bracket the code but ran into a lot
of problems getting the indentation to look right. As it is, I had to
used horizontal tabs just to get horizontal alignment to work, but the
indentation depth is a lot more than I prefer.

I will try sometime in the future to link to my own web pages some
better pretty-printed versions.

Carl Glassberg
---
Post by Carl Glassberg
I created a project, "m2-text-filters", on Google Code, for making
available example text filters using ISO Modula-2.
<snip...>
Post by Carl Glassberg
Enjoy
Sincerely
Carl Glassberg
Carl Glassberg
2013-03-30 17:46:39 UTC
Permalink
Hello once more:
I just fixed the problem with a work-around:
I replaced the 0 apostrophe with different wording to avoid the single
quote.
The backslash I just replaced with the octal character constant 134C.

Now at least the colorization is better.

Carl
----
Post by Carl Glassberg
There are 3 text filters now in the project at <http://code.google.com/
ISOFilter10.MOD
ISOFilter3.MOD
Crunch0.MOD
I apologize that the syntax colorization is inconsistant among the 3
filter's Wiki pages.
I used the recommended {{{...}}} to bracket the source, and
Crunch0.MOD doesn't look too awful.
The other 2 filters (ISOFilter10 & ISOFilter3): something is causing
the displayed source to turn "green" on both when some character is
seen, perhaps a single quote or backslash?
I don't know if this is something that can be fixed.
I don't think Google Code is necessarily supporting Modula-2 syntax-
highlighting.
I tried using <pre> ... </pre> to bracket the code but ran into a lot
of problems getting the indentation to look right. As it is, I had to
used horizontal tabs just to get horizontal alignment to work, but the
indentation depth is a lot more than I prefer.
I will try sometime in the future to link to my own web pages some
better pretty-printed versions.
Carl Glassberg
---
Post by Carl Glassberg
I created a project, "m2-text-filters", on Google Code, for making
available example text filters using ISO Modula-2.
<snip...>
Post by Carl Glassberg
Enjoy
Sincerely
Carl Glassberg
Carl Glassberg
2013-04-01 01:35:01 UTC
Permalink
Hello once again:

Currently I can only recommend for these text-filters that users adopt
p1 Modula2 because I am experiencing problems on my Windows laptop
running ADW/Stony Brook Modula-2.

I do not yet know the problem.
I recently had a hardware problem involving the built-in CD-RAM reader/
writer, but I don't know if that is the difficulty.

I hope that Gnu Modula-2 (Gm2) is available for testing these filters
since as a Linux-based system, the p1-versions might work without
much, if any modification.

Sincerely
Carl Glassberg
---
Post by Carl Glassberg
I created a project, "m2-text-filters", on Google Code, for making
available example text filters using ISO Modula-2.
The first filter ISOFilter10.mod, is available on its "Wiki" page
linked to the project's main page at
<http://code.google.com/p/m2-text-filters/>
You can also search for "Modula" from the main Google Code page and
find it that way.
The filters are released under "The M.I.T. License", a "permissive"
license. See the Open Source Initiative page
<http://opensource.org/licenses/mit-license.php> for a copy of the
license.
There is documentation in the form of "Wiki" pages but I need to learn
to be more concise.
The filter was tested on the Stony Brook/ADW and p1 ISO-Modula-2
compilers, but the posted filter is for the
p1 compiler. To adapt the source for SB/ADW m2, you only need to
comment-out the first "ProgramArgs.NextArg()".
SB/ADW m2 already skips the tool-name so that line is only for p1.
I did not test the filters on other ISO m2 systems, such as Gnu m2
(gm2).
The filters are designed to simplify treatment of end-of-line, so that
a EOL character constant is returned instead of the user explicitly
calling SkipLine. It is only important that EOL be a control character
not appearing in the input text file, so I used 36C because Logitech
did. Of course, behind the scene, SkipLine is called.
Pat Terry's FileIO library (ISO m2 version), found in Coco/R, is an
earlier use of this method of simplifying end-of-line handling for the
user.
The emulation of Logitech/Lilith (Medos) is not correct with respect
to nul (0C) characters. At least for SB/ADW, a 0C appearing in the
input signals a logical end-of-file, where in Logitech or Lilith/Medos
it did not. For most input text files, nul (0C) shouldn't appear, so
perhaps this limitation will not be too inconvenient.
As recommended or by definition, input text files should not contain
control codes other than optional horizontal tab and required system
end-of-line characters (cr, lf, cr lf).
Enjoy
Sincerely
Carl Glassberg
Loading...