Skip to content
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

How to obtain an AST from a source file? #461

Open
IanTrudel opened this issue May 16, 2024 Discussed in #455 · 2 comments
Open

How to obtain an AST from a source file? #461

IanTrudel opened this issue May 16, 2024 Discussed in #455 · 2 comments

Comments

@IanTrudel
Copy link

Discussed in #455

Originally posted by IanTrudel May 2, 2024
Would it be possible to obtain the AST (or S-Exp) from a given source file in Unicon?

@Don-Ward
Copy link
Collaborator

Don-Ward commented Feb 3, 2025

There is a way (now) after some work I did late last year. It's not documented and may yet be removed. Look at the procedure Progend in .../uni/unicon/unigram.y for details.

@IanTrudel
Copy link
Author

This is a special case, isn't it? Not only it happens after the big inhale but it's hidden behind yacc. That most likely means there is no way to use this in a normal Unicon program. Or is there? It might be difficult to replicate because there is a lot of magic from x1 to classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants