| 1 | ### The lexer init of this EC/numerical analysis system, the numerical system | ||
| 2 | |||
| 3 | use parent 'Evo::Parser::lexer' | ||
| 4 | |||
| 5 | sub new { | ||
| 6 | my $class = shift; | ||
| 7 | |||
| 8 | ### subclass of the original Evo::Parser lexer.pm | ||
| 9 | $self = $class->SUPER::new; | ||
| 10 | |||
| 11 | ### NOTE : this is the default init | ||
| 12 | $self->{gasourcefilename} = "./maple.l"; | ||
| 13 | |||
| 14 | ### the words (string) syntax scanned in | ||
| 15 | $self->{scans} = undef; | ||
| 16 | } | ||
| 17 | |||
| 18 | ### main API | ||
| 19 | sub lexscan { | ||
| 20 | ($self, $filename) = shift; | ||
| 21 | |||
| 22 | $self->init($self->{gasourcefilename}); | ||
| 23 | $self->scan(undef, $filename); ### NOTE : the aggregatee is empty | ||
| 24 | |||
| 25 | $self->{lexerscanner}->get_scans; | ||
| 26 | } | ||
| 27 | |||
| 28 | 1; |