DevSpec: Grammar now parses params as key[=[val]]

* Updated docs to reflect this.
* This was important in allowing us to write the xcbXorg connection
 code.
This commit is contained in:
2025-01-14 14:09:35 -04:00
parent 4eb0ef75bc
commit aaae3dcbb2
4 changed files with 47 additions and 10 deletions
+2 -1
View File
@@ -23,7 +23,8 @@
"|" { return PIPE; }
"(" { return LPAREN; }
")" { return RPAREN; }
[^\|\(\) \t\r\n]+ { deviceSpecplval.str = strdup(yytext); return STRING; }
[ \t]*"="[ \t]* { return EQUALS; } // Allow optional whitespace around equals
[^=\|\(\) \t\r\n]+ { deviceSpecplval.str = strdup(yytext); return STRING; } // Exclude = from STRING tokens
\r?\n { /* ignore newlines */ }
[ \t]+ { /* ignore whitespace */ }
. { return yytext[0]; }