Zuzu::Parser::_Impl(3)

NAME
Zuzu::Parser::_Impl - recursive-descent parser implementation

DESCRIPTION
Implements token-driven parsing routines that build typed AST node objects and enforce basic syntax rules.

INHERITANCE
Inherits from "Moo::Object".

ROLES
None.

ATTRIBUTES

  lexer
Type: InstanceOf["Zuzu::Lexer"].

Lexer instance that provides the token stream.

  filename
Type: Maybe[Str].

Filename attached to generated tokens and parser errors.

  tok
Type: InstanceOf["Zuzu::Token"].

Current lookahead token.

  scopes
Type: ArrayRef[HashRef].

Stack of parser-declared symbol tables for lexical scopes.

METHODS

  new
Constructs and returns a new instance of this class.

  parse_program
Parses a program construct and returns its AST node.

  parse_statement
Parses a statement construct and returns its AST node.

  parse_block
Parses a block construct and returns its AST node.

  parse_let
Parses a let construct and returns its AST node.

  parse_function_def
Parses a function def construct and returns its AST node.

  parse_class_def
Parses a class def construct and returns its AST node.

  parse_trait_def
Parses a trait def construct and returns its AST node.

  parse_type_ref
Parses a type ref construct and returns its AST node.

  parse_method_def
Parses a method def construct and returns its AST node.

  parse_if
Parses a if construct and returns its AST node.

  parse_while
Parses a while construct and returns its AST node.

  parse_for
Parses a for construct and returns its AST node.

  parse_return
Parses a return construct and returns its AST node.

  parse_import
Parses a import construct and returns its AST node.

  parse_expression
Parses a expression construct and returns its AST node.

  parse_prefix
Parses a prefix construct and returns its AST node.

  parse_primary
Parses a primary construct and returns its AST node.

  parse_postfix
Parses a postfix construct and returns its AST node.

  parse_array_literal
Parses a array literal construct and returns its AST node.

  parse_dict_literal
Parses a dict literal construct and returns its AST node.

  parse_set_literal
Parses a set literal construct and returns its AST node.

  parse_bag_literal
Parses a bag literal construct and returns its AST node.

SEE ALSO
Subclasses: none in this distribution.

COPYRIGHT AND LICENCE
Zuzu::Parser::_Impl is copyright Toby Inkster.

It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.