Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 1a06eac68c
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 132 lines (124 sloc) 3.383 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131


  1: PROGRAM
  2: VARS
  3: x Int
  4: y Struct
  5: x Int
  6: y Int
  7: EndStruct
  8: b Struct
  9: n Int
 10: EndStruct
 11: a Struct
 12: n Int
 13: n Int
 14: EndStruct
 15: ENDVARS
 16: w:=v+p12
 17: v:=y.y+y.x
 18: x:=3+y.y
 19: x:=3+y.x
 20: b.x:=b.n
 21: b:=y.y+y.x
 22: y.x:=y.y
 23: y.y:=2+y.x+x
 24: y:=y
 25: ENDPROGRAM
 26:


program
    \__list
    | \__ident(x)
    | | \__int
    | \__ident(y)
    | | \__struct
    | | \__ident(x)
    | | | \__int
    | | \__ident(y)
    | | \__int
    | \__ident(b)
    | | \__struct
    | | \__ident(n)
    | | \__int
    | \__ident(a)
    | \__struct
    | \__ident(n)
    | | \__int
    | \__ident(n)
    | \__int
    \__list
    \__list
           \__:=
           | \__ident(w)
           | \__+
           | \__ident(v)
           | \__ident(p12)
           \__:=
           | \__ident(v)
           | \__+
           | \__.
           | | \__ident(y)
           | | \__ident(y)
           | \__.
           | \__ident(y)
           | \__ident(x)
           \__:=
           | \__ident(x)
           | \__+
           | \__intconst(3)
           | \__.
           | \__ident(y)
           | \__ident(y)
           \__:=
           | \__ident(x)
           | \__+
           | \__intconst(3)
           | \__.
           | \__ident(y)
           | \__ident(x)
           \__:=
           | \__.
           | | \__ident(b)
           | | \__ident(x)
           | \__.
           | \__ident(b)
           | \__ident(n)
           \__:=
           | \__ident(b)
           | \__+
           | \__.
           | | \__ident(y)
           | | \__ident(y)
           | \__.
           | \__ident(y)
           | \__ident(x)
           \__:=
           | \__.
           | | \__ident(y)
           | | \__ident(x)
           | \__.
           | \__ident(y)
           | \__ident(y)
           \__:=
           | \__.
           | | \__ident(y)
           | | \__ident(y)
           | \__+
           | \__+
           | | \__intconst(2)
           | | \__.
           | | \__ident(y)
           | | \__ident(x)
           | \__ident(x)
           \__:=
                \__ident(y)
                \__ident(y)


Type Checking:

L. 13: Field n already defined in the struct.
L. 16: Identifier w is undeclared.
L. 16: Identifier v is undeclared.
L. 16: Identifier p12 is undeclared.
L. 16: Left expression of assignment is not referenceable.
L. 17: Identifier v is undeclared.
L. 17: Left expression of assignment is not referenceable.
L. 20: Field x is not defined in the struct.
L. 21: Assignment with incompatible types.
There are errors: no code generated
Something went wrong with that request. Please try again.