summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/ast/README.txt
diff options
context:
space:
mode:
authorMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:07:58 +0200
committerMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:07:58 +0200
commit967be9e750221ab2ab783f95df79bb26d290a45e (patch)
tree6802900a5e975f9f68b169f0f503f040056d6952 /tiger-compiler/src/ast/README.txt
add: added projectsHEADmain
Diffstat (limited to 'tiger-compiler/src/ast/README.txt')
-rw-r--r--tiger-compiler/src/ast/README.txt66
1 files changed, 66 insertions, 0 deletions
diff --git a/tiger-compiler/src/ast/README.txt b/tiger-compiler/src/ast/README.txt
new file mode 100644
index 0000000..4291b24
--- /dev/null
+++ b/tiger-compiler/src/ast/README.txt
@@ -0,0 +1,66 @@
+* README
+
+Tiger Abstract Syntax Tree nodes with their principal members.
+Incomplete classes are tagged with a `*'.
+
+/Ast/ (Location location)
+ /Dec/ (symbol name)
+ FunctionDec (VarChunk formals, NameTy result, Exp body)
+ MethodDec ()
+ TypeDec (Ty ty)
+ VarDec (NameTy type_name, Exp init)
+
+ /Exp/ ()
+ /Var/ ()
+ FieldVar (Var var, symbol name)
+ SimpleVar (symbol name)
+ SubscriptVar (Var var, Exp index)
+
+ ArrayExp (NameTy type_name, Exp size, Exp init)
+ AssertExp (Exp exp)
+ AssignExp (Var var, Exp exp)
+ BreakExp ()
+ CallExp (symbol name, exps_type args)
+ MethodCallExp (Var object)
+ CastExp (Exp exp, Ty ty)
+ ForExp (VarDec vardec, Exp hi, Exp body)
+ IfExp (Exp test, Exp thenclause, Exp elseclause)
+ IntExp (int value)
+ LetExp (ChunkList chunks, Exp body)
+ NilExp ()
+ ObjectExp (NameTy type_name)
+ OpExp (Exp left, Oper oper, Exp right)
+ RecordExp (NameTy type_name, fieldinits_type fields)
+ SeqExp (exps_type exps)
+ StringExp (string value)
+ WhileExp (Exp test, Exp body)
+
+ /Ty/ ()
+ ArrayTy (NameTy base_type)
+ ClassTy (NameTy super, ChunkList chunks)
+ NameTy (symbol name)
+ RecordTy (fields_type fields)
+
+ ChunkList (list_type chunks)
+
+ Field (symbol name, NameTy type_name)
+
+ FieldInit (symbol name, Exp init)
+
+
+Some of these classes also inherit from other classes.
+
+/Escapable/
+ VarDec (NameTy type_name, Exp init)
+
+/Typable/
+ /Dec/ (symbol name)
+ /Exp/ ()
+ /Ty/ ()
+
+/TypeConstructor/
+ /Ty/ ()
+ FunctionDec (VarChunk formals, NameTy result, Exp body)
+ NilExp ()
+ TypeDec (Ty ty)
+