Re: Regular expression parsers



Rich Townsend wrote:

Does anyone know of Perl-like regular expression parsers written in Fortran? With the advent of F2003, I imagine we can use the C interop stuff to achieve the desired effect, but until compilers start appearing, I was wondering whether there is a F9X solution.

How hard is it to call the C routines from Fortran? CHARACTER
variables might be a little harder than numeric ones.

I would probably write intermediate C programs to do the needed
conversions. It will be implementation specific, but maybe not
too specific. The regex_t pointer is mostly where it can store
some needed information, I believe including a pointer to dynamically
allocated space. A CHARACTER variable of appropriate size should do.

-- glen

.



Relevant Pages

  • Re: C programming on ARM
    ... It's a fair point that there is a difference what you can rely on for real, practical C and what the standards say. ... right shifts working as expected, division rounding as expected, char ... Aside from alignment problems (which may mean that using the pointer does not "just work", even if conversions back and forth do), ... You can't rely on these things having a consistent pointer size - you should not even rely on the C requirement of a "void *" supporting them all (embedded compilers don't always follow the standards if they conflict with generating good object code for real-world source code). ...
    (comp.arch.embedded)
  • Re: (FAQ details:) malloc(), void * and casts
    ... My understanding is that recommended practice is to not cast the ... Its like recommending that you ... Many C++ compilers have vastly superior warnings ... a pointer to any other type. ...
    (comp.lang.c)
  • Re: Total order on floating point numbers
    ... I know of who has tried out overflow trapping for C signed integers. ... I don't know if they have C compilers. ... a C pointer on either a read or write operation. ... including their size, as system dependent. ...
    (comp.arch.arithmetic)
  • Re: struct initilization via memset
    ... >>will all initialize the pointer to a null pointer. ... By the time of the first ANSI C standard, C had been around for well ... over 10 years and C compilers were developed for quite a few different ... expression with a value of 0 cast to pointer to void. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: <ctype.h> toLower()
    ... >by reference rather than returning a pointer, unless you need to return a ... >it's just called passing by reference. ... World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90. ... Comeau C/C++ with Dinkumware's Libraries... ...
    (alt.comp.lang.learn.c-cpp)