From: patbenjamin@home.com (Patricia R Benjamin)
Subject: Pattern recognition Programming language
Date: Wed, 23 Jan 2002 04:23:17 GMT
Date: 2002-01-23T04:23:17+00:00 [thread overview]
Message-ID: <3c4e36cb.45609322@mammoth.usenet-access.com> (raw)
I have a problem:
Given a stream of tokens representing a program in some programming
language, I would like to extract and process calls to specific
procedures. Processing includes recognizing and processing the
statements that develop the arguments that are passed to these
procedures. The token stream also embodies scoping information which
influences the processing.
The tool I am looking for is closer to a filter generator than a
parser generator. (The token stream is generated by an actual parser).
The tool will recognize families of patterns of tokens, where
individual statements from which these patterns are generated are not
necessarily adjacent in the program being analyzed.
For example, a smipped of program to be analyzed moght look like:
a=b+c;
some stuff...
func(a);
The pattern that extracts this construct could be expressed as:
Name_=Name1_ + Name2_
...
func(Name_)
This pattern should also recognize the following program:
cat=mouse+catch;
mystuff=0;
func(cat)
Mathematica's pattern matching capability seems like a candidate, but
I don't think it is general enough.
Any Ideas anyone
Thanks
Milt Benjamin
Milton.K.Benjamin@lmco.com
856-787-3202
______________________________________________________________________________
Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net
next reply other threads:[~2002-01-23 4:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-23 4:23 Patricia R Benjamin [this message]
2002-01-23 2:32 ` Pattern recognition Programming language tmoran
2002-01-23 12:42 ` M. A. Alves
2002-01-23 17:18 ` Robert A Duff
2002-01-23 22:57 ` Nick Roberts
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox