comp.lang.ada
 help / color / mirror / Atom feed
* Pattern recognition Programming language
@ 2002-01-23  4:23 Patricia R Benjamin
  2002-01-23  2:32 ` tmoran
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Patricia R Benjamin @ 2002-01-23  4:23 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-01-23 22:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-23  4:23 Pattern recognition Programming language Patricia R Benjamin
2002-01-23  2:32 ` tmoran
2002-01-23 12:42 ` M. A. Alves
2002-01-23 17:18 ` Robert A Duff
2002-01-23 22:57 ` Nick Roberts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox