Skip to content

Commit

Permalink
Recognize and in coloned list context (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
wvengen committed Jun 13, 2024
1 parent 86d0d60 commit ff21275
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions data/test-cases
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ tomaat⁽¹⁾
tomaat^2
tomaat *
tomaat~
saus: tomaat* en zout*
# extra info at the end
tomaat* * = Biologisch
tomaat* * = Biologisch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ module FoodIngredientParser::Strict::Grammar
end

rule list_coloned_inner_list
contains:( ingredient ( ws* ',' ws* ingredient )+ ( ws+ and ws+ ingredient )? ) <ListNode> /
contains:( ingredient_simple_e_number ( ws* '/' ws* ingredient_simple_e_number )+ ) <ListNode> /
contains:( ingredient_simple_e_number ( ws* dash ws* ingredient_simple_e_number )+ ) <ListNode> /
contains:( ingredient ( ws* ',' ws* ingredient )* ) <ListNode>
contains:( ingredient ( ws+ and ws+ ingredient )? ) <ListNode>
end

rule list_coloned_ingredient
Expand Down

0 comments on commit ff21275

Please sign in to comment.