# Regular expressions quick intro:
# - is the non-terminal a
# - "abc" means "the literal string abc"
# - = b means "a is defined as b"
# - between any two tokens spaces can be inserted
# - ( a ) means a
# - a b means "a and then b (with optional spaces
# inbetween)"
# - a | b means "a or b"
# - a* means "a zero or more times"
# - a+ means "a one or more times"
# - a? means "a zero or one time"
# - [abc] means "any from characters a, b or c"
# - [a-b] means "any character in the range a to b"
######### Problem definition specification #########
# Additional context-dependent or semantic
# assumptions:
# - each of , and must occur
# at least once
# - all -s occur before any
# - all -s occur before any
# - distance between two customers is calculated as
# planar Euclidean distance,
# i.e. d^2 = (p1.x-p2.x)^2 + (p1.y-p2.y)^2
# - all data types (decimals, integers) will be
# small enough to fit into standard Java types
= "problem"
( | | | )*
=
# Product type definition
# e.g. ptype karton1
= "ptype"
=
# Vehicle type definition
# e.g. vtype tir 1000 4.50 60.0 (europaleta:33,
# karton1:1000) (16.47, 20.3)
= "vtype"
=
=
=
=
= "(" ("," )* ")"
= ":"
=
# Order definition
# e.g. order europaleta:20 (16.47, 20.3) (18.10, 19)
# 08:00-23:59 12:00-17:00 5
= "order"
= ":"
=
=
=
=
= [1-7]
######### Result specification #########
# Additional context-dependent or semantic
# assumptions:
# - there must be exactly 7 different days
# - the result must fulfill all constraints specified
# in problem description
# - problem specification will not allow for
# ambiguous result file (e.g. each point will
# appear only once in only one order)
# - all data types (decimals, integers) will be small
# enough to fit into standard Java types
= "result"
= ( ( | )*)+
= "day"
= [1-7]
=
+
######### Common defintions #########
= ?
= [a-zA-Z_0-9.\-]+
= [0-9]+
= ( "." [0-9]+)?
= "(" "," ")"
= "-"
= ":"
= ([0-1] [0-9]) | ("2" [0-3])
= [0-5] [0-9]
= " "+
= "\n" | "\r\n"