interpreter pattern time_condition"today is "day_of_week "time is between "timeand "time "today is week day"today not week dayday_of_week"monday"tuesday"wednesday"thursday"friday"saturday"sundaytimehours":"minutes hourshour_tenshour_ones hour_tens" " hour_onesdigit minutesminute_tensminute_ones minute_tens" " " " " " minute_onesdigit item_condition"item is "item_type "there are "numberof "item_type item_type"pizza"burger"drink"chipsnumber{digitdigit" " " " " " " " " " customer_condition"customer is "customer_type customer_type"member"non-memberyou have set of terminal symbols that cannot be substituted with any patternas well as set of non-terminal production rules that can be used to replace non-terminal ( place holder symbolwith sequence of terminals or with some recipe of other non-terminal patterns different ways in which non-terminal can be substituted are separated by the pipe character "|when you are creating an external dsla package such as pyparsing can be used to translate strings written in grammar like the one just seen to data type that can be handled by python code you have now seen an example of how you can move through the process of domain modeling by understanding the domain via conversations with domain expertsidentifying key elements of the domaincodifying this understanding in some sort of domain model that can be verified by domain expertsand finally implementing the dsl as final product of the process from this point onwe will be dealing with an internal dsl if we were to implement the special rules as an internal dslwe would need to basically create one class per symbol