Carl Glassberg
2013-03-29 00:35:29 UTC
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
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