-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do you use CSTs or ASTs? #22
Comments
We use Abstract Syntax Tree (AST). In this tree, all leaf nodes are terminals and other nodes are non-terminals. |
Not sure what you mean by terminals and non-terminals if you are using ASTs. My understanding is if those are symbols from the grammar then you are using a CST. If you were using ASTs then you only have programming language constructs at each level. e.g. consider this lambda calc expression
That could be represented by the AST:
in this tree there are no terminals and non-terminals. So for python you would have things like |
Sorry for late reply. In our paper, all leaf nodes are terminals. Thus, all |
No worries. Thnx for the reply!
Out of curiosity - how did you do the cst to ast conversion? Python’s lark
parser? What parser/pylib dod u use?
…On Saturday, January 8, 2022, Zeyu Sun ***@***.***> wrote:
Sorry for late reply.
In our paper, all leaf nodes are terminals. Thus, all x in Abs(Var(x),
Add(Var(x), Var(x))) are terminals.
—
Reply to this email directly, view it on GitHub
<#22 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOE6LSMWYPAPV4YGR7WB4TUVAVLVANCNFSM5KTOBL2Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
We use the python lib |
From the description of terminal and non-terminals I'd assume a CST but you call it ASTs. Can you clarify this?
Concrete Syntax Tree vs Abstract Syntax Tree. The latter usually has constructors instead of terminal/non-terminals...
The text was updated successfully, but these errors were encountered: