The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
VisitorAdapter.cs
Go to the documentation of this file.
1 // -------------------------------------------------------------------------- //
3 // Project rROTOR //
4 // -------------------------------------------------------------------------- //
5 // File: VisitorAdapter.cs //
6 // Author: Cristina Gonzalez Muņoz - cristi.gm@gmail.com //
7 // Description: //
8 // Abstract class to define different visits over the abstract syntax tree //
9 // It makes a deep walker. //
10 // Inheritance: Visitor //
11 // Implements Visitor pattern [Visitor]. //
12 // -------------------------------------------------------------------------- //
13 // Create date: 11-12-2006 //
14 // Modification date: 30-07-2007 //
16 
17 using System;
18 using System.Text;
19 
20 using AST;
21 
22 namespace Tools {
31  abstract public class VisitorAdapter : Visitor {
32  #region Fields
33 
37  protected string currentFile;
38 
39  #endregion
40 
41  #region Visit(SourceFile node, Object obj)
42 
43  public override Object Visit(SourceFile node, Object obj) {
44  this.currentFile = node.Location.FileName;
45 
46  foreach (string key in node.Namespacekeys) {
47  int count = node.GetNamespaceDefinitionCount(key);
48  for (int i = 0; i < count; i++)
49  node.GetNamespaceDeclarationElement(key, i).Accept(this, obj);
50  }
51 
52  for (int i = 0; i < node.DeclarationCount; i++)
53  node.GetDeclarationElement(i).Accept(this, obj);
54 
55  return null;
56  }
57 
58  #endregion
59 
60  #region Visit(Namespace node, Object obj)
61 
62  public override Object Visit(Namespace node, Object obj) {
63  node.Identifier.Accept(this, obj);
64 
65  for (int i = 0; i < node.NamespaceMembersCount; i++)
66  node.GetDeclarationElement(i).Accept(this, obj);
67 
68  return null;
69  }
70 
71  #endregion
72 
73  #region Visit(DeclarationSet node, Object obj)
74 
75  public override Object Visit(DeclarationSet node, Object obj) {
76  for (int i = 0; i < node.Count; i++)
77  node.GetDeclarationElement(i).Accept(this, obj);
78 
79  return null;
80  }
81 
82  #endregion
83 
84  #region Visit(FieldDeclarationSet node, Object obj)
85 
86  public override Object Visit(FieldDeclarationSet node, Object obj) {
87  return null;
88  }
89 
90  #endregion
91 
92  #region Visit(IdDeclaration node, Object obj)
93 
94  public override Object Visit(IdDeclaration node, Object obj) {
95  return null;
96  }
97 
98  #endregion
99 
100  #region Visit(Definition node, Object obj)
101 
102  public override Object Visit(Definition node, Object obj) {
103  return node.Init.Accept(this, obj);
104  }
105 
106  #endregion
107 
108  #region Visit(ConstantDefinition node, Object obj)
109 
110  public override Object Visit(ConstantDefinition node, Object obj) {
111  return node.Init.Accept(this, obj);
112  }
113 
114  #endregion
115 
116  #region Visit(PropertyDefinition node, Object obj)
117 
118  public override Object Visit(PropertyDefinition node, Object obj) {
119  if (node.GetBlock != null)
120  node.GetBlock.Accept(this, obj);
121 
122  if (node.SetBlock != null)
123  node.SetBlock.Accept(this, obj);
124 
125  return null;
126  }
127 
128  #endregion
129 
130  #region Visit(ClassDefinition node, Object obj)
131 
132  public override Object Visit(ClassDefinition node, Object obj) {
133  for (int i = 0; i < node.MemberCount; i++)
134  node.GetMemberElement(i).Accept(this, obj);
135 
136  return null;
137  }
138 
139  #endregion
140 
141  #region Visit(InterfaceDefinition node, Object obj)
142 
143  public override Object Visit(InterfaceDefinition node, Object obj) {
144  for (int i = 0; i < node.MemberCount; i++)
145  node.GetMemberElement(i).Accept(this, obj);
146 
147  return null;
148  }
149 
150  #endregion
151 
152  #region Visit(ConstructorDefinition node, Object obj)
153 
154  public override Object Visit(ConstructorDefinition node, Object obj) {
155  if (node.Initialization != null)
156  node.Initialization.Accept(this, obj);
157 
158  return node.Body.Accept(this, obj);
159  }
160 
161  #endregion
162 
163  #region Visit(FieldDeclaration node, Object obj)
164 
165  public override Object Visit(FieldDeclaration node, Object obj) {
166 
167  return null;
168  }
169 
170  #endregion
171 
172  #region Visit(FieldDefinition node, Object obj)
173 
174  public override Object Visit(FieldDefinition node, Object obj) {
175 
176  return node.Init.Accept(this, obj);
177  }
178 
179  #endregion
180 
181  #region Visit(ConstantFieldDefinition node, Object obj)
182 
183  public override Object Visit(ConstantFieldDefinition node, Object obj) {
184 
185  return node.Init.Accept(this, obj);
186  }
187 
188  #endregion
189 
190  #region Visit(MethodDeclaration node, Object obj)
191 
192  public override Object Visit(MethodDeclaration node, Object obj) {
193 
194  return null;
195  }
196 
197  #endregion
198 
199  #region Visit(MethodDefinition node, Object obj)
200 
201  public override Object Visit(MethodDefinition node, Object obj) {
202 
203  return node.Body.Accept(this, obj);
204  }
205 
206  #endregion
207 
208  // Expressions
209  #region Visit(ArgumentExpression node, Object obj)
210 
211  public override Object Visit(ArgumentExpression node, Object obj) {
212 
213  return node.Argument.Accept(this, obj);
214  }
215 
216  #endregion
217 
218  #region Visit(ArithmeticExpression node, Object obj)
219 
220  public override Object Visit(ArithmeticExpression node, Object obj) {
221  node.FirstOperand.Accept(this, obj);
222  node.SecondOperand.Accept(this, obj);
223 
224  return null;
225  }
226 
227  #endregion
228 
229  #region Visit(ArrayAccessExpression node, Object obj)
230 
231  public override Object Visit(ArrayAccessExpression node, Object obj) {
232  node.FirstOperand.Accept(this, obj);
233  node.SecondOperand.Accept(this, obj);
234 
235  return null;
236  }
237 
238  #endregion
239 
240  #region Visit(AssignmentExpression node, Object obj)
241 
242  public override Object Visit(AssignmentExpression node, Object obj) {
243  node.FirstOperand.Accept(this, obj);
244  node.SecondOperand.Accept(this, obj);
245 
246  if (node.MoveStat != null)
247  node.MoveStat.Accept(this, obj);
248 
249  return null;
250  }
251 
252  #endregion
253 
254  #region Visit(BaseCallExpression node, Object obj)
255 
256  public override Object Visit(BaseCallExpression node, Object obj) {
257 
258  return node.Arguments.Accept(this, obj);
259  }
260 
261  #endregion
262 
263  #region Visit(BaseExpression node, Object obj)
264 
265  public override Object Visit(BaseExpression node, Object obj) {
266 
267  return null;
268  }
269 
270  #endregion
271 
272  #region Visit(BinaryExpression node, Object obj)
273 
274  public override Object Visit(BinaryExpression node, Object obj) {
275  node.FirstOperand.Accept(this, obj);
276  node.SecondOperand.Accept(this, obj);
277 
278  return null;
279  }
280 
281  #endregion
282 
283  #region Visit(BitwiseExpression node, Object obj)
284 
285  public override Object Visit(BitwiseExpression node, Object obj) {
286  node.FirstOperand.Accept(this, obj);
287  node.SecondOperand.Accept(this, obj);
288 
289  return null;
290  }
291 
292  #endregion
293 
294  #region Visit(BoolLiteralExpression node, Object obj)
295 
296  public override Object Visit(BoolLiteralExpression node, Object obj) {
297 
298  return null;
299  }
300 
301  #endregion
302 
303  #region Visit(CastExpression node, Object obj)
304 
305  public override Object Visit(CastExpression node, Object obj) {
306 
307  return node.Expression.Accept(this, obj);
308  }
309 
310  #endregion
311 
312  #region Visit(CharLiteralExpression node, Object obj)
313 
314  public override Object Visit(CharLiteralExpression node, Object obj) {
315 
316  return null;
317  }
318 
319  #endregion
320 
321  #region Visit(CompoundExpression node, Object obj)
322 
323  public override Object Visit(CompoundExpression node, Object obj) {
324  for (int i = 0; i < node.ExpressionCount; i++)
325  node.GetExpressionElement(i).Accept(this, obj);
326 
327  return null;
328  }
329 
330  #endregion
331 
332  #region Visit(DoubleLiteralExpression node, Object obj)
333 
334  public override Object Visit(DoubleLiteralExpression node, Object obj) {
335 
336  return null;
337  }
338 
339  #endregion
340 
341  #region Visit(FieldAccessExpression node, Object obj)
342 
343  public override Object Visit(FieldAccessExpression node, Object obj) {
344  node.Expression.Accept(this, obj);
345  node.FieldName.Accept(this, obj);
346 
347  return null;
348  }
349 
350  #endregion
351 
352  #region Visit(IntLiteralExpression node, Object obj)
353 
354  public override Object Visit(IntLiteralExpression node, Object obj) {
355 
356  return null;
357  }
358 
359  #endregion
360 
361  #region Visit(InvocationExpression node, Object obj)
362 
363  public override Object Visit(InvocationExpression node, Object obj) {
364  node.Identifier.Accept(this, obj);
365  node.Arguments.Accept(this, obj);
366 
367  return null;
368  }
369 
370  #endregion
371 
372  #region Visit(IsExpression node, Object obj)
373 
374  public override Object Visit(IsExpression node, Object obj) {
375 
376  return node.Expression.Accept(this, obj);
377  }
378 
379  #endregion
380 
381  #region Visit(LogicalExpression node, Object obj)
382 
383  public override Object Visit(LogicalExpression node, Object obj) {
384  node.FirstOperand.Accept(this, obj);
385  node.SecondOperand.Accept(this, obj);
386 
387  return null;
388  }
389 
390  #endregion
391 
392  #region Visit(NewArrayExpression node, Object obj)
393 
394  public override Object Visit(NewArrayExpression node, Object obj) {
395  if (node.Size != null)
396  node.Size.Accept(this, obj);
397 
398  if (node.Init != null)
399  node.Init.Accept(this, obj);
400 
401  return null;
402  }
403 
404  #endregion
405 
406  #region Visit(NewExpression node, Object obj)
407 
408  public override Object Visit(NewExpression node, Object obj) {
409 
410  return node.Arguments.Accept(this, obj);
411  }
412 
413  #endregion
414 
415  #region Visit(NullExpression node, Object obj)
416 
417  public override Object Visit(NullExpression node, Object obj) {
418 
419  return null;
420  }
421 
422  #endregion
423 
424  #region Visit(QualifiedIdentifierExpression node, Object obj)
425 
426  public override Object Visit(QualifiedIdentifierExpression node, Object obj) {
427  node.IdName.Accept(this, obj);
428  node.IdExpression.Accept(this, obj);
429 
430  return null;
431  }
432 
433  #endregion
434 
435  #region Visit(RelationalExpression node, Object obj)
436 
437  public override Object Visit(RelationalExpression node, Object obj) {
438  node.FirstOperand.Accept(this, obj);
439  node.SecondOperand.Accept(this, obj);
440 
441  return null;
442  }
443 
444  #endregion
445 
446  #region Visit(SingleIdentifierExpression node, Object obj)
447 
448  public override Object Visit(SingleIdentifierExpression node, Object obj) {
449 
450  return null;
451  }
452 
453  #endregion
454 
455  #region Visit(StringLiteralExpression node, Object obj)
456 
457  public override Object Visit(StringLiteralExpression node, Object obj) {
458 
459  return null;
460  }
461 
462  #endregion
463 
464  #region Visit(TernaryExpression node, Object obj)
465 
466  public override Object Visit(TernaryExpression node, Object obj) {
467  node.FirstOperand.Accept(this, obj);
468  node.SecondOperand.Accept(this, obj);
469  node.ThirdOperand.Accept(this, obj);
470 
471  return null;
472  }
473 
474  #endregion
475 
476  #region Visit(ThisExpression node, Object obj)
477 
478  public override Object Visit(ThisExpression node, Object obj) {
479 
480  return null;
481  }
482 
483  #endregion
484 
485  #region Visit(UnaryExpression node, Object obj)
486 
487  public override Object Visit(UnaryExpression node, Object obj) {
488  node.Operand.Accept(this, obj);
489 
490  return null;
491  }
492 
493  #endregion
494 
495  // Statements
496 
497  #region Visit(AssertStatement node, Object obj)
498 
499  public override Object Visit(AssertStatement node, Object obj) {
500  node.Condition.Accept(this, obj);
501  node.Expression.Accept(this, obj);
502 
503  return null;
504  }
505 
506  #endregion
507 
508  #region Visit(BreakStatement node, Object obj)
509 
510  public override Object Visit(BreakStatement node, Object obj) {
511 
512  return null;
513  }
514 
515  #endregion
516 
517  #region Visit(CatchStatement node, Object obj)
518 
519  public override Object Visit(CatchStatement node, Object obj) {
520  node.Exception.Accept(this, obj);
521  node.Statements.Accept(this, obj);
522 
523  return null;
524  }
525 
526  #endregion
527 
528  #region Visit(Block node, Object obj)
529 
530  public override Object Visit(Block node, Object obj) {
531  for (int i = 0; i < node.StatementCount; i++)
532  node.GetStatementElement(i).Accept(this, obj);
533 
534  return null;
535  }
536 
537  #endregion
538 
539  #region Visit(ContinueStatement node, Object obj)
540 
541  public override Object Visit(ContinueStatement node, Object obj) {
542 
543  return null;
544  }
545 
546  #endregion
547 
548  #region Visit(DoStatement node, Object obj)
549 
550  public override Object Visit(DoStatement node, Object obj) {
551  for (int i = 0; i < node.InitDo.Count; i++)
552  node.InitDo[i].Accept(this, obj);
553 
554  for (int i = 0; i < node.BeforeBody.Count; i++)
555  node.BeforeBody[i].Accept(this, obj);
556 
557  node.Statements.Accept(this, obj);
558  node.Condition.Accept(this, obj);
559 
560  return null;
561  }
562 
563  #endregion
564 
565  #region Visit(ForeachStatement node, Object obj)
566 
567  public override Object Visit(ForeachStatement node, Object obj) {
568  node.ForEachDeclaration.Accept(this, obj);
569  node.ForeachExp.Accept(this, obj);
570  node.ForeachBlock.Accept(this, obj);
571 
572  return null;
573  }
574 
575  #endregion
576 
577  #region Visit(ForStatement node, Object obj)
578 
579  public override Object Visit(ForStatement node, Object obj) {
580  for (int i = 0; i < node.InitializerCount; i++)
581  node.GetInitializerElement(i).Accept(this, obj);
582 
583  for (int i = 0; i < node.AfterInit.Count; i++)
584  node.AfterInit[i].Accept(this, obj);
585 
586  for (int i = 0; i < node.BeforeCondition.Count; i++)
587  node.BeforeCondition[i].Accept(this, obj);
588 
589  node.Condition.Accept(this, obj);
590  for (int i = 0; i < node.AfterCondition.Count; i++)
591  node.AfterCondition[i].Accept(this, obj);
592 
593  node.Statements.Accept(this, obj);
594 
595  for (int i = 0; i < node.IteratorCount; i++)
596  node.GetIteratorElement(i).Accept(this, obj);
597 
598  return null;
599  }
600 
601  #endregion
602 
603  #region Visit(IfElseStatement node, Object obj)
604 
605  public override Object Visit(IfElseStatement node, Object obj) {
606  node.Condition.Accept(this, obj);
607 
608  for (int i = 0; i < node.AfterCondition.Count; i++)
609  node.AfterCondition[i].Accept(this, obj);
610 
611  node.TrueBranch.Accept(this, obj);
612  node.FalseBranch.Accept(this, obj);
613 
614  for (int i = 0; i < node.ThetaStatements.Count; i++)
615  node.ThetaStatements[i].Accept(this, obj);
616 
617  return null;
618  }
619 
620  #endregion
621 
622  #region Visit(ReturnStatement node, Object obj)
623 
624  public override Object Visit(ReturnStatement node, Object obj) {
625  node.Assigns.Accept(this, obj);
626 
627  if (node.ReturnExpression != null)
628  return node.ReturnExpression.Accept(this, obj);
629 
630  return null;
631  }
632 
633  #endregion
634 
635  #region Visit(SwitchLabel node, Object obj)
636 
637  public override Object Visit(SwitchLabel node, Object obj) {
638  if (node.SwitchSectionType == SectionType.Case)
639  node.Condition.Accept(this, obj);
640 
641  return null;
642  }
643 
644  #endregion
645 
646  #region Visit(SwitchSection node, Object obj)
647 
648  public override Object Visit(SwitchSection node, Object obj) {
649  for (int i = 0; i < node.LabelSection.Count; i++)
650  node.LabelSection[i].Accept(this, obj);
651 
652  for (int i = 0; i < node.SwitchBlock.StatementCount; i++)
653  node.SwitchBlock.GetStatementElement(i).Accept(this, obj);
654 
655  return null;
656  }
657 
658  #endregion
659 
660  #region Visit(SwitchStatement node, Object obj)
661 
662  public override Object Visit(SwitchStatement node, Object obj) {
663  node.Condition.Accept(this, obj);
664 
665  for (int i = 0; i < node.AfterCondition.Count; i++)
666  node.AfterCondition[i].Accept(this, obj);
667 
668  for (int i = 0; i < node.SwitchBlockCount; i++)
669  node.GetSwitchSectionElement(i).Accept(this, obj);
670 
671  for (int i = 0; i < node.ThetaStatements.Count; i++)
672  node.ThetaStatements[i].Accept(this, obj);
673 
674  return null;
675  }
676 
677  #endregion
678 
679  #region Visit(ThrowStatement node, Object obj)
680 
681  public override Object Visit(ThrowStatement node, Object obj) {
682  if (node.ThrowExpression == null)
683  return null;
684  return node.ThrowExpression.Accept(this, obj);
685  }
686 
687  #endregion
688 
689  #region Visit(ExceptionManagementStatement node, Object obj)
690 
691  public override Object Visit(ExceptionManagementStatement node, Object obj) {
692  node.TryBlock.Accept(this, obj);
693 
694  for (int i = 0; i < node.CatchCount; i++)
695  node.GetCatchElement(i).Accept(this, obj);
696 
697  if (node.FinallyBlock != null)
698  node.FinallyBlock.Accept(this, obj);
699 
700  return null;
701  }
702 
703  #endregion
704 
705  #region Visit(WhileStatement node, Object obj)
706 
707  public override Object Visit(WhileStatement node, Object obj) {
708  for (int i = 0; i < node.InitWhile.Count; i++)
709  node.InitWhile[i].Accept(this, obj);
710 
711  for (int i = 0; i < node.BeforeCondition.Count; i++)
712  node.BeforeCondition[i].Accept(this, obj);
713 
714  node.Condition.Accept(this, obj);
715 
716  for (int i = 0; i < node.AfterCondition.Count; i++)
717  node.AfterCondition[i].Accept(this, obj);
718 
719  node.Statements.Accept(this, obj);
720 
721  return null;
722  }
723 
724  #endregion
725 
726  #region Visit(MoveStatement node, Object obj)
727 
728  public override Object Visit(MoveStatement node, Object obj) {
729  node.LeftExp.Accept(this, obj);
730  node.RightExp.Accept(this, obj);
731 
732  if (node.MoveStat != null)
733  node.MoveStat.Accept(this, obj);
734 
735  return null;
736  }
737 
738  #endregion
739 
740  #region Visit(ThetaStatement node, Object obj)
741 
742  public override Object Visit(ThetaStatement node, Object obj) {
743  node.ThetaId.Accept(this, obj);
744 
745  for (int i = 0; i < node.ThetaList.Count; i++)
746  node.ThetaList[i].Accept(this, obj);
747 
748  return null;
749  }
750 
751  #endregion
752 
753  }
754 }
Encapsulates a Return statement of our programming languages.
Encapsulates a &#39;base&#39; expression.
override Object Visit(SwitchSection node, Object obj)
Encapsulates a definition of a concrete method.
Encapsulates a Break statement of our programming languages.
Encapsulates a binary expression of our programming language.
override Object Visit(StringLiteralExpression node, Object obj)
override Object Visit(AssignmentExpression node, Object obj)
Encapsulates the qualified name expression.
Encapsulates a Case statement of our programming languages.
List< ThetaStatement > BeforeBody
Gets or sets the statements before do body.
Definition: DoStatement.cs:92
Statement GetBlock
Gets the statements associated to the get accessor.
Encapsulates a Do statement of our programming language.
Definition: DoStatement.cs:34
Encapsulates a string literal expression.
Encapsulates the expression to access a field.
override Object Visit(FieldDeclaration node, Object obj)
override Object Visit(ThetaStatement node, Object obj)
Encapsulates a block of statements.
Definition: Block.cs:34
override Object Visit(BitwiseExpression node, Object obj)
Statement GetIteratorElement(int index)
Gets the element stored in the specified index.
override Object Visit(ConstructorDefinition node, Object obj)
override Object Visit(SourceFile node, Object obj)
Encapsulates a namespace definition.
Definition: Namespace.cs:35
List< MoveStatement > InitDo
Gets or sets the statements to use at the init of the do loop.
Definition: DoStatement.cs:83
override Object Visit(BreakStatement node, Object obj)
override Object Visit(ThisExpression node, Object obj)
override Object Visit(NewArrayExpression node, Object obj)
override Object Visit(BinaryExpression node, Object obj)
override Object Visit(BaseCallExpression node, Object obj)
override Object Visit(MethodDeclaration node, Object obj)
Encapsulates a Catch statement of our programming languages.
Encapsulates a logical binary expression.
Encapsulates a invocation expression.
override Object Visit(NullExpression node, Object obj)
Encapsulates a boolean literal expression.
Encapsulates a cast expression.
override Object Visit(ConstantFieldDefinition node, Object obj)
Encapsulates a definition of a concrete field.
SectionType SwitchSectionType
Gets the type of the Case statement (case or default)
Definition: SwitchLabel.cs:77
Abstract class to define different visits over the abstract syntax tree.
Definition: Visitor.cs:29
override Object Visit(MoveStatement node, Object obj)
override Object Visit(ArrayAccessExpression node, Object obj)
override Object Visit(ContinueStatement node, Object obj)
override Object Visit(InvocationExpression node, Object obj)
override Object Visit(DeclarationSet node, Object obj)
List< MoveStatement > AfterCondition
Gets or sets the statements after condition.
override Object Visit(Block node, Object obj)
override Object Visit(ArgumentExpression node, Object obj)
override Object Visit(FieldAccessExpression node, Object obj)
MoveStatement MoveStat
Gets or sets a move statement associated to the assignment expression.
override Object Visit(Namespace node, Object obj)
Encapsulates a constant field definition.
Encapsulates a definition.
Definition: Definition.cs:36
Encapsulates arithmetic binary expressions.
CatchStatement GetCatchElement(int index)
Gets the element stored in the specified index.
override Object Visit(BaseExpression node, Object obj)
SwitchSection GetSwitchSectionElement(int index)
Gets the element stored in the specified index.
Encapsulates a For statement of our programming languages.
Definition: ForStatement.cs:34
Encapsulates a While statement of our programming languages.
Encapsulates a null expression.
Encapsulates a Is expression.
Definition: IsExpression.cs:35
Encapsulates a definition of a concrete interface.
override Object Visit(ClassDefinition node, Object obj)
Encapsulates a Assert statement of our programming languages.
override Object Visit(QualifiedIdentifierExpression node, Object obj)
Block SwitchBlock
Gets the code block of Case statement.
override Object Visit(RelationalExpression node, Object obj)
Encapsulates a switch label (Case + condition or Default section).
Definition: SwitchLabel.cs:47
override Object Visit(FieldDefinition node, Object obj)
Encapsulates a identifier expression of our programming language.
Encapsulates a statement with several declarations.
Encapsulates a declaration of a concrete method.
override Object Visit(LogicalExpression node, Object obj)
Encapsulates a set of expressions.
string currentFile
Name of the current file.
override Object Visit(ForeachStatement node, Object obj)
Encapsulates a Theta function to use in SSA algorithm.
Expression ThrowExpression
Gets the throw expression.
Abstract class to define different visits over the abstract syntax tree. It makes a deep walker...
override Object Visit(ConstantDefinition node, Object obj)
List< SwitchLabel > LabelSection
Gets the type of the Case statement (case or default)
override Object Visit(CompoundExpression node, Object obj)
override Object Visit(AssertStatement node, Object obj)
Encapsulates a relational binary expression.
Encapsulates a bitwise binary expression.
List< ThetaStatement > ThetaStatements
Gets or sets the theta funcion statements
Encapsulates assignment binary expressions.
CompoundExpression Init
Gets or sets the array initialization
Encapsulates a ternary expression of our programming language.
override Object Visit(ForStatement node, Object obj)
Encapsulates a If-Else statement of our programming language.
Encapsulates a new array expression.
Encapsulates a definition of a concrete constructor.
Declaration GetMemberElement(int index)
Gets the element stored in the specified index.
override Object Visit(CastExpression node, Object obj)
override Object Visit(CharLiteralExpression node, Object obj)
List< ThetaStatement > BeforeCondition
Gets or sets the statements before condition.
MoveStatement MoveStat
Gets or sets a move statement associated to the current move statement.
Encapsulates the source code.
Definition: SourceFile.cs:35
override Object Visit(WhileStatement node, Object obj)
Declaration GetDeclarationElement(int index)
Gets the element stored in the specified index.
Definition: Namespace.cs:96
override Object Visit(FieldDeclarationSet node, Object obj)
Expression GetExpressionElement(int index)
Gets the element stored in the specified index.
Encapsulates a Try-Catch-finally statement of our programming languages. As C# states catch blcok and...
override Object Visit(MethodDefinition node, Object obj)
override Object Visit(ArithmeticExpression node, Object obj)
Encapsulates a string literal expression.
List< ThetaStatement > ThetaStatements
Gets or sets the theta funcion statements
Encapsulates a declaration.
override Object Visit(DoStatement node, Object obj)
Encapsulates a argument expression of our programming language.
List< MoveStatement > AfterCondition
Gets or sets the statements after condition.
Encapsulates a &#39;this&#39; expression.
List< MoveStatement > InitWhile
Gets or sets the statements to use at the init of the while loop.
Encapsulates a unary expression of our programming language.
List< SingleIdentifierExpression > ThetaList
Gets the parameter of theta funcion
override Object Visit(IfElseStatement node, Object obj)
override Object Visit(InterfaceDefinition node, Object obj)
Expression Size
Gets or sets the array size
InvocationExpression Initialization
Gets the base or this initialization of the constructor definition
Expression ReturnExpression
Gets the return expression.
SectionType
Indicates if it is a case statement or a default case.
Definition: SwitchLabel.cs:31
override Object Visit(DoubleLiteralExpression node, Object obj)
override Object Visit(IdDeclaration node, Object obj)
Encapsulates a integer literal expression.
Encapsulates a set of field declarations.
override Object Visit(SwitchStatement node, Object obj)
override Object Visit(Definition node, Object obj)
Encapsulates a declaration of a concrete field.
Encapsulates a constant definition.
Encapsulates the array expression to access the concrete position.
override Object Visit(UnaryExpression node, Object obj)
override Object Visit(NewExpression node, Object obj)
List< MoveStatement > AfterCondition
Gets or sets the statements after condition.
override Object Visit(TernaryExpression node, Object obj)
Block FinallyBlock
Gets the statements executed in Finally block. if there is no finally statementes can be null ...
override Object Visit(IsExpression node, Object obj)
Encapsulates a Move instruction to use in SSA algorithm
List< ThetaStatement > BeforeCondition
Gets or sets the statements before condition.
override Object Visit(SwitchLabel node, Object obj)
Encapsulates a Continue statement of our programming languages.
override Object Visit(SingleIdentifierExpression node, Object obj)
override Object Visit(IntLiteralExpression node, Object obj)
Statement SetBlock
Gets the statements associated to the set accessor.
Encapsulates a Throw statement of our programming languages.
List< MoveStatement > AfterInit
Gets or sets the statements to use after initialization
override Object Visit(ExceptionManagementStatement node, Object obj)
override Object Visit(ReturnStatement node, Object obj)
override Object Visit(CatchStatement node, Object obj)
Statement GetStatementElement(int index)
Gets the element stored in the specified index.
Definition: Block.cs:159
Encapsulates a Foreach statement of our programming languages.
List< MoveStatement > AfterCondition
Encapsulates a invocation expression to base class.
Encapsulates a new expression.
Encapsulates a property definition.
Encapsulates a definition of a concrete class.
Statement GetDeclarationElement(int index)
Gets the element stored in the specified index.
override Object Visit(ThrowStatement node, Object obj)
override Object Visit(PropertyDefinition node, Object obj)
Encapsulates a Switch statement of our programming languages.
Statement GetInitializerElement(int index)
Gets the element stored in the specified index.
override Object Visit(BoolLiteralExpression node, Object obj)