Sim: Don't accept lone '.' as Value principal value

This commit is contained in:
Mikolaj Wielgus 2022-10-21 19:22:10 +02:00
parent 014d536954
commit 2a5bc9f87e
1 changed files with 2 additions and 1 deletions

View File

@ -86,7 +86,8 @@ namespace SIM_MODEL_GRAMMAR
struct fieldInferValuePrincipalValue : seq<// HACK: Because `number` matches empty string, struct fieldInferValuePrincipalValue : seq<// HACK: Because `number` matches empty string,
// ensure it is not empty. // ensure it is not empty.
at<sor<tao::pegtl::digit, at<sor<tao::pegtl::digit,
one<'.'>>>, seq<one<'.'>>,
tao::pegtl::digit>>,
// END HACK. // END HACK.
number<SIM_VALUE::TYPE_FLOAT, NOTATION::SI>, number<SIM_VALUE::TYPE_FLOAT, NOTATION::SI>,
// Hackish: match anything until param-value pairs. // Hackish: match anything until param-value pairs.