Re: Using the same subroutine to read files with different structures




Gary Scott schreef:


Does anybody have a general purpose Fortran-based parser that does
something minimal like:

receive a string of text
tokenizes to either space and comma delimited strings or space and comma
delimited tokens of a specified size (e.g. 8-byte tokens, truncated)
scans for "keyword=" syntax
handles comma separation of tokens
handles literal string delimiting
returns an array of keyword strings
returns an associated array of keyword values
all text, no value conversion.

something more sophisticated?


My flibs project (http://flibs.sf.net) contains several modules that
may
be of interest here:

- A pattern matcher (a limited form of glob patterns)
- A tokeniser
- A module for dealing with strings of arbitrary length

Regards,

Arjen

.



Relevant Pages

  • Comma in Web Part parameters
    ... I have two webparts, one providing to strings, the other one reciving the two strings. ... If I have a comma in the first parameter the parameter is striped after the comma and the second parameter is empty. ... In my logfiles I can see, that the first web part fires his event with the correct parameters but the second one recives the corrupted data. ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: RFC: Representation of large hex values
    ... Replacing the comma with the underscore and moving the whole shebang ... to printf/scanf sounds like a good idea to me. ... like strings and ints. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Unexpected string behaviour: txt = this works
    ... I did a double take when debugging an error the other day. ... problem was missing out a comma when building a list of strings. ...
    (comp.lang.python)
  • Re: getting Nth position in a comma delimited string..
    ... > Why not Split them and use trim on the strings? ... > HTH, ... > Shane Story ... >> I would like to return the value from any position within the comma ...
    (microsoft.public.dotnet.languages.vb)
  • Re: PDF Keywords
    ... I am using pdfTeX and its macro \pdfinfo to define the PDF keywords: ... The specified strings must obey the rules for PDF strings. ... % * a keyword separator is not necessary, ...
    (comp.text.tex)