MattDiesel / cpp-pratt

TDOP parser in C++
8 stars 4 forks source link

pratt parser in c? #1

Open zhouxs1023 opened 4 years ago

zhouxs1023 commented 4 years ago

I see discuss that you implement pratt parser in c language on autoitscript ,I can not download source ,can you help me send a copy to me? Thank you very much!

MattDiesel commented 4 years ago

Hi zhouxs1023,

Apologies for the code not being available, it should be on one of my backup drives so I will have a look when I get home.

What I did find was an example of Pratt's parser applied to AutoIt itself. Although this is bigger and more complex than the example I wrote as a demonstration of the theory, it might be of some help. It also contains an example of an Abstract Syntax Tree implemented in AutoIt as well.

https://gist.github.com/MattDiesel/5769560

If you'd like any specific advice on implementing a parser, I'd be happy to give some advice. Although Pratt's parser I think is particularly elegant, there are a lot of different types and the type of language being parsed makes a big impact on the choice.

Matt

On Fri, Feb 7, 2020 at 3:16 PM zhouxs1023 notifications@github.com wrote:

I see discuss that you implement pratt parser in c language on autoitscript ,I can not download source ,can you help me send a copy to me? Thank you very much!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MattDiesel/cpp-pratt/issues/1?email_source=notifications&email_token=AAMOUTTH3NTOPJ7OQG2RHUDRBV3NPA5CNFSM4KRQEYOKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IL23OYQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMOUTR4ONAOKQ3KZCVFDF3RBV3NPANCNFSM4KRQEYOA .