Abstract Syntax Tree of this expression? - abstract-syntax-tree

I am trying to create an AST of the following expression:
return -7%++x+--y-++k%u--
but it's quite complex and I am stuck, can someone please help me start?

Related

Looking for algebraic primitive function solver code for math

I want to solve primitive functions algebraic for math class. I have been looking around and have found a lot of websites that have this function, but not any open source code!
The basic functionality is to have a function, and the be able to calculate it's primitive function and get the result back as an algebraic expression.
eg.
input: f(x) = cos(x)
output: F(x) = sin(x)
Are there code out there to solve this problem? I just need a template for my own code. And so the language isn't really of any concern.
Thanks for any help!
I have looked around on github and googled but haven't found anything!

Difference between readline() and scan() and how to use them

I have been tasked to use either the function readline() or scan() in my program, though the definitions in R Studio are vague and confusing for a beginner like me. Can someone please explain the main uses of these functions and how can I use them properly? Thank you!

How do classes and methods work in R and whats the most convenient way to use them?

I'm trying to do some object oriented programming in R. Im familiar with OOP syntax from other languages like Python and Java, but i don't understand how classes work in R.
I've found some examples are sources online but none of them are explained, its just raw code which seems to not make any sense.
Could you please tell me how a simple python class like the following can be written in R, with some explination:
class Num():
def __init__(self, number):
self.data = number
def print_number(self):
print(self.data)

R checkParams() function

Does anyone know if there is an R function called checkParams() and if so, could explain what it does? I found a checkParams function here, but I do not think this is the one being used by the code I am reading.

Can I use genetic distances in form of a .csv file to create a tree in R using ape ?

It is my first time using R for phylogenetics work and I was wondering if I could do that. It seems a rather trivial job and I think there must be a very small code for this, but I am unable to get it done. Any help appreciated!

Resources