in reply to Re: Writing a parser
in thread Writing a parser
while (<FH>) { s/#.*$//; my @args = split(' ', $_); next unless @args; ... process command ... }
If, however, you have any recursive syntactical elements (like begin/end grouping symbols which need to be matched), a proper parser written with Parser::RecDescent is probably in order.
|
|---|