Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Browsers ,vim Vs. Emacs etc....

From: greggirwin:mindspring at: 16-Mar-2002 11:31

Joel, et al << Since much data from mainframes, or obtained via OCR (from TSU/SSU sources, of course! ;-), is in fixed-record layout, it would be interesting to have a program that would attempt to infer "field" positions and lengths by examining the content of the data. >> Do you remember our "table parsing" discussion some time ago? This strikes me as a very similar problem, but with some added rules that may make things a little trickier. I'm not a COBOL/CICS/Mainframe guy, but I have had to deal with their data at times. Most recently, I wrote a copy-lib parser (pseudo parser is probably more accurate) so I could extract the format of a record and generate a VB class from it, which then understands how to convert data to/from a fixed buffer, but provides a native object for use in VB authored apps. Records come and go via TCP sockets. I haven't seen any really good examples of dealing with fixed length data in REBOL, but it should certainly be possible. Start with a good dialect on the REBOL side. Given a copylib, you could generate code in the dialect, or maybe just interpret the copylib directly. The biggest problems I ran into were strange and ambiguous things in copylibs. If you wanted it to be complete, it would have to cover a pretty wide range of possibilities, but PARSE should be well up to the task. --Gregg