Class Puppet::Parser::Parser
In: lib/puppet/parser/parser.rb
lib/puppet/parser/parser_support.rb
Parent: Racc::Parser

I pulled this into a separate file, because I got tired of rebuilding the parser.rb file all the time.

Methods

Constants

Racc_arg = [ racc_action_table, racc_action_check, racc_action_default, racc_action_pointer, racc_goto_table, racc_goto_check, racc_goto_default, racc_goto_pointer, racc_nt_base, racc_reduce_table, racc_token_table, racc_shift_n, racc_reduce_n, racc_use_result_var ]
Racc_token_to_s_table = [ '$end', 'error', 'LBRACK', 'DQTEXT', 'SQTEXT', 'RBRACK', 'LBRACE', 'RBRACE', 'SYMBOL', 'FARROW', 'COMMA', 'TRUE', 'FALSE', 'EQUALS', 'APPENDS', 'LESSEQUAL', 'NOTEQUAL', 'DOT', 'COLON', 'LLCOLLECT', 'RRCOLLECT', 'QMARK', 'LPAREN', 'RPAREN', 'ISEQUAL', 'GREATEREQUAL', 'GREATERTHAN', 'LESSTHAN', 'IF', 'ELSE', 'IMPORT', 'DEFINE', 'ELSIF', 'VARIABLE', 'CLASS', 'INHERITS', 'NODE', 'BOOLEAN', 'NAME', 'SEMIC', 'CASE', 'DEFAULT', 'AT', 'LCOLLECT', 'RCOLLECT', 'CLASSNAME', 'CLASSREF', 'NOT', 'OR', 'AND', 'UNDEF', 'PARROW', 'PLUS', 'MINUS', 'TIMES', 'DIV', 'LSHIFT', 'RSHIFT', 'UMINUS', 'MATCH', 'NOMATCH', 'REGEX', '$start', 'program', 'statements', 'nil', 'statement', 'resource', 'virtualresource', 'collection', 'assignment', 'casestatement', 'ifstatement', 'import', 'fstatement', 'definition', 'hostclass', 'nodedef', 'resourceoverride', 'append', 'funcvalues', 'namestring', 'resourceref', 'name', 'variable', 'type', 'boolean', 'funcrvalue', 'selector', 'quotedtext', 'classname', 'resourceinstances', 'endsemi', 'params', 'endcomma', 'classref', 'anyparams', 'at', 'collectrhand', 'collstatements', 'collstatement', 'colljoin', 'collexpr', 'colllval', 'simplervalue', 'resourceinst', 'resourcename', 'undef', 'array', 'expression', 'param', 'rvalue', 'addparam', 'anyparam', 'rvalues', 'comma', 'else', 'regex', 'caseopts', 'caseopt', 'casevalues', 'selectlhand', 'svalues', 'selectval', 'sintvalues', 'qtexts', 'argumentlist', 'classparent', 'hostnames', 'nodeparent', 'nodename', 'hostname', 'nothing', 'arguments', 'argument', 'classnameordefault']
Racc_debug_parser = false
AST = Puppet::Parser::AST

Attributes

environment  [R] 
files  [RW] 
lexer  [RW] 
version  [R] 

Public Class methods

Public Instance methods

Utility method factored out of load

Add context to a message; useful for error messages and such.

Create an AST array out of all of the args

Create an AST object, and automatically add the file and line information if available.

The fully qualifed name, with the full namespace.

Raise a Parse error.

Import our files.

Initialize or reset all of our variables.

Try to load a class, since we could not find it.

Split an fq name into a namespace and name

Create a new class, or merge with an existing class.

Create a new node. Nodes are special, because they‘re stored in a global table, not according to namespaces.

how should I do error handling here?

See if any of the files have changed.

Add a new file to be checked when we‘re checking to see if we should be reparsed. This is basically only used by the TemplateWrapper to let the parser know about templates that should be parsed.

[Validate]