Jump to content
  • Advertisement
Sign in to follow this  
brightening-eyes

how can i parse Script functions, variables, etc

This topic is 1489 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi all,

i'm developing a compiler for AngelScript using LLVM frontend

i have some questions:

how can i know what is the current line, it is a function? it is a variable, an expression, a statement, ETC!

and how can i know how many parameters does my function have, in order for LLVM to parse?

how can i know what is the return type?

how can i know the types of parameters?

how can i get a pointer to the script functions and objects?

thanks in advance

Share this post


Link to post
Share on other sites
Advertisement

This is what the parser is made for :)

 

You can see the implementation I have for AngelScript in the as_parser.cpp file.

Share this post


Link to post
Share on other sites

thanks for your reply, but i want to know how can i parse these

for example, the library is compiled, how can i parse them? how can i know this line is a function, how many parameter does it have, what is the return type and anything else that may a compiler has

if you can, give a minimal example

thanks in advance

Share this post


Link to post
Share on other sites

Please give an example of what you're trying to do so I can better understand what you're asking for and thus provide better help.

Share this post


Link to post
Share on other sites

i want to know what is executing, what function, what is the code, how many parameter does the function have, what is the variable name, what operation is currently is the script is doing, i want to plase them on the CPU registers and turn them into executables!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!