... then process line by line?
As a proper data structure, not plain text. A data structure has, well, structure. You need that structure to identify which types of tokens you have and what they mean.
I tend to use objects for this, but an ad hoc hash will serve as well for your experiments.
In reply to Re^3: snakes and ladders
by chromatic
in thread snakes and ladders
by Logicus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |