Hi Jed,

> I think that is just going to be a lot of regular expressions and text 
parsing and, while that may not be trivial, I at least have a pretty good 
idea how to make it work.

The trick to text parsing is to tokenise the text first, i.e. perform a 
preliminary step that converts a flat string of characters like `xyz = i * 
99` into a list of tokens like ["xyz", "=", "i", "*", "99"]. You can then 
process the tokens without having to worry about having to ignore things 
like whitespace and comments.

You can either do the tokenisation in one fell swoop up front, or get the 
parser to call a tokenise function whenever it needs the next token.

I recently wrote a parser for the new railroad diagram plugin, which you 
may find helpful:

https://github.com/Jermolene/TiddlyWiki5/tree/master/plugins/tiddlywiki/railroad

– æ

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to