File:  [LON-CAPA] / loncom / xml / algebra / algebra2tex.pl
Revision 1.2: download - view: text, annotated - select for diffs
Thu Feb 24 08:24:40 2005 UTC (19 years, 4 months ago) by albertel
Branches: MAIN
CVS tags: version_1_99_1_tmcc, version_1_99_0_tmcc, HEAD
- 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: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>