ishad-m-i-m / rpal-interpreter Goto Github PK
View Code? Open in Web Editor NEWEvaluate Abstract Syntax Tree of RPAL programs
License: GNU General Public License v3.0
Evaluate Abstract Syntax Tree of RPAL programs
License: GNU General Public License v3.0
Following is the output from the interpreter
Cannot assign more children to : not
Following is the output
let
.function_form
..Sum
..A
..where
...gamma
....Psum
....tau
.....A
.....gamma
......Order
......A
...rec
....function_form
.....Psum
.....,
......T
......N
.....->
......eq
.......N
.......0
......0
......+
.......gamma
........Psum
........tau
.........T
.........-
..........N
..........1
.......gamma
........T
........N
java.lang.NullPointerException: Cannot read field "name" because "root" is null
at ASTTree.traverse(ASTTree.java:28)
at ASTTree.traverse(ASTTree.java:31)
at ASTTree.traverse(ASTTree.java:31)
at ASTTree.traverse(ASTTree.java:31)
at ASTTree.traverse(ASTTree.java:17)
at Main.main(Main.java:7)
Process finished with exit code 0
When executing run with 2
application terminates with following error.
java.lang.ClassCastException: class csemachine.elements.Lambda cannot be cast to class csemachine.elements.Primitive (csemachine.elements.Lambda and csemachine.elements.Primitive are in unnamed module of loader 'app')
at csemachine.Machine.evaluate(Machine.java:74)
at Main.main(Main.java:23)
run with 10
is an example case.
The following error is raised.
java.lang.ClassCastException: class csemachine.elements.Primitive cannot be cast to class csemachine.elements.Variable (csemachine.elements.Primitive and csemachine.elements.Variable are in unnamed module of loader 'app')
at csemachine.Machine.evaluate(Machine.java:200)
at Main.main(Main.java:23)
When tested with run with example
output for standardize tree :
gamma
.lambda
..Sum
..gamma
...Print
...gamma
....Sum
....tau
.....1
.....2
.....3
.....4
.....5
.lambda
..A
..where <= Still where node appears here
...gamma
....Psum
....tau
.....A
.....gamma
......Order
......A
...=
....Psum
....gamma
.....Y
.....lambda
......Psum
......->
.......eq
........N
........0
.......0
.......+
........gamma
.........Psum
.........tau
..........T
..........-
...........N
...........1
........gamma
.........T
.........N
Following is the message got from the interpreter
Unsupported operator csemachine.elements.Primitive@46f7f36a
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.