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

Formalize translator design and workflow #26

Closed
tdv42 opened this issue Nov 11, 2021 · 4 comments
Closed

Formalize translator design and workflow #26

tdv42 opened this issue Nov 11, 2021 · 4 comments
Assignees
Milestone

Comments

@tdv42
Copy link
Member

tdv42 commented Nov 11, 2021

e.g. using flow diagram

@dours dours added this to the stage1 milestone Nov 11, 2021
@dours dours assigned bugdea1er and unassigned PetrB09 Nov 22, 2021
@bugdea1er
Copy link
Member

bugdea1er commented Jul 6, 2022

Requirements:

  • The jar executable should take the path of the python input file as a command line argument, and optionally take the path of the output file.
  • If the Python input file has valid Python 3.9 syntax, translate it to eolang and write the result to the output file provided, or place the result near the input file if no output files were provided.
  • If the input python does not have valid Python 3.9 syntax, inform the user.
  • The repository should provide a set of tests which can be transpiled to the executable eolang code.
  • The repository should provide tools for transpiling some big python project, indicate that no exceptions were thrown from the transpiler and the resulting eolang files are syntactically correct.

@bugdea1er bugdea1er changed the title Formalize translator design and worflow Formalize translator design and workflow Jul 6, 2022
@bugdea1er
Copy link
Member

bugdea1er commented Jul 6, 2022

Workflow:

  • The main function parses the command line arguments and (if an existing input file was provided) gets the input content
  • The parser module uses the ANTLR parser to build an abstract syntax tree and then maps its tree to a custom design tree for easier use.
  • The simple pass module applies several py2py passes to eliminate some constructions which are not supported in eolang.
  • The resulting simplified AST is then translated to the eolang code.

@dours
Copy link
Collaborator

dours commented Jul 6, 2022

added description of my python-to-python passes https://github.com/polystat/py2eo/wiki/Workflow-description

@bugdea1er
Copy link
Member

Requirements and workflow desing description moved here:
https://github.com/polystat/py2eo/wiki/Requirements-and-workflow-design

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

4 participants