On Saturday, August 23, 2003, at 08:22 , Benjamin Goldberg wrote:

Leopold Toetsch wrote:

Benjamin Goldberg <[EMAIL PROTECTED]> wrote:

setline_i Ix # the next line is x, each succeeding line increases.

The HLL doesn't know, how many ops one source line will need.

Not *normally*, but if it's including code which is already literal assembler, it does: Imagine a version of lex/yacc wherein the the blocks of code you give are imcc or pasm (instead of C). Clearly, there's one op per line of source.

p6.pl 1: my $var is int; p6.pl 2: $var = ($var * $var + 1) * 2 + 3;

p6.imc 1: .local int var
p6.imc 2: setfile "p6.pl"
p6.imc 3: setline 1
p6.imc 4: var = 0 # So far, so good.
p6.imc 5: var = var * var # Line 2 begins here. Yet what's on the next line?
p6.imc 6: setline 2 # Inhibit auto-increment.
p6.imc 7: var = var + 1
p6.imc 8: setline 2 # Inhibit auto-increment AGAIN.
p6.imc 9: var = var * 2
p6.imc 10: setline 2 # Getting annoying...
p6.imc 11: var = var + 3


And what to do if the HLL is emitting expression-level detail as character ranges?



Gordon Henriksen
[EMAIL PROTECTED]



Reply via email to