[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to use parsing expressing grammar
From: |
Xah Lee |
Subject: |
how to use parsing expressing grammar |
Date: |
Wed, 17 Dec 2008 03:53:07 -0800 (PST) |
User-agent: |
G2/1.0 |
There are 2 parsing expression grammars in elisp.
* http://www.emacswiki.org/cgi-bin/wiki/ParserCompiler, (2008) by
Mike Mattie.
* http://www.emacswiki.org/emacs/ParsingExpressionGrammars (2008)
by Helmut Eller.
The second one seems simpler, and i'm trying to learn it as a regex
replacement, but don't know how to use it.
Could anyone give concrete example in the following scenario?
For example, on my website i have things like:
<hr>
<p>Related essays:</p>
<ul>
<li><a href="someFilePath1">SomeTitleString2</a> someSring1</li>
<li><a href="someFilePath2">SomeTitleString2</a> someSring2</li>
...
</ul>
Suppose i want to change them to:
<hr>
<p>See also:</p>
<p>
<a href="someFilePath1">SomeTitleString1</a> someSring1<br>
<a href="someFilePath2">SomeTitleString2</a> someSring2<br>
...
</p>
How do i do it?
Thanks.
Xah
∑ http://xahlee.org/
☄
- how to use parsing expressing grammar,
Xah Lee <=
Re: how to use parsing expressing grammar, ashishnkadakia, 2008/12/24