Skip to content

Commit

Permalink
Add support for exponential float.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed May 19, 2024
1 parent 5ac49bf commit 243ed78
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/liquidsoap.grammar
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,11 @@ ContentArgType {
String |
Integer |
Float |
ExpFloat |
Var "=" Var |
Var "=" String |
Var "=" Integer |
Var "=" ExpFloat |
Var "=" Float
}

Expand Down Expand Up @@ -459,7 +461,7 @@ IfEncoder {
}

IfVersion {
kw<"%ifversion"> (cop<"=="> | cop<">="> | cop<"<="> | cop<">"> | cop<"<">) (Integer | Float | Version) exprs (kw<"%else"> exprs)? kw<"%endif">
kw<"%ifversion"> (cop<"=="> | cop<">="> | cop<"<="> | cop<">"> | cop<"<">) (Integer | ExpFloat | Float | Version) exprs (kw<"%else"> exprs)? kw<"%endif">
}

innerListSpread {
Expand Down Expand Up @@ -667,6 +669,7 @@ expr {
Not |
Bool |
Float |
ExpFloat |
Minus |
String |
Var |
Expand Down Expand Up @@ -725,6 +728,7 @@ BlockComment {
@precedence { "%include_extra", encoderName }
@precedence { encoderName, bin2 }
@precedence { Version, Integer }
@precedence { ExpFloat, Integer }
@precedence { TimePredicate, Integer }
@precedence { TimeInterval, TimePredicate }
@precedence { TimeInterval, Integer }
Expand Down Expand Up @@ -777,6 +781,9 @@ BlockComment {
Integer {
$[0-9] $[0-9_]* | "0" $[xX] $[0-9a-fA-F_]+ | "0" $[oO] $[0-7_]+
}
ExpFloat {
$[0-9] $[eE] $[-+]? $[0-9] $[0-9_]*
}
Version {
$[0-9] $[0-9_]* "." $[0-9] $[0-9_]* "." $[0-9] $[0-9_]*
}
Expand Down

0 comments on commit 243ed78

Please sign in to comment.