Is there a re guru out there?

David Mertz, Ph.D. mertz at gnosis.cx
Mon Jul 8 14:59:36 EDT 2002


|Krzysiek Czarnowski <krzysiek at dgt-lab.com.pl> wrote:
|: I try to convert some LaTeX constructs to "plain" equivalents like \(,\) -->
|: $, \[,\] --> $$
|: and \frac{...}{...} --> {...\over ...}. The \frac bit appeared not to be
|: trivial since ... should be balanced with respect to { }.

Daniel Yoo <dyoo at hkn.eecs.berkeley.edu> wrote previously:
|Parsing is a large topic, so someone more competent than me should
|handle it.  *grin*.  But here's an article that talks about parsing
|with Python:
| http://www-106.ibm.com/developerworks/linux/library/l-simple.html?dwzone=linux

Although I'm not sure I can sell myself as a parsing expert, I do agree
that a parsing solution is the right way do this nested matching.
Moreover, I have expanded somewhat on my earlier SimpleParse article
that Yoo references.

Take a look at Chapter 4 of my _Text Processng in Python_ book draft,
which looks a bit at parsing theory (not profoundly, just as a practical
review) and state machines, then at mx.TextTools, SimpleParse, and PLY.
The whole book (as much as I've written) is at:

    http://gnosis.cx/TPiP/

And the appropriate chapter, a click past that.

--
 mertz@   _/_/_/_/_/_/_/ THIS MESSAGE WAS BROUGHT TO YOU BY:_/_/_/_/ v i
gnosis  _/_/                    Postmodern Enterprises         _/_/  s r
.cx    _/_/  MAKERS OF CHAOS....                              _/_/   i u
      _/_/_/_/_/ LOOK FOR IT IN A NEIGHBORHOOD NEAR YOU_/_/_/_/_/    g s






More information about the Python-list mailing list