note
demerphq
<!--
<code></code>
<i></i>
<b></b>
[ ]
-->
<p><em>Parsing is the task of taking structured information and analyzing the structure. This is a very different task, and regular expressions (as they currently are) are simply not designed to do it.</em></p>
<p>
Parsing typically has two phases though, the first is Tokenization and the second Parse Tree Generation (Im sure there is a better term but I forget what it is). These phases more often then not occur in synch but they need not. Either way regexes are perfectly suited to tokenization.
</p>
<p>
I learned the most about regexes from writing a regex tokenizer and parser. I learned a lot more from the tokenizer than from the parser tho. :-) Writing regexes to tokenize regexes is a fun head trip. (Incidentally the whole idea was to be able to use regexes to specify and generate random test data.)
</p>
<br />
---
<br />
demerphq<br />
<br />
<sub><[Elian]> And I do take a kind of perverse pleasure in having an OO assembly language...
<!--
<hr />
<p>
<strong>• Update: </strong><br />
</p>
-->
</sub>
<br />
272213
272336