-/* Lexical analysis of a file
- Strips a filename to its base name, then sends it to lexer_lexstring before
- pushing a PATH token with the filename
- Returns the number of tokens pushed to the parser.
-*/
-int lexer_lexfile
-( uint8_t const* filename )
-{ uint8_t const* last_period,* iter;
- int ntok;
- last_period = NULL;
- for (iter = filename; *iter; iter++)
- if (*iter == '.')
- last_period = iter;
- if (last_period)
- { ntok = lexer_lexstring(filename, (int)(last_period - filename));
- PUSHTOK(PATH,filename);
- return ntok + 1;
- }
- return lexer_lexstring(filename, (int)(iter - filename));
-}