Hi!
Thanks for the answer. I'll look into it later tonight. I am using the cxx target. Maybe I don't read the tree properly. I'll try to translate your main into cpp to check if I get the same result.

Thank you again and I'll update you after my research.

Patrick Grogan


Le 2011-07-21 18:41, Etienne M. Gagnon a écrit :
Hi Patrick,

Using the official SableCC 3 version, I get the AST shown below which seems fine to me. I've attached the Java source code for the Main class producing this output.

I guess that, if there is a problem, it must be in the alternative output back-end. Which language are you targeting? I've heard of minor bugs in the C# target.

Start:
  AGrammar:
    AProgramHeading:
      *TTsm: "TSM :"
      ASingleTsmList:
        *TTsmId: "{1,1,7}"
      *TSemicolon: ";"
    AMainStatementPart:
      AFullStatement:
        *TLabel: "BOUCLE:"
        *TConditions: "AL"
        AAssignStatement:
          AFifoSimpleResultResultDest:
            *TFifoSimpleResult: "(F,3,0,1)"
          *TEqual: "="
          ASourceFifoSimpleLSourceNode:
            *TSourceFifoSimple: "r0"
          *TOperator: "op1"
          ARSourceNode:
            ASourceFifoDeepLSourceNode:
              *TSourceFifoDeep: "(r1,0)"
        *TSemicolon: ";"
      AFullStatement:
        *TConditions: "AL"
        AJumpStatement:
          *TJump: "jump"
          *TIdentifier: "BOUCLE"
        *TSemicolon: ";"
  *EOF: ""



Have fun,

Etienne


That is the long part :) Here it is! Thank yo again for the help you will be able to provide to me :)
[...]




_______________________________________________
SableCC-Discussion mailing list
[email protected]
http://lists.sablecc.org/listinfo/sablecc-discussion
_______________________________________________
SableCC-Discussion mailing list
[email protected]
http://lists.sablecc.org/listinfo/sablecc-discussion

Reply via email to