From 1c74460c562beabc5a4548c1a20d61134e9c23a6 Mon Sep 17 00:00:00 2001 From: "Esteban Prince, Liam (UG - Computer Science)" <le00210@surrey.ac.uk> Date: Fri, 21 Feb 2020 22:02:50 +0000 Subject: [PATCH] Update grammar.ebnf --- grammar.ebnf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/grammar.ebnf b/grammar.ebnf index 7786018..46a09bc 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -1,7 +1,8 @@ -/* Amount: quantity of an ingredient, exclusively */ -/* does not refer to time, size etc */ +Ambiguator ::= ("<" | ">" | "less than" | "more than") + +/* Amount: quantity of an ingredient */ /* Eg: 10 - 20 g of pasta */ -Amount ::= Digit+ ("-" | "/" | "to")? Digit* +Amount ::= Ambiguator* Digit+ ("-" | "/" | "to")? Digit* /* Digit: */ Digit ::= ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9")+ @@ -12,7 +13,7 @@ Digit ::= ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9")+ Unit ::= /* Ingredient: */ -Ingredient ::= Modification* ","* Ingredient +Ingredient ::= Modifier* Ingredient (Modifier ",")* /* Modifier: a word or phrase that modifies the ingredient */ /* Eg: "pears, chopped", "chopped pears", "chicken, skin on" */ -- GitLab