ALPHABETIC = { ('a'..'z' | 'A'..'Z') } /// Any letter, uppercase or lowercase
/// The product name can consist of letters, digits, or spaces.
name = { (ALPHABETIC | ASCII_DIGIT | " ")+ }
/// The price should be digits, followed by a decimal point and two digits for cents.
price = { ASCII_DIGIT+ ~ "." ~ ASCII_DIGIT{2} }
/// The release date should be in the format dd-mm-yyyy.
date_of_release = { day ~ "-" ~ month ~ "-" ~ year }
/// A valid day can be between "01" and "31".
day = { ("0" ~ ('1'..'9')) | ("1" ~ ('0'..'9')) | ("2" ~ ('0'..'9')) | ("3" ~ ('0'..'1')) }
/// The month should be between "01" and "12".
month = { ("0" ~ ('1'..'9')) | ("1" ~ ('0'..'2')) }
/// The year should be a four-digit number (e.g., 2022).
year = { ASCII_DIGIT{4} }
/// The product type can be one of the following options: Smartphone, Laptop, Tablet, Earphones, Watch, or Other.
device_type = { "Smartphone" | "Laptop" | "Tablet" | "Earphones" | "Watch" | "Other" }
/// Screen size is represented as digits followed by "inches" (e.g., "14.2 inches") or it can be "N/A".
screen_size = { ASCII_DIGIT+ ~ "." ~ ASCII_DIGIT+ ~ " inches" | "N/A" }
/// Storage can be given in either GB or TB (e.g., "512GB" or "1TB").
storage = { (ASCII_DIGIT+ ~ "GB") | (ASCII_DIGIT+ ~ "TB") }
/// Colors are represented by letters and spaces (e.g., "Silver" or "Space Gray").
color = { (ALPHABETIC | " ")+ }
/// Availability is a boolean value, either "true" or "false".
availability = { "true" | "false" }
/// RAM can be specified in GB or TB (e.g., "16GB" or "1TB").
ram = { (ASCII_DIGIT+ ~ "GB") | (ASCII_DIGIT+ ~ "TB") }