stream - remove trailing spaces

This commit is contained in:
Andrej730
2025-09-04 18:54:07 +05:00
parent 274a5cbfad
commit 5f964bd33c
@@ -107,9 +107,9 @@ try:
# common.INT doesn't support negative integers. # common.INT doesn't support negative integers.
grammar = r""" grammar = r"""
start: "#" NUMBER "=" TYPE "(" args ")" ";" start: "#" NUMBER "=" TYPE "(" args ")" ";"
args: arg ("," arg)* args: arg ("," arg)*
arg: STRING -> string arg: STRING -> string
| FLOAT -> float | FLOAT -> float
| IFCINT -> ifcint | IFCINT -> ifcint
@@ -119,21 +119,21 @@ try:
| REFERENCE -> reference | REFERENCE -> reference
| list -> list | list -> list
| inline_type -> inline_type | inline_type -> inline_type
list: "(" arg? ("," arg)* ")" list: "(" arg? ("," arg)* ")"
inline_type: TYPE "(" arg ")" inline_type: TYPE "(" arg ")"
REFERENCE: "#" /[0-9]+/ REFERENCE: "#" /[0-9]+/
TYPE: CNAME TYPE: CNAME
NUMBER: INT NUMBER: INT
STRING: "'" /([^']|'')*/ "'" STRING: "'" /([^']|'')*/ "'"
IFCINT: /-?[0-9]+/ IFCINT: /-?[0-9]+/
FLOAT: /-?[0-9]+\.[0-9]*([Ee]-?[0-9]+)?/ FLOAT: /-?[0-9]+\.[0-9]*([Ee]-?[0-9]+)?/
NULL: "$" NULL: "$"
DERIVED: "*" DERIVED: "*"
ENUM: "." CNAME "." ENUM: "." CNAME "."
%import common.INT %import common.INT
%import common.CNAME %import common.CNAME
""" """