class documentation

class FilePosition(Position): (source)

View In Hierarchy

A parse position based on an underlying file.
Method __init__ Create the position from a file.
Method current Return the current character, assuming we are not out.
Method currentline Get the current line of the underlying file.
Method extract Extract the next string of the given length, or None if not enough text.
Method identifier Return the current line and line number in the file.
Method isout Find out if we are out of the text yet.
Method linenumber Return the line number of the file.
Method nextline Go to the next line.
Method skip Skip a string of characters.
Instance Variable pos Undocumented
Instance Variable reader Undocumented

Inherited from Position:

Method __next__ Advance the position and return the next character.
Method checkfor Check for a string at the given position.
Method checkforlower Check for a string in lower case.
Method checkskip Check for a string at the given position; if there, skip it
Method error Show an error message and the position identifier.
Method skipcurrent Return the current character and skip it.

Inherited from Globable (via Position):

Method checkbytemark Check for a Unicode byte mark and skip it.
Method finished Find out if the current text has finished.
Method glob Glob a bit of text that satisfies a check on the current char.
Method globalpha Glob a bit of alpha text
Method globexcluding Glob a bit of text up until (excluding) any excluded character.
Method globidentifier Glob alphanumeric and _ symbols.
Method globincluding Glob a bit of text up to (including) the magic char.
Method globnumber Glob a row of digits.
Method globvalue Glob a value: any symbols but brackets.
Method isidentifier Return if the current character is alphanumeric or _.
Method isvalue Return if the current character is a value character:
Method nextending Return the next ending in the queue.
Method popending Pop the ending found at the current position
Method pushending Push a new ending to the bottom
Method skipspace Skip all whitespace at current position.
Class Variable leavepending Undocumented
Instance Variable endinglist Undocumented
def __init__(self, filename): (source)
Create the position from a file.
def current(self): (source)
Return the current character, assuming we are not out.
def currentline(self): (source)
Get the current line of the underlying file.
def extract(self, length): (source)
Extract the next string of the given length, or None if not enough text.
def identifier(self): (source)
Return the current line and line number in the file.
def isout(self): (source)
Find out if we are out of the text yet.
def linenumber(self): (source)
Return the line number of the file.
def nextline(self): (source)
Go to the next line.
def skip(self, string): (source)
Skip a string of characters.
pos: int = (source)

Undocumented

reader = (source)

Undocumented