CAS command question
|
01-10-2017, 09:14 PM
Post: #73
|
|||
|
|||
RE: CAS command question
(01-10-2017 06:58 PM)parisse Wrote: DrD: The CAS does not interact with hardware, and it shouldn't because that is not portable at all. As explained before, the CAS can parse a string to it's own internal data structures for representation of int, float, expressions, lists, operators, etc (a C structure named giac::gen for giac). This is what is called the parser (and it's not what Han calls parsing), more precisely this is a two phases step: the lexer finds words in the commandline and the parser applies grammar rules to build an expression. The CAS can also print it's internal data structures to strings. Strings are only used for communication with the outside world, everything else is done with giac::gen (and derivatives). I am genuinely interested in furthering my understanding GIAC. From my own point of view, it appears that my understanding of parsing and how you just explained it differs essentially only in the timing, i.e. when the action occurs (prior to runtime vs during) and not what the action does. In other words, the end result is that the parameters (input) that are being passed to a command must be encoded in some way (namely has giac::<blah> via the grammar you describe) before the content of the command itself is executed. Is this not correct? (And do the grammar rules presumably check for syntax as well? Or is that separate?) Any further enlightenment you could provide would be greatly appreciated. Graph 3D | QPI | SolveSys |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)