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

A to Z example from Prolog to JavaScript? #1

Open
devijvers opened this issue Aug 19, 2013 · 1 comment
Open

A to Z example from Prolog to JavaScript? #1

devijvers opened this issue Aug 19, 2013 · 1 comment

Comments

@devijvers
Copy link

Would it possible to show how to generate a JavaScript file starting from a Prolog file? The project shows the Prolog input and corresponding JavaScript output, but not how to get the output starting from the input. I'm a Prolog n00b ;)

@rla
Copy link
Owner

rla commented Aug 19, 2013

A single file can be compiled (using SWI-Prolog) with the command swipl -q -f src/compiler.pl -t transpile <prolog file>. It should be run in the project root (or just adjust paths). Another way is to load src/compiler.pl and then run goal transpile/1 with the Prolog file name. Many Prolog constructs are not supported (not, if-then-else). I hope I find time to update the README soon.

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