
What
is the need for Interpreter Pattern
|
Advantage of using interpreter pattern is its flexibility. Using interpreter pattern, each of the parsing scenarios will be considered as a different object and the objects will be connected using a parse tree. When there is a necessity to change any of the parsing scenarios, you can easily change it in the parse tree without any consequences and with less coding change.
However there
are certain consequences in using interpreter pattern.
They are:
User
interface has to be provided for the User to feed in commands for the
language
Considerable effort for defining and building parsing techniques
Extensive checking of error occurrences due to grammatical elements
that are misplaced or misspelled
If the grammar associated with the language becomes complex, your
code might not be easily maintainable
_______________________________________________________________________
FREE Subscription
Subscribe
to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.
Note
: We never rent, trade, or sell my email lists to
anyone.
We assure that your privacy is respected
and protected.
Visit .NET Programming Tutorial Homepage
______________________________________________________