summaryrefslogtreecommitdiff
path: root/yy/kalmia.l
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2023-01-18 16:42:16 -0600
committersanine <sanine.not@pm.me>2023-01-18 16:42:16 -0600
commit5d2e5a312ba73bd48913e9ac5babe1c644997b3e (patch)
tree0c2f9a4667451795ab797398fad0622d00f51367 /yy/kalmia.l
parent3409a7dbe08bdc98d7663e5dcafaee5792d12139 (diff)
parse float_array nodes
Diffstat (limited to 'yy/kalmia.l')
-rw-r--r--yy/kalmia.l21
1 files changed, 20 insertions, 1 deletions
diff --git a/yy/kalmia.l b/yy/kalmia.l
index 697d6ac..7e04f1a 100644
--- a/yy/kalmia.l
+++ b/yy/kalmia.l
@@ -45,11 +45,27 @@ ATTR ([\x20\x0a\x0d\x09]*)?"="
<INITIAL>"/>" { return EMPTY_TAG_CLOSE; }
+<INITIAL>"float_array" {
+ /* float_array tag */
+ return FLOAT_ARRAY;
+}
+
+
+<INITIAL>"id"/{ATTR} {
+ /* id attribute */
+ return ID_ATTR;
+}
+<INTIAL>"count"/{ATTR} {
+ /* count attribute */
+ return COUNT_ATTR;
+}
+
+
<INITIAL>[a-zA-Z_:][a-zA-Z0-9\.\-_:]* {
/* generic tag name */
yylval->sval = strdup(yytext); return NAME;
}
-<INITIAL>[a-zA-Z_:][a-zA-Z0-9\.\-_:]*/([\x20\x0a\x0d\x09])*"=" {
+<INITIAL>[a-zA-Z_:][a-zA-Z0-9\.\-_:]*/{ATTR} {
/* generic attribute key */
yylval->sval = strdup(yytext);
return ATTR;
@@ -60,6 +76,9 @@ ATTR ([\x20\x0a\x0d\x09]*)?"="
}
+
+
+
<INITIAL>"\"" {
/* begin a string */
BEGIN(STRING);