Re: softwire for basm?



If you implement the original proposal, couldn't you simply implement
a parser on top of it, allowing for expressions like you're
suggesting?

You could, but 'simply' and 'parser' in the same sentence do not usually turn out so simple in the end ;)

And in that particular case, parsing to generate as

sw.mov(eax, ebx)

from

'mov eax, ebx'

would be at least as complex as assembling it directly into an opcode in the first place, and likely turn out even more complex as asm instructions can be tabulated (cf. my x86asm unit), and their assembly streamlined, while tabulating and streamlining method invokations isn't as straightforward.

There is also the issue of composite instructions parameters, such as

mov eax, [esi+edx*2+4]

or qualifiers as in with f.i.

fld dword ptr [eax+edx]
fld qword ptr [esp-4]
etc.

which do not lend themselves to being expressed as method calls.

Eric
.



Relevant Pages

  • Re: Writing a Boolean Statement Parser/Engine - Need help
    ... A user could enter a properly formatted boolean search string that I ... could pass to the parser. ... The engine would look at the values I returned against the initial ... The expressions use a syntax nearly compatible to VB and the evaluator ...
    (microsoft.public.vb.general.discussion)
  • Re: boolean logic parser - need help
    ... I'm looking to evaluate basic boolean expressions like: ... My old parser can evaluate Expression1 and/or Expression2. ... stored in an associative array or literals. ... It would be nice to have a real parser - YACC looks powerful but it ...
    (comp.programming)
  • Re: Writing a Boolean Statement Parser/Engine - Need help
    ... A user could enter a properly formatted boolean search string that I could pass to the parser. ... I would iterate through the collection checking each term to see if it was in the search string and return a similar collection w/ a series of True/False values. ... The expressions use a syntax nearly compatible to VB and the evaluator allows the user to set variables. ...
    (microsoft.public.vb.general.discussion)
  • Re: Default argument values for blocks
    ... >> I'm suggesting that it may be time for a parser change ... > because it would require an arbitrary amount of lookahead. ... bitwise OR expressions in parens in the block param would solve the ...
    (comp.lang.ruby)