From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9a1d02f396e5eb64,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-22 17:24:08 PST From: patbenjamin@home.com (Patricia R Benjamin) Newsgroups: comp.lang.ada Subject: Pattern recognition Programming language Date: Wed, 23 Jan 2002 04:23:17 GMT Reply-To: patbenjamin@home.com Message-ID: <3c4e36cb.45609322@mammoth.usenet-access.com> X-Newsreader: Forte Free Agent 1.11/32.235 NNTP-Posting-Host: 127.0.0.1 X-Authenticated-User: 776243366 X-Comments: This message was posted through Binaries.net X-Comments2: IMPORTANT: Binaries.net does not condone, nor support, spam or any illegal or copyrighted postings. X-Report: Please report abuse to Organization: Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!ihug.co.nz!out.nntp.be!propagator-SanJose!in.nntp.be!corp-goliath.newsgroups.com Xref: archiver1.google.com comp.lang.ada:19208 Date: 2002-01-23T04:23:17+00:00 List-Id: 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