Interperter pattern for regular expression

G

gast128

Dear all,

I was looking for a c++ implementation of regular expressions using
the Interpreter Design Pattern. GOF only references a Smaltalk
implementation which I can not read :(.

Does anyone know a link besides the cuj january 2003 article ('A
Different Interpretation of the Interpreter Design Pattern'). I am
especially stuck with the context object, since all these regular
expression operators seems to generate different possible input
states.

Wkr,
me
 
A

Alf P. Steinbach

* (e-mail address removed):
Dear all,

I was looking for a c++ implementation of regular expressions using
the Interpreter Design Pattern. GOF only references a Smaltalk
implementation which I can not read :(.

Figuring out what you're asking about took some Googling. A trivial
concept with a misleading name. The point of patterns was to name them
authoritatively so we could all know what others are talking about or at
least look it up in a few mouse-clicks, but either it didn't turn out
that way, or I'm atypical, not a compulsive pattern name memorizer.
Hah, I remember the name Visitor, because it's so often necessary
provide just the name in explanations to newbies. Anyway, I think it
would have been better if you simply described the problem.

Does anyone know a link besides the cuj january 2003 article ('A
Different Interpretation of the Interpreter Design Pattern'). I am
especially stuck with the context object, since all these regular
expression operators seems to generate different possible input
states.

Don't know if this is different or the same (since /you/ don't provide a
link), but look up <url:
http://research.microsoft.com/projects/greta/regex_perf.html>, which I
found by Googling.
 
A

Alf P. Steinbach

* (e-mail address removed):
I do not understand this. The classical book 'Desgin Patterns'
contains a complete section of their 'Interpreter' pattern with a
boolean expression example (in c++) and a regular expression case (in
Smaltalk).

Please reply in the newsgroup, not by private e-mail (unless of course
for personal communication).

This reply posted to the newsgroup and CC'ed to you.

I don't have the Design Patterns book in my bookshelf. I read the book
when it was published. In addition to the Design Pattern book it's also
a good idea to read at last one anti-Pattern book.

It's the same author, but reverse engineering GRETA would be as much
work as learning Smaltalk...

Why do you need to reverse-engineer?

What's the problem?
 
G

gast128

* (e-mail address removed):


Please reply in the newsgroup, not by private e-mail (unless of course
for personal communication).
Sorry that was the wrong link I clicked on.
I don't have the Design Patterns book in my bookshelf. I read the book
when it was published. In addition to the Design Pattern book it's also
a good idea to read at last one anti-Pattern book.
That is a totally different subject. I do not want to open a
discussion on patterns.
Why do you need to reverse-engineer?

What's the problem?

So my original question still stands. In the meantime I am designing
it myself, so maybe I do not need a c++ implementation to copy from.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top