Ad
  • Custom User Avatar

    A more traditional parser. Note the use of a container class ("State" in this case) to provide a mechanism for the inner functions to modify the variables. This is just to follow the initial architecture of a single parse function -- a better way would be to create a Calculator class with a parse() method.

  • Custom User Avatar

    Never mind - my bad. I was returning the ast from pass3 rather than the assembler output. D'oh!

  • Custom User Avatar

    Some (with enough honor/ranking, I don't know exactly how it works) have access to a lot of kata to do some maintenance, but it's not clear what can or cannot be done (at lesat, modifications of the descriptions are allowed).

    One critical point is: those who are not the original author are not able to approve new translations (EDIT: as said just above, actually... lol)

  • Custom User Avatar

    Aren't there some mechanic to add maintainers for a kata? Admins should do something with it. This kata looks amazing.

  • Custom User Avatar

    ALMOST got this working, but I am failing a test with the following message:
    prog(4,0,0) == 3: None should equal 3
    I think this relates to executing the following program with the paramters [4, 0, 0]:

    [ x y z ] ( 2*3*x + 5*y - 3*z ) / (1 + 3 + 2*2)

    When I run this using the emulation code provided, I do, indeed, get the answer 3 (actually 3.0 but whatever, not None). I don't know how to proceed. I am reasonably confident that the assembler code I am generating is correct -- it works with the emulation code.

    Has anyone else seen this error? Any advice?