Laurita

Páginas: 4 (782 palabras) Publicado: 23 de agosto de 2012
//Regla 1: MainClass | Goal TypeDeclaration ;
Goal ::=
MainClass: MC
{:
raiz = new DeclaracionMain_AST(MC);
:}
|
Goal:G TypeDeclaration: TD{:
raiz = new DelcaracionTipoMain_AST (G, TD)
:}
//--------------------------------------------------------------------------------------------------------------
// Regla2: CLASS ID CORCHETEi PUBLIC STATIC VOID MAIN PARENTi TSTRING PARENTCUAi PARENTCUAd ID PARENTd CORCHETEi PrintStatement CORCHETEd CORCHETEd ;
MainClass ::=
CLASS ID:id1 CORCHETEiPUBLIC STATIC VOID MAIN PARENTi TSTRING PARENTCUAi PARENTCUAd ID:id2 PARENTd CORCHETEi PrintStatement:PS CORCHETEd CORCHETEd
{:
RESULT = new MainClass_AST(id1,id2,PS);
:}//--------------------------------------------------------------------------------------------------------------
// Regla 3: ClassDeclaration | ClassExtendsDeclaration ;TypeDeclaration::=
ClassDeclaration:CD
{:
RESULT = new DeclaracionClase_AST(CD);
:}
|
{:
ClassExtendsDeclaration:CED
RESULT = newDeclaracionClaseExtendida_AST(CED);
:}
//--------------------------------------------------------------------------------------------------------------
//Regla 4: CLASS ID CORCHETEi VarDeclsMethodDecls CORCHETEd ;
ClassDeclaration ::=
CLASS ID:id CORCHETEi VarDecls:VD MethodDecls:MD CORCHETEd
{:
RESULT = new ClassDeclaration_AST (id, VD, MD);
:}//--------------------------------------------------------------------------------------------------------------
//Regla 5: CLASS ID EXTENDS ID CORCHETEi VarDecls MethodDecls CORCHETEd ;ClassExtendsDeclaration ::=
CLASS ID:id1 EXTENDS ID:id2 CORCHETEi VarDecls:VD MethodDecls:MD CORCHETEd
{:
RESULT = new ClassExtendsDeclaration_AST(id1, id2, VD, MD);
:}...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Laurita
  • laurita
  • DOCUMENTOS LAURITA!
  • DERECHO LAURITA
  • Roger Y Yo Laurita
  • El sue o de Laurita
  • laurita
  • Laurita

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS