NAME ^

pirparser.c - parser for Parrot Intermediate Representation

THOUGHTS FOR LATER ^

PARSER INTERNALS ^

The parser_state structure has the following fields:

 typedef struct parser_state {
    struct     lexer_state *lexer;     -- the lexer
    token      curtoken;               -- the current token as returned by the lexer
    char     **heredoc_ids;            -- array for holding heredoc arguments
    unsigned   heredoc_index;          -- index to keep track of heredoc ids in the array
    unsigned   parse_errors;           -- counter for parse_errors
    pirvtable *vtable;                 -- vtable holding pointers for output routines
 }

PARSER API ^

HELPER FUNCTIONS ^

GRAMMAR ^

Conventions ^

The following conventions are used:

 [ foo ]       indicate an optional foo element
 { foo }       indicate zero or more foo elements
 ( foo | bar ) either foo or bar
 IDENTIFIER    match a token of type IDENTIFIER
 'string'      match the literal 'string'

Grammar rules ^

Expressions

Statements

Compilation Units


parrot