devSpec:yacc: Put param after params

This commit is contained in:
2025-01-14 23:14:19 -04:00
parent 4dee8c62c9
commit 7b79636681
+12 -12
View File
@@ -127,18 +127,6 @@ opt_params:
| /* empty */ { $$ = new std::vector<std::pair<std::string,std::string>>(); } | /* empty */ { $$ = new std::vector<std::pair<std::string,std::string>>(); }
; ;
param:
STRING {
$$ = new std::pair<std::string,std::string>($1, "");
}
| STRING EQUALS {
$$ = new std::pair<std::string,std::string>($1, "");
}
| STRING EQUALS STRING {
$$ = new std::pair<std::string,std::string>($1, $3);
}
;
params: params:
param { param {
$$ = new std::vector<std::pair<std::string,std::string>>(); $$ = new std::vector<std::pair<std::string,std::string>>();
@@ -152,4 +140,16 @@ params:
} }
; ;
param:
STRING {
$$ = new std::pair<std::string,std::string>($1, "");
}
| STRING EQUALS {
$$ = new std::pair<std::string,std::string>($1, "");
}
| STRING EQUALS STRING {
$$ = new std::pair<std::string,std::string>($1, $3);
}
;
%% %%