Loading ...
Sorry, an error occurred while loading the content.

Amazing (to me) inter-Linux OS compatibility

Expand Messages
  • thad_floryan
    I was going to write about this program on Friday but other matters took precedence. Here s a short story that I ll expand later with examples. One program
    Message 1 of 3 , Apr 1 10:56 PM
    • 0 Attachment
      I was going to write about this program on Friday but other matters
      took precedence. Here's a short story that I'll expand later with
      examples.

      One program I've been using since the 1980s is appt which produces a
      "simple" ASCII calendar suitable for printing and posting on, say, the
      refrigerator door. It's an extremely flexible utility program whose
      smarts come from the fact 3 separate compilers are needed to create
      the executable:

      lex - a lexical analyzer generator/compiler,
      yacc - LALR parser generator (Yet Another Compiler-Compiler), and
      [g]cc - a C compiler

      For info about those compilers:

      see "man lex" or the GNU version named flex
      see "man yacc" or the GNU version named bison
      see "man gcc"

      If you don't have those man pages online, use this website for them:

      <http://linux.die.net/> really useful

      The last time I built/compiled the program was in June 2005 on my X86
      Red Hat 9 laptop after copying-over the results from lex and yacc
      compiled on a Solaris system for its better character handing (so I
      could enter, for example, the nickname of my housekeeper Magdalena
      which is Neña (note the title over the lower-case "N") instead of
      continuing with just Nena).

      Well, on Friday I simply copied the executable and my personal config
      file, .appt, to my CentOS system and, voilà, it worked perfectly.

      Today I copied the executable and the .appt file to my Ubuntu 8.04.4
      LYS system and it worked perfectly there, too.

      I thought that was simply amazing given different OSs and the date of
      the executable's creation and I'm wondering if anyone here in the
      group has experienced such a level of binary portabiity:

      procyon bash 4680/4682> ls -l /usr/local/bin/appt
      -rwxr-xr-x 1 thad thad 18948 Jun 15 2005 /usr/local/bin/appt

      procyon bash 4680/4682> file /usr/local/bin/appt
      /usr/local/bin/appt: ELF 32-bit LSB executable, Intel 80386, \
      version 1 (SYSV), dynamically linked (uses shared libs), for \
      GNU/Linux 2.2.5, stripped

      procyon bash 4680/4682> uname -a
      Linux procyon 2.6.32-220.7.1.el6.x86_64 #1 SMP Wed Mar 7 \
      00:52:02 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux
    • thad_floryan
      ... A really good 9-page lex and yacc intro and mini-tutorial is here: Full docs should be on any linux
      Message 2 of 3 , Apr 2 10:12 PM
      • 0 Attachment
        --- In linux@yahoogroups.com, "thad_floryan" <thad@...> wrote:
        > [...]
        > One program I've been using since the 1980s is appt which produces a
        > "simple" ASCII calendar suitable for printing and posting on, say, the
        > refrigerator door. It's an extremely flexible utility program whose
        > smarts come from the fact 3 separate compilers are needed to create
        > the executable:
        >
        > lex - a lexical analyzer generator/compiler,
        > yacc - LALR parser generator (Yet Another Compiler-Compiler), and
        > [g]cc - a C compiler
        >
        > For info about those compilers:
        >
        > see "man lex" or the GNU version named flex
        > see "man yacc" or the GNU version named bison
        > see "man gcc"
        >
        > If you don't have those man pages online, use this website for them:
        >
        > <http://linux.die.net/> really useful
        > [...]

        A really good 9-page lex and yacc intro and mini-tutorial is here:

        <http://linux.die.net/HOWTO/Lex-YACC-HOWTO-1.html>

        Full docs should be on any linux system and available at the command
        line per (all 4 forms for both should work on all systems):

        $ info lex or "pinfo lex" or "info flex" or "pinfo flex"
        and
        $ info yacc or "pinfo yacc" or "info bison" or "pinfo bison"

        Manuals are here:

        <http://www.gnu.org/manual/flex/> GNU's lex

        <http://www.gnu.org/manual/bison/> GNU's bison (a pun of "yak")

        Original reference documents:

        <http://www.cs.utexas.edu/users/novak/lexpaper.htm>

        <http://www.cs.utexas.edu/users/novak/yaccpaper.htm>

        Hardcopy manuals from O'Reilly (Google "o'reilly lex book"):

        lex & yacc, 2nd Edition, 388 pages, 1992:

        <http://shop.oreilly.com/product/9781565920002.do>

        flex & bison, 304 pages, August 2009:

        <http://shop.oreilly.com/product/9780596155988.do>
      • thad_floryan
        ... The GNU page that had the above two URLs is in error -- those pages don t exist. I found this: along with
        Message 3 of 3 , Apr 3 4:48 AM
        • 0 Attachment
          --- In linux@yahoogroups.com, "thad_floryan" <thad@...> wrote:
          > [...]
          > Manuals are here:
          >
          > <http://www.gnu.org/manual/flex/> GNU's lex
          >
          > <http://www.gnu.org/manual/bison/> GNU's bison (a pun of "yak")
          > [...]

          The GNU page that had the above two URLs is in error -- those pages
          don't exist.

          I found this:

          <http://www.gnu.org/s/bison/manual/bison.pdf>

          along with these:

          <http://tldp.org/HOWTO/pdf/Lex-YACC-HOWTO.pdf>

          <http://www.lugbe.ch/action/reports/lex_yacc.pdf>

          The info/pinfo for bison. flex, lex and yacc will have to suffice
          unless you want hardcopy books.
        Your message has been successfully submitted and would be delivered to recipients shortly.