Re: [Jmatlab-toolboxes] jmatllab help....
Status: Beta
Brought to you by:
ali_muhammad_ca
From: Ali M. <ali...@gm...> - 2008-06-08 13:50:29
|
Brother Ehad Tarek, Salaam-o-alaikum, Thank you for your email. I guess you want to understand the internals of the interpreter. How the lexer and parser work? I assume that you already know the basics of compiler design and you have worked with something like lex and yacc. I used sablecc (www.sablecc.org) for compiler - compiler. It is very easy to use. It takes a grammar and generates lexer and parser for you. The generated parser is based on a design pattern which gives you a syntax tree walker. You basically extend this generated parser class with your implementation code for each node in the syntax tree. Unfortunately, this class could grow enormously depending on the size of your language specification. You will find a number of examples on sablecc.org for small languages. jMatlab's script language is not so small and it could be difficult to follow the code. Please let me know how do you plan to use this tool and I might be able to add those features. Please check out the website jmatlab.org for the latest updates. Recently, I add a clone of simulink (http://www.jsimulink.org) to the tool. wasalaam, Ali Muhammad On Sun, Jun 8, 2008 at 3:19 PM, Ehab Tarek <eha...@ya...> wrote: > My name is Ehab,works at EngNet comapny which works in the engineering > field www.imodelit.com > i've heard about the jmatlab from my team leader, it's really a great > application which provides a great feature to the end user and to the > developer in the field of engineering. > but i need some help as a developer. I need more information and > documentations to know how can i parse any .m file and use the interface > classes ex:-"IComplex,IMatrix,...etc" with the returned value. > i found at the site these lines of code:- > > Reader strReader = new StringReader(input); > Lexer lexer = new Lexer(new PushbackReader(new BufferedReader(strReader))); > Parser parser = new Parser(lexer); > Node ast = parser.parse(); > ast.apply(interpreter); > > i need to now more about the parser, i think an example for it would be > great. > finallay how can i wrap the matlab types to the java types > > The scenario for my problem :- > the user will write a function to do something using matlab for example > draw y=sin(x). > x ranges from 1:10. i need to know these values for x and each > corresponding y value using jmatlab. > > Eng.Ehab Tarek Fouad. > B.Sc. Computer Science and Information, Cairo uni > Department of Computer Science > eha...@im.... > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Jmatlab-toolboxes mailing list > Jma...@li... > https://lists.sourceforge.net/lists/listinfo/jmatlab-toolboxes > > |