Return to algebra2tex.pl CVS log | Up to [LON-CAPA] / loncom / xml / algebra |
- break up the large regexp
1: #!/usr/bin/perl 2: 3: use lib '.'; 4: use AlgParser; 5: 6: my $parser = new AlgParserWithImplicitExpand; 7: my $ret; 8: 9: foreach $str (@ARGV) { 10: $ret = $parser -> parse($str); 11: if ( ref($ret) ) { 12: $parser -> tostring(); 13: $parser -> normalize(); 14: print $parser -> tolatex(); 15: } else { 16: print $parser->{htmlerror}; 17: } 18: print "\n"; 19: } 20: