summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/grammar.ra
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-17 21:43:51 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-17 21:43:51 +0000
commiteed85f41ffc31649032114b7aa89a541d239a257 (patch)
tree72b83438166fec47d107fa6d2c98261bfde76f60 /lib/puppet/parser/grammar.ra
parent8410c4dc5bfbb450ea740be42e0f0d712bf86e7a (diff)
downloadpuppet-eed85f41ffc31649032114b7aa89a541d239a257.tar.gz
puppet-eed85f41ffc31649032114b7aa89a541d239a257.tar.xz
puppet-eed85f41ffc31649032114b7aa89a541d239a257.zip
Adding #629 -- an undef keyword now exists
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2522 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser/grammar.ra')
-rw-r--r--lib/puppet/parser/grammar.ra11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/puppet/parser/grammar.ra b/lib/puppet/parser/grammar.ra
index 16aa10459..6714afab8 100644
--- a/lib/puppet/parser/grammar.ra
+++ b/lib/puppet/parser/grammar.ra
@@ -9,10 +9,7 @@ token FALSE EQUALS LESSEQUAL NOTEQUAL DOT COLON TYPE LLCOLLECT RRCOLLECT
token QMARK LPAREN RPAREN ISEQUAL GREATEREQUAL GREATERTHAN LESSTHAN
token IF ELSE IMPORT DEFINE ELSIF VARIABLE CLASS INHERITS NODE BOOLEAN
token NAME SEMIC CASE DEFAULT AT LCOLLECT RCOLLECT CLASSNAME CLASSREF
-token NOT OR AND
-
-# We have 2 shift/reduce conflicts
-#expect 2
+token NOT OR AND UNDEF
rule
program: statements {
@@ -261,6 +258,10 @@ resourceinstances: resourceinst
endsemi: # nothing
| SEMIC
+undef: UNDEF {
+ result = ast AST::Undef, :value => :undef
+}
+
name: NAME {
result = ast AST::Name, :value => val[0]
}
@@ -328,6 +329,7 @@ rvalue: quotedtext
| array
| resourceref
| funcrvalue
+ | undef
# We currently require arguments in these functions.
funcrvalue: NAME LPAREN namestrings RPAREN {
@@ -446,6 +448,7 @@ selectlhand: name
| variable
| funcrvalue
| boolean
+ | undef
| DEFAULT {
result = ast AST::Default, :value => val[0]
}