This is the main function implementing the
parser. read
is immediately called from within the REPL. Given a string (comming from the programming
environment) str
, it initializes the scanner with the string, and
initializes the global variable token
so that the parser's 'current'
is 'ready' for processing. Hence, token
is always one token ahead
of the parser. After the first token has been determined, expression
is immediately called since we know from the concrete
grammar that any Pico program is always an expression.