summaryrefslogtreecommitdiff
path: root/source4/build/pidl/idl.gram
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/pidl/idl.gram')
-rw-r--r--source4/build/pidl/idl.gram12
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/build/pidl/idl.gram b/source4/build/pidl/idl.gram
index ac373a5260..70d1c36b5e 100644
--- a/source4/build/pidl/idl.gram
+++ b/source4/build/pidl/idl.gram
@@ -28,6 +28,16 @@ interface: 'interface' <commit> identifier '{' definition(s?) '}'
definition : cpp_prefix
| typedef { $item[1] }
| function { $item[1] }
+ | const { $item[1] }
+
+const : 'const' <commit> identifier identifier '=' constant ';'
+ {{
+ "TYPE" => "CONST",
+ "DTYPE" => $item[3],
+ "NAME" => $item[4],
+ "VALUE" => $item{constant}
+ }}
+ | <error?>
typedef : 'typedef' <commit> type identifier array_len(?) ';'
{{
@@ -165,7 +175,7 @@ anytext: text2 '(' <commit> anytext ')' anytext
call: expression '(' <commit> expression ')'
{{ "$item[1]($item[4])" }}
-constant: /-?\d+/
+constant: /-?[\dx]+/
| '*'
cpp_prefix: '#' /.*/