aboutsummaryrefslogtreecommitdiff
path: root/properties.y
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2024-07-22 17:19:33 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2024-07-22 17:19:33 +0200
commit2a20043edb282dff05c9832b1576bf8894dd6473 (patch)
tree572638a56b46cbd90534ea6ba562b544f7273ec7 /properties.y
parent2fd810be649548de92b7b34900205555250fab3b (diff)
downloadproperties-2a20043edb282dff05c9832b1576bf8894dd6473.tar.gz
properties-2a20043edb282dff05c9832b1576bf8894dd6473.zip
Add a first draft of the parser
Diffstat (limited to 'properties.y')
-rw-r--r--properties.y22
1 files changed, 22 insertions, 0 deletions
diff --git a/properties.y b/properties.y
new file mode 100644
index 0000000..69d683d
--- /dev/null
+++ b/properties.y
@@ -0,0 +1,22 @@
+%{
+
+#include <stdio.h>
+#include <stdlib.h>
+
+%}
+
+%token KEY DIV VALUE
+
+%%
+
+value: VALUE
+ | VALUE value
+ ;
+
+%%
+
+void
+yyerror(char *s)
+{
+ fprintf(stderr, "%s\n", s);
+}