View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Jake Donham > perl5-byacc-patches-0.6 > Fstream



Annotate this POD

View/Report Bugs


Fstream - a class to encapsulate a filehandle as a stream;


    use Fstream;


Fstream wraps a filehandle and provides methods that make it easier to write a lexer.

Class Methods =over 4

new($filehandle, $name) Creates an Fstream object from $filehandle (a filehandle glob reference). $name is a string which is stored for debugging purposes and may be accessed with &name.

Object Methods =over 4

getc Returns the next character in the stream, or the empty string if the stream has been exhausted.
ungetc Pushes the last character read back onto the stream, where it will be returned on the next call to getc. You may only push one character back on the stream.
lineno Returns the line-number of the stream (based on the number of newlines seen).
name Returns the name that was given in the constructor.
syntax highlighting: