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

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

Methods

Included Modules

Puppet::Resource::TypeCollectionHelper

Constants

AST = Puppet::Parser::AST
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', 'STRING', 'DQPRE', 'DQMID', 'DQPOST', 'LBRACK', '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', 'IN_EDGE', 'OUT_EDGE', 'IN_EDGE_SUB', 'OUT_EDGE_SUB', 'IN', '$start', 'program', 'statements', 'nil', 'statement', 'resource', 'virtualresource', 'collection', 'assignment', 'casestatement', 'ifstatement_begin', 'import', 'fstatement', 'definition', 'hostclass', 'nodedef', 'resourceoverride', 'append', 'relationship', 'relationship_side', 'edge', 'resourceref', 'funcvalues', 'namestring', 'name', 'variable', 'type', 'boolean', 'funcrvalue', 'selector', 'quotedtext', 'hasharrayaccesses', 'classname', 'resourceinstances', 'endsemi', 'params', 'endcomma', 'classref', 'anyparams', 'at', 'collectrhand', 'collstatements', 'collstatement', 'colljoin', 'collexpr', 'colllval', 'simplervalue', 'resourceinst', 'resourcename', 'undef', 'array', 'expression', 'hasharrayaccess', 'param', 'rvalue', 'addparam', 'anyparam', 'rvalues', 'comma', 'hash', 'dqrval', 'dqtail', 'ifstatement', 'else', 'regex', 'caseopts', 'caseopt', 'casevalues', 'selectlhand', 'svalues', 'selectval', 'sintvalues', 'string', 'strings', 'argumentlist', 'classparent', 'hostnames', 'nodeparent', 'nodename', 'hostname', 'nothing', 'arguments', 'argument', 'classnameordefault', 'hashpairs', 'hashpair', 'key']
Racc_debug_parser = false

Attributes

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

Public Class methods

Public Instance methods

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.

Initialize or reset all of our variables.

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?

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]