Class UniFile |
A class that supports buffered production of tokens from a file containing Unicon source code. The class can save a copy of the source code in a format suitable for output (e.g. an HTML document), but only if the call setSaveSrc("yes") is made on this class.
Details |
Constructor |
Methods: |
Are we at the end of the current line?
Read in a line of source code. Add it to the source code buffer and return it.
Clear the buffer
This is intended for internal use only!Clear the input stream readahead
This is intended for internal use only!Clear any pushed back tokens
This is intended for internal use only!Close this file.
Produce the source file name
Generate the source code lines.
Succeed if source code is being saved.
Is a word a keyword?
Produce the next token from the file. Fails on EOF
Always skips trailing whitespace before returning.
Push an arbitrary token back onto the stream
Read in a line of Unicon program text, joining continuations and splitting on semicolons.
This is intended for internal use only!Force the buffer to a known content.
This is intended for internal use only!Turn on/off debugging. Turning on (by using a non-null value for dbg produces lots of output!
Turn on/off recognition of Unicon-specific keywords. Icon program may be using these keywords as variable names.
Turn on/off saving of source code (default is off).
Tag a source code line so it can be referenced from the documentation.
Display a token's type and value.
This is intended for internal use only!Fields: |