Types define the representation of information and values the concrete instances. For example, 42 would be an instance of type count and an instance of type addr. Every value is optional and may be nil. For a given type, nil is always a valid value, but it is impossible to deduce a type from the nil literal.

VAST uses a recursive descent approach to parse a value, using an LL(k) grammar for a unique and predictable representation of values.


Each type has an associated value with corresponding parser. This section explains valid input for the parser of that type.


The bool type defines exactly two valid inputs, T for true and F for false.



The int type is 64-bit signed integer. It requires a sign in order to distinguish it from a count.

-4negative value
+7positive value


The count type is 64-bit unsigned integer to represent "things that can be counted."

42positive value


The real type is a IEE754 double-precision floating point value.

-4.2negative value
3.1415positive value

Scientific notation is currently not supported.


The duration type is a nanosecond-precision time span to represent negative or positive time deltas. The parser accepts input of the form [sign] number unit.

-3ns3 nanoseconds backward
4 secs4 seconds forward
+10 h10 hours forward

The table lists valid suffixes an their corresponding units.

ns, nsec, nsecs, nanosecondsnanoseconds
us, usec, usecs, microsecondsmicroseconds
ms, msec, msecs, millisecondsmilliseconds
s, sec, secs, secondsseconds
m, min, mins, minutesminutes
h, hour, hrs, hourshours
d, day, daysdays (24 hours)
w, week, weeksweeks (24 * 7 hours)


The time type represents a specific point in time. Unless explicitly specified, all time values are interpreted as UTC timestamps.

nowThe current system time
in 10snow plus 10 seconds
5m agonow minus 5 minutes
@1588520865UNIX timestamp (seconds since the UNIX epoch)
@1588520865.123fractional UNIX timestamp
2020-03-152020-03-15 at 00:00:00 UTC
2020-03-15+032020-03-15 at 03:00:00 UTC
2020-03-15T13As above, different time divider
2020-03-15+03:242020-03-15 at 03:24:00 UTC
2020-03-15+03:24:592020-03-15 at 03:24:59 UTC
2020-03-15+03:24:59Z2020-03-15 at 03:24:59 UTC
2020-03-15+03:24:59-82020-03-15 at 03:24:59 UTC-8
2020-03-15+03:24:59+32020-03-15 at 03:24:59 UTC+3


The string type represents a sequence of characters.

""The empty string
"foo"The string foo
"\""A string containing an escaped double quote (")
"\x2a"An escaped byte 0x2a in a string

VAST currently supports only ASCII strings. Unicode support is on our roadmap.


The pattern type represents a regular expression.

/./A regex that matches a single character
/a*b+c/A regex with quantifiers


The addr type represents an IPv4 or IPv6 address. VAST uses the IPv4-mapped IPv6 address representation, where the first 80 bits are zero, followed by 16 one-bits, and then last 32 bits containing the IPv4 address.

InputSemantics non-routable invalid IPv4 address IPv4 address of a well-known DNS server
::1The IPv6 loopback address
2001:db8::A dummy IPv6 address used for documentation


The subnet type represents a CIDR-style definition of groups of IP addresses. The parser accepts input of the form addr / prefix, where valid prefix are in the range [0,128].

InputSemantics private class A network
::1/128IPv6 loopback address with a single address
2001:db8::/322^96 addresses for documentation purposes


There exist two containers types: list<T> for an ordered list of elements, and map<T, U> as associative array.

In the following, x, y, and z, are a instances of type T and a, b, and c instances of type U.

list<T>[x, y, z], []
map<T, U>{x -> a, y -> b, z -> c}, {}

Type inference for container instances is tricky, because it's impossible to infer the element type from an empty container, or from a container that contains nil elements. Ther


The current implementation for container types is not yet complete: map<T, U> is not indexable or queryable, and list only works efficiently for low-cardinality instances.

SI Literals

To simplify expression of large integer values, VAST supports literals with suffixes according to the International System of Units (SI). These suffixes apply to type int and count:

k31 000
M61 000 000
G91 000 000 000
T121 000 000 000 000
P151 000 000 000 000 000
E181 000 000 000 000 000 000

For example, 42k is equal to 42000, and -9G equal to -9000000000.

In addition to expressing numbers to the power of 10, there exists a parallel array of suffixes for expressing numbers with base 2 to represent bytes:

Ki101 024
Mi201 048 576
Gi301 073 741 824
Ti401 099 511 627 776
Pi501 125 899 906 842 624
Ei601 152 921 504 606 846 976

For example, 8Ki is equal to 8192, and 64Mi equal to 67108864.


We purposefully chose IEC-style binary suffixes that end in i to avoid ambiguities of frequent abbreviations, such as "64K", which colloquially means "64 kilo bytes" to the power of 2 but resembles more the suffix for a value to the power of 10.