paperlined.org
dev > perl > lexers_parsers
document updated 11 years ago, on Sep 17, 2012

regexp-based parsers

Generally, there are three strategies: 1) move a pointer through the string, keeping track of the position via m/\G ... /gc, 2) consume each token from the front end of the string using s///, or 3) use the (?{code}) call at the end of each match, along with $^N to see what just matched (and possibly $^R as well)

parsers that aren't regexp-based