SlideShare una empresa de Scribd logo
1 de 10
Descargar para leer sin conexión
/* pascal.y – Un parser escrito en Bison para lenguaje Pascal.    Genera AST linealizado */
/* Escrito por Egdares Futch H. – UNITEC Honduras */
%{
#include <stdio.h>
#include <ctype.h>

#include   "protos.h"
#include   "token.h"
#include   "tmpvar.h"
#include   "error.h"
#include   "table.h"

extern TmpVars TmpVarGenerator;
extern SymbolTable *GlobalSymbolTable,*CurrentSymbolTable;
int CanInsert;
int proc_id,func_id;
SymbolTable *LocalSymbolTable;

#define   TRUELABEL      0
#define   FALSELABEL     1
#define   OUTLABEL       2
#define   STARTLABEL     3

%}

%union
{
   int intval;
   unsigned char charval;
   int opval;
// Posicion en la tabla de simbolos
   Token *tokenpos;
//               SI SE USA EN DECLS                       ARRAY DE ETIQUETAS
// typeinfo[0] = type                                     true
// typeinfo[1] = base type if array                       false
// typeinfo[2] = low array bound                          out
// typeinfo[3] = high array bound                         start
// typeinfo[4] = cuantos elementos tienen este tipo
   int typeinfo[5];
}

%token   PROG_TOK
%token   VAR_TOK
%token   INT_TOK
%token   CHAR_TOK
%token   ARR_TOK
%token   DOT_DOT
%token   OF_TOK
%token   PROC_TOK
%token   FUNC_TOK
%token   BEGIN_TOK
%token   END_TOK
%token   IF_TOK
%token   THEN_TOK
%token   ELSE_TOK
%token   WHILE_TOK
%token   DO_TOK
%left    NOT_TOK
%token   ASSIGNOP
%token   <tokenpos> ID
%token   NUM
%token   CHARCONST
%token   PROC_ID
%token   <tokenpos> FUNC_ID
%token   ARR_INT
%token   ARR_CHAR

%nonassoc RELOP
%left      '+'          '-'    OR_TOK
%left     '*' '/'       DIV_TOK       MOD_TOK   AND_TOK
%left UMINUS

%type <typeinfo> identifier_list typed_id_list arguments type parameter_list
%type <intval> expression_list
%type <tokenpos> untyped_id_list simple_expression expression term factor variable

%expect 1

%start program

%%

allow_ids    :
             {
                  CanInsert = 1;
             }
             ;

disallow_ids :
             {
                  CanInsert = 0;
             }
             ;

program       :
            PROG_TOK
            allow_ids
            ID
            '('
            untyped_id_list
            ')'
            disallow_ids
            ';'
                            declarations
                            subprogram_declarations
            {
                printf("proc main,0n");
            }
                            compound_statement
                            '.'
            {
                printf("endprocn");
            }
                     ;

untyped_id_list     :   ID
                    |   untyped_id_list ',' ID
                    ;

identifier_list         :  ID
                         typed_id_list
                         {
                            $<tokenpos>1->SetType($<typeinfo>2[0]);
                            switch ($<typeinfo>2[0])
                            {
                               case INT_TOK:
                                  printf("defint %sn",$<tokenpos>1->GetName());
                                  break;
                               case CHAR_TOK:
                                  printf("defchar %sn",$<tokenpos>1->GetName());
                                  break;
                               case ARR_INT:
                               {
                                  int size = $<typeinfo>2[3] - $<typeinfo>2[2] + 1;
                                  $<tokenpos>1->SetLowArrBound($<typeinfo>2[2]);
                                  $<tokenpos>2->SetHighArrBound($<typeinfo>2[3]);
                                  printf("defintarr %s %dn",$<tokenpos>1->GetName(),size);
                                  break;
                               }
                               case ARR_CHAR:
                               {
                                  int size = $<typeinfo>2[3] - $<typeinfo>2[2] + 1;
                                  $<tokenpos>1->SetLowArrBound($<typeinfo>2[2]);
                                  $<tokenpos>2->SetHighArrBound($<typeinfo>2[3]);
                                  printf("defchararr %s %dn",$<tokenpos>1->GetName(),size);
                                  break;
                               }
                            }
// Copia de atributo compuesto
                            $<typeinfo>$[0] = $<typeinfo>2[0];
                            $<typeinfo>$[1] = $<typeinfo>2[1];
                            $<typeinfo>$[2] = $<typeinfo>2[2];
                            $<typeinfo>$[3] = $<typeinfo>2[3];
                            $<typeinfo>$[4] = $<typeinfo>2[4];
                            // Fin de copia
                            $<typeinfo>$[4]++;
                        }
                    ;

typed_id_list       :   ','
                        ID
                        typed_id_list
                        {
                            $<tokenpos>2->SetType($<typeinfo>3[0]);
                            switch ($<typeinfo>3[0])
                            {
                               case INT_TOK:
                                  printf("defint %sn",$<tokenpos>2->GetName());
                                  break;
                               case CHAR_TOK:
                                  printf("defchar %sn",$<tokenpos>2->GetName());
                                  break;
                               case ARR_INT:
                               {
                                  int size = $<typeinfo>2[3] - $<typeinfo>2[2] + 1;
                                  $<tokenpos>1->SetLowArrBound($<typeinfo>2[2]);
                                  $<tokenpos>2->SetHighArrBound($<typeinfo>2[3]);
                                  printf("defintarr %s %dn",$<tokenpos>1->GetName(),size);
                                  break;
                               }
                               case ARR_CHAR:
                               {
                                  int size = $<typeinfo>2[3] - $<typeinfo>2[2] + 1;
                                  $<tokenpos>1->SetLowArrBound($<typeinfo>2[2]);
                                  $<tokenpos>2->SetHighArrBound($<typeinfo>2[3]);
                                  printf("defchararr %s %dn",$<tokenpos>1->GetName(),size);
                                  break;
                               }
                            }
                            // Copia de atributo compuesto
                            $<typeinfo>$[0] = $<typeinfo>3[0];
                            $<typeinfo>$[1] = $<typeinfo>3[1];
                            $<typeinfo>$[2] = $<typeinfo>3[2];
                            $<typeinfo>$[3] = $<typeinfo>3[3];
                            $<typeinfo>$[4] = $<typeinfo>3[4];
                            // Fin de copia
                            $<typeinfo>$[4]++;
                        }
                    |   ':'
                        type
                        {
                            // Copia de atributo compuesto
                            $<typeinfo>$[0] = $<typeinfo>2[0];
                            $<typeinfo>$[1] = $<typeinfo>2[1];
                            $<typeinfo>$[2] = $<typeinfo>2[2];
                            $<typeinfo>$[3] = $<typeinfo>2[3];
                            $<typeinfo>$[4] = $<typeinfo>2[4];
                            // Fin de copia
                        }
                                             ;

declarations :     declarations
                     VAR_TOK
                     allow_ids
                     identifier_list
                     ';'
                     disallow_ids
                                       |
                                       ;

type   :        standard_type
           {
$<typeinfo>$[0] = $<typeinfo>1[0];
             $<typeinfo>$[4] = $<typeinfo>1[4];
          }
      |   ARR_TOK '[' NUM DOT_DOT NUM ']' OF_TOK standard_type
          {
             if ($<typeinfo>8[0] == INT_TOK)
                $<typeinfo>$[0] = ARR_INT;
             else
                $<typeinfo>$[0] = ARR_CHAR;
             $<typeinfo>$[1] = $<typeinfo>8[0];
             $<typeinfo>$[2] = $<intval>3;
             $<typeinfo>$[3] = $<intval>5;
             $<typeinfo>$[4] = $<typeinfo>8[4];
          }
              ;

standard_type :        INT_TOK
                   {
                        $<typeinfo>$[0] = INT_TOK;
                        $<typeinfo>$[4] = 0;
                   }
                                       |    CHAR_TOK
                   {
                        $<typeinfo>$[0] = CHAR_TOK;
                        $<typeinfo>$[4] = 0;
                   }
                                       ;

subprogram_declarations        :     subprogram_declarations
                               subprogram_declaration
                               ';'
                                                         |
                                                         ;

subprogram_declaration         : allow_ids
                               subprogram_head
                               declarations
                               disallow_ids
                               compound_statement
                               {
                                  printf("endprocn");
                                  CurrentSymbolTable = GlobalSymbolTable;
                                  delete LocalSymbolTable;
                               }
                                                         ;

subprogram_head        :    PROC_TOK
                        {
                            // Comunicar al analizador lexico que el proximo
                            // ID es un identificador de procedimiento PROC_ID
                            proc_id = 1;
                        }
                        PROC_ID
                        {
                           proc_id = 0;
                           // Entrando a un nuevo scope, cambiar tabla
                           LocalSymbolTable = new SymbolTable(CurrentSymbolTable);
                           CurrentSymbolTable = LocalSymbolTable;
                           printf("startargsn");
                        }
                        arguments
                        {
                           printf("endargsn");
                           $<tokenpos>3->SetParamCount($<typeinfo>5[4]);
                        }
                        ';'
                        {
                           printf("proc _%s,%dn",$<tokenpos>3->GetName(),$<tokenpos>3->GetParamCount());
                        }
                   |    FUNC_TOK
                        {
                           // Comunicar al analizador lexico que el proximo
                           // ID es un identificador de funcion FUNC_ID
                           func_id = 1;
}
                       FUNC_ID
                       {
                          func_id = 0;
                          // Entrando a un nuevo scope, cambiar tabla
                          LocalSymbolTable = new SymbolTable(CurrentSymbolTable);
                          CurrentSymbolTable = LocalSymbolTable;
                          printf("startargsn");
                       }
                       arguments
                       {
                          printf("endargsn");
                          $<tokenpos>3->SetParamCount($<typeinfo>5[4]);
                       }
                       ':'
                       standard_type
                       {
                          $<tokenpos>3->SetFuncReturnType($<typeinfo>8[0]);
                          switch($<typeinfo>8[0])
                          {
                             case INT_TOK:
                                printf("intfunc _%s,%dn",$<tokenpos>3->GetName(),$<tokenpos>3-
>GetParamCount());
                                 break;
                              case CHAR_TOK:
                                 printf("charfunc _%s,%dn",$<tokenpos>3->GetName(),$<tokenpos>3-
>GetParamCount());
                                 break;
                              default:
                                 error(ERR_TYPEMISMATCH);
                          }
                       }
                       ';'
                                            ;

arguments    :        '('
                 parameter_list
                 ')'
                 {
                     // Copia de atributo compuesto
                     $<typeinfo>$[0] = $<typeinfo>2[0];
                     $<typeinfo>$[1] = $<typeinfo>2[1];
                     $<typeinfo>$[2] = $<typeinfo>2[2];
                     $<typeinfo>$[3] = $<typeinfo>2[3];
                     $<typeinfo>$[4] = $<typeinfo>2[4];
                     // Fin de copia
                 }
                             | { $<typeinfo>$[4] = 0; }
                             ;

parameter_list        :   identifier_list
                                    |      parameter_list
                     ';'
                     identifier_list
                     {
                         // Copia de atributo compuesto
                         $<typeinfo>$[0] = $<typeinfo>2[0];
                         $<typeinfo>$[1] = $<typeinfo>2[1];
                         $<typeinfo>$[2] = $<typeinfo>2[2];
                         $<typeinfo>$[3] = $<typeinfo>2[3];
                         $<typeinfo>$[4] = $<typeinfo>2[4];
                         // Fin de copia
                     }
                                     ;

compound_statement    :      BEGIN_TOK
                          optional_statements
                          END_TOK
                                                 ;

optional_statements :         statement_list
                                                 |
                                                 ;
statement_list           :      statement
                                       |     statement_list
                       ';'
                       statement

statement       :        variable
                    ASSIGNOP
                    expression
                    {
                       Token *tmpoffset = $1->GetOffset();
                       if (tmpoffset)
                       {
                          printf("%s[%s] = %sn",$<tokenpos>1->GetName(),
                                                 tmpoffset->GetName(),
                                                 $<tokenpos>3->GetName());
                          TmpVarGenerator.FreeTemp(tmpoffset);
                          $1->SetOffset(NULL);
                       }
                       else
                          printf("%s = %sn",$<tokenpos>1->GetName(),
                                             $<tokenpos>3->GetName());
                       TmpVarGenerator.FreeTemp($<tokenpos>3);
                       $<tokenpos>$ = $<tokenpos>1;
                    }
                                |     procedure_statement
                                |     compound_statement
            |       IF_TOK
                    expression
                    THEN_TOK
                    {
                       $<typeinfo>$[FALSELABEL] = TmpVarGenerator.NewLabel();
                       $<typeinfo>$[OUTLABEL] = TmpVarGenerator.NewLabel();
                       printf("gofalse %s,__lab%dn",$2->GetName(),$<typeinfo>$[FALSELABEL]);
                       TmpVarGenerator.FreeTemp($2);
                    }
                    statement
                    {
                       printf("goto __lab%dn",$<typeinfo>4[OUTLABEL]);
                       printf("label __lab%dn",$<typeinfo>4[FALSELABEL]);

                    }
                    else_part
                    {
                       printf("label __lab%dn",$<typeinfo>4[OUTLABEL]);
                    }
                                |     WHILE_TOK
                    {
                       $<typeinfo>$[OUTLABEL] = TmpVarGenerator.NewLabel();
                       $<typeinfo>$[STARTLABEL] = TmpVarGenerator.NewLabel();
                       printf("label __lab%dn",$<typeinfo>$[STARTLABEL]);
                    }
                    expression
                    {
                       printf("gofalse %s,__lab%dn",$3->GetName(),$<typeinfo>2[OUTLABEL]);
                    }
                    DO_TOK
                    statement
                    {
                       printf("goto __lab%dn",$<typeinfo>2[STARTLABEL]);
                       printf("label __lab%dn",$<typeinfo>2[OUTLABEL]);
                       TmpVarGenerator.FreeTemp($3);
                    }
                                ;

else_part   :       ELSE_TOK
                    statement
            |
            ;

variable        :        ID
            {
                    $$ = $1;
                    TmpVarGenerator.FreeTemp($<tokenpos>1);
            }
|   ID '[' expression ']'
             {
                $1->SetOffset($3);
                $$ = $1;
             }
         |   FUNC_ID
                     ;

procedure_statement :            PROC_ID
                             {
                                 if ($<tokenpos>1->GetParamCount() != 0)
                                    error(ERR_PARAMCOUNT);
                                 else
                                    printf("call %sn",$<tokenpos>1->GetName());
                             }
                                                     |     PROC_ID
                             '('
                             expression_list
                             ')'
                             {
                                 if ($<tokenpos>1->GetParamCount() != $<intval>3)
                                    error(ERR_PARAMCOUNT);

                                 else
                                    printf("call %sn",$<tokenpos>1->GetName());
                             }
                                                     ;

expression_list         :        expression
                         {
                             printf("param %sn",$<tokenpos>1->GetName());
                             TmpVarGenerator.FreeTemp($<tokenpos>1);
                             $<intval>$ = 1;
                         }
                                            |      expression_list
                         ','
                         expression
                         {
                            printf("param %sn",$<tokenpos>3->GetName());
                            TmpVarGenerator.FreeTemp($<tokenpos>3);
                            $<intval>$ = $<intval>1 + 1;
                         }
                                            ;

expression    :         simple_expression
                  {
                      $<tokenpos>$ = $<tokenpos>1;
                  }
                              |     simple_expression
                  RELOP
                  simple_expression
                  {
                     static const char* RelOps[] = { "==","!=","<","<=",">=",">" };

                      Token *tmp = TmpVarGenerator.NewTemp();
                      printf("%s = %s %s %sn",tmp->GetName(),
                                               $<tokenpos>1->GetName(),
                                               RelOps[$<opval>2],
                                               $<tokenpos>3->GetName());
                      TmpVarGenerator.FreeTemp($<tokenpos>1);
                      TmpVarGenerator.FreeTemp($<tokenpos>3);
                      $<tokenpos>$ = tmp;
                  }
                                 ;

simple_expression       :        term
                         {
                             $<tokenpos>$ = $<tokenpos>1;
                         }
                                            |      simple_expression
                         '+'
                         term
                         {
                            if (($<tokenpos>1->GetType() != INT_TOK) ||
($<tokenpos>3->GetType() != INT_TOK))
                                  error(ERR_TYPEMISMATCH);
                           Token *tmp = TmpVarGenerator.NewTemp();
                           printf("%s = %s + %sn",tmp->GetName(),
                                                   $<tokenpos>1->GetName(),
                                                   $<tokenpos>3->GetName());
                           TmpVarGenerator.FreeTemp($<tokenpos>1);
                           TmpVarGenerator.FreeTemp($<tokenpos>3);
                           $<tokenpos>$ = tmp;
                         }
                    |    simple_expression
                         '-'
                         term
                         {
                            if (($<tokenpos>1->GetType() != INT_TOK) ||
                                ($<tokenpos>3->GetType() != INT_TOK) ||
                                ($<tokenpos>1->GetType() != $<tokenpos>3->GetType()))
                                   error(ERR_TYPEMISMATCH);
                            Token *tmp = TmpVarGenerator.NewTemp();
                            printf("%s = %s - %sn",tmp->GetName(),
                                                    $<tokenpos>1->GetName(),
                                                    $<tokenpos>3->GetName());
                            TmpVarGenerator.FreeTemp($<tokenpos>1);
                            TmpVarGenerator.FreeTemp($<tokenpos>3);
                            $<tokenpos>$ = tmp;
                         }
                    |    simple_expression
                         OR_TOK
                         term
                         {
                            if (($<tokenpos>1->GetType() != INT_TOK) ||
                                ($<tokenpos>3->GetType() != INT_TOK) ||
                                ($<tokenpos>1->GetType() != $<tokenpos>3->GetType()))
                                   error(ERR_TYPEMISMATCH);
                            Token *tmp = TmpVarGenerator.NewTemp();
                            printf("%s = %s | %sn",tmp->GetName(),
                                                    $<tokenpos>1->GetName(),
                                                    $<tokenpos>3->GetName());
                            TmpVarGenerator.FreeTemp($<tokenpos>1);
                            TmpVarGenerator.FreeTemp($<tokenpos>3);
                            $<tokenpos>$ = tmp;
                         }
                                            ;

term   :        factor
           {
               $<tokenpos>$ = $<tokenpos>1;
           }
       |        term
           '*'
           factor
           {
              if (($<tokenpos>1->GetType() != INT_TOK) ||
                   ($<tokenpos>3->GetType() != INT_TOK) ||
                   ($<tokenpos>1->GetType() != $<tokenpos>3->GetType()))
                      error(ERR_TYPEMISMATCH);
              Token *tmp = TmpVarGenerator.NewTemp();
              printf("%s = %s * %sn",tmp->GetName(),
                                       $<tokenpos>1->GetName(),
                                       $<tokenpos>3->GetName());
              TmpVarGenerator.FreeTemp($<tokenpos>1);
              TmpVarGenerator.FreeTemp($<tokenpos>3);
              $<tokenpos>$ = tmp;
           }
       |   term
           '/'
           factor
           {
              if (($<tokenpos>1->GetType() != INT_TOK) ||
                   ($<tokenpos>3->GetType() != INT_TOK) ||
                   ($<tokenpos>1->GetType() != $<tokenpos>3->GetType()))
                      error(ERR_TYPEMISMATCH);
              Token *tmp = TmpVarGenerator.NewTemp();
              printf("%s = %s / %sn",tmp->GetName(),
$<tokenpos>1->GetName(),
                                       $<tokenpos>3->GetName());
               TmpVarGenerator.FreeTemp($<tokenpos>1);
               TmpVarGenerator.FreeTemp($<tokenpos>3);
               $<tokenpos>$ = tmp;
           }
      |    term
           AND_TOK
           factor
           {
              if (($<tokenpos>1->GetType() != INT_TOK) ||
                  ($<tokenpos>3->GetType() != INT_TOK) ||
                  ($<tokenpos>1->GetType() != $<tokenpos>3->GetType()))
                     error(ERR_TYPEMISMATCH);
              Token *tmp = TmpVarGenerator.NewTemp();
              printf("%s = %s & %sn",tmp->GetName(),
                                      $<tokenpos>1->GetName(),
                                      $<tokenpos>3->GetName());
              TmpVarGenerator.FreeTemp($<tokenpos>1);
              TmpVarGenerator.FreeTemp($<tokenpos>3);
              $<tokenpos>$ = tmp;
           }
      |    term
           DIV_TOK
           factor
           {
              if (($<tokenpos>1->GetType() != INT_TOK) ||
                  ($<tokenpos>3->GetType() != INT_TOK) ||
                  ($<tokenpos>1->GetType() != $<tokenpos>3->GetType()))
                     error(ERR_TYPEMISMATCH);
              Token *tmp = TmpVarGenerator.NewTemp();
              printf("%s = %s / %sn",tmp->GetName(),
                                      $<tokenpos>1->GetName(),
                                      $<tokenpos>3->GetName());
              TmpVarGenerator.FreeTemp($<tokenpos>1);
              TmpVarGenerator.FreeTemp($<tokenpos>3);
              $<tokenpos>$ = tmp;
           }
      |    term
           MOD_TOK
           factor
           {
              if (($<tokenpos>1->GetType() != INT_TOK) ||
                  ($<tokenpos>3->GetType() != INT_TOK) ||
                  ($<tokenpos>1->GetType() != $<tokenpos>3->GetType()))
                     error(ERR_TYPEMISMATCH);
              Token *tmp = TmpVarGenerator.NewTemp();
              printf("%s = %s %% %sn",tmp->GetName(),
                                      $<tokenpos>1->GetName(),
                                      $<tokenpos>3->GetName());
              TmpVarGenerator.FreeTemp($<tokenpos>1);
              TmpVarGenerator.FreeTemp($<tokenpos>3);
              $<tokenpos>$ = tmp;
           }
                ;

factor :           ID
               {
                  $$ = $1;
               }
           |   ID
               '['
               expression
               ']'
               {
                  Token *tmp = TmpVarGenerator.NewTemp();
                  printf("%s = %s[%s]n",tmp->GetName(),$<tokenpos>1->GetName(),
                                         $<tokenpos>3->GetName());
                  TmpVarGenerator.FreeTemp($<tokenpos>3);
                  $$ = tmp;
               }
           |   FUNC_ID
               {
                  if ($1->GetParamCount() != 0)
error(ERR_PARAMCOUNT);
               else
                  {
                     printf("callfunc %sn",$<tokenpos>1->GetName());
                     $$ = $1;
                  }
             }
         |   FUNC_ID
             '('
             expression_list
             ')'
             {
                if ($<tokenpos>1->GetParamCount() != $<intval>3)
                   error(ERR_PARAMCOUNT);
                else
                {
                   printf("callfunc %sn",$<tokenpos>1->GetName());
                   $$ = $1;
                }
             }
                     |      NUM
             {
                Token *tmp = TmpVarGenerator.NewTemp();
                printf("%s = %dn",tmp->GetName(),$<intval>1);
                $$ = tmp;
             }
                     |      CHARCONST
             {
                Token *tmp = TmpVarGenerator.NewTemp(CHAR_TOK);
                printf("%s = '%c'n",tmp->GetName(),$<charval>1);
                $$ = tmp;
             }
                     |      '('
             expression
             ')'
             {
                $$ = $2;
             }
                     |      NOT_TOK
             factor
             {
                Token *tmp = TmpVarGenerator.NewTemp();
                printf("%s = ~%sn",tmp->GetName(),
                                    $<tokenpos>2->GetName());
                TmpVarGenerator.FreeTemp($<tokenpos>2);
                $$ = tmp;
             }
         |   '-'
             factor %prec UMINUS
             {
                Token *tmp = TmpVarGenerator.NewTemp();
                printf("%s = -%sn",tmp->GetName(),
                                    $<tokenpos>2->GetName());
                TmpVarGenerator.FreeTemp($<tokenpos>2);
                $$ = tmp;
             }
                     ;

%%

#include <process.h>

extern int line,column;

void cdecl yyerror(char *s)
{
       fprintf(stderr,"Error: %s in line %d, column %dn",s,line,column);
       exit(1);
} /* yyerror() */

Más contenido relacionado

La actualidad más candente

Php codigos interfaces fredy guzman cusihunca
Php codigos interfaces   fredy guzman cusihuncaPhp codigos interfaces   fredy guzman cusihunca
Php codigos interfaces fredy guzman cusihuncaTigger_Fred
 
Юнит тестирование в Zend Framework 2.0
Юнит тестирование в Zend Framework 2.0Юнит тестирование в Zend Framework 2.0
Юнит тестирование в Zend Framework 2.0zfconfua
 
Sw325 lab das_15
Sw325 lab das_15Sw325 lab das_15
Sw325 lab das_15D. Saraa
 
Dennis zapana perez
Dennis zapana perezDennis zapana perez
Dennis zapana perezdennis_elvis
 
Php & mysql
Php & mysqlPhp & mysql
Php & mysqlola98z
 
Javascript and jQuery for Mobile
Javascript and jQuery for MobileJavascript and jQuery for Mobile
Javascript and jQuery for MobileIvano Malavolta
 
Un juego creado en php
Un juego creado en phpUn juego creado en php
Un juego creado en phpErwin Lobo
 
Feeds. использование и создание плагинов. Feeds API
Feeds. использование и создание плагинов. Feeds APIFeeds. использование и создание плагинов. Feeds API
Feeds. использование и создание плагинов. Feeds APIAlex S
 
Working With Ajax Frameworks
Working With Ajax FrameworksWorking With Ajax Frameworks
Working With Ajax FrameworksJonathan Snook
 
Introduction to Service Worker
Introduction to Service WorkerIntroduction to Service Worker
Introduction to Service WorkerShogo Sensui
 
Drupal Cms Prezentace
Drupal Cms PrezentaceDrupal Cms Prezentace
Drupal Cms PrezentaceTomáš Kafka
 
Practical JavaScript Programming - Session 2/8
Practical JavaScript Programming - Session 2/8Practical JavaScript Programming - Session 2/8
Practical JavaScript Programming - Session 2/8Wilson Su
 
Palestra sobre MongoDB com PHP no PHP'n'Rio
Palestra sobre MongoDB com PHP no PHP'n'Rio Palestra sobre MongoDB com PHP no PHP'n'Rio
Palestra sobre MongoDB com PHP no PHP'n'Rio Suissa
 
การบันทึกและออกจากโปรแกรมMspowerpoint
การบันทึกและออกจากโปรแกรมMspowerpointการบันทึกและออกจากโปรแกรมMspowerpoint
การบันทึกและออกจากโปรแกรมMspowerpointเทวัญ ภูพานทอง
 
KvZ Web Tasarım Hizmetleri
KvZ Web Tasarım HizmetleriKvZ Web Tasarım Hizmetleri
KvZ Web Tasarım HizmetleriAhmet Öztaş
 

La actualidad más candente (20)

Wek14 mysql 2
Wek14 mysql 2Wek14 mysql 2
Wek14 mysql 2
 
Php codigos interfaces fredy guzman cusihunca
Php codigos interfaces   fredy guzman cusihuncaPhp codigos interfaces   fredy guzman cusihunca
Php codigos interfaces fredy guzman cusihunca
 
Юнит тестирование в Zend Framework 2.0
Юнит тестирование в Zend Framework 2.0Юнит тестирование в Zend Framework 2.0
Юнит тестирование в Zend Framework 2.0
 
Sw325 lab das_15
Sw325 lab das_15Sw325 lab das_15
Sw325 lab das_15
 
Dennis zapana perez
Dennis zapana perezDennis zapana perez
Dennis zapana perez
 
Php & mysql
Php & mysqlPhp & mysql
Php & mysql
 
4 1 derivadas-parciales_vv
4 1 derivadas-parciales_vv4 1 derivadas-parciales_vv
4 1 derivadas-parciales_vv
 
Javascript and jQuery for Mobile
Javascript and jQuery for MobileJavascript and jQuery for Mobile
Javascript and jQuery for Mobile
 
Un juego creado en php
Un juego creado en phpUn juego creado en php
Un juego creado en php
 
Feeds. использование и создание плагинов. Feeds API
Feeds. использование и создание плагинов. Feeds APIFeeds. использование и создание плагинов. Feeds API
Feeds. использование и создание плагинов. Feeds API
 
Working With Ajax Frameworks
Working With Ajax FrameworksWorking With Ajax Frameworks
Working With Ajax Frameworks
 
Introduction to Service Worker
Introduction to Service WorkerIntroduction to Service Worker
Introduction to Service Worker
 
includ
includinclud
includ
 
Drupal Cms Prezentace
Drupal Cms PrezentaceDrupal Cms Prezentace
Drupal Cms Prezentace
 
Practical JavaScript Programming - Session 2/8
Practical JavaScript Programming - Session 2/8Practical JavaScript Programming - Session 2/8
Practical JavaScript Programming - Session 2/8
 
Templating WordPress
Templating WordPressTemplating WordPress
Templating WordPress
 
Palestra sobre MongoDB com PHP no PHP'n'Rio
Palestra sobre MongoDB com PHP no PHP'n'Rio Palestra sobre MongoDB com PHP no PHP'n'Rio
Palestra sobre MongoDB com PHP no PHP'n'Rio
 
Jquery2
Jquery2Jquery2
Jquery2
 
การบันทึกและออกจากโปรแกรมMspowerpoint
การบันทึกและออกจากโปรแกรมMspowerpointการบันทึกและออกจากโปรแกรมMspowerpoint
การบันทึกและออกจากโปรแกรมMspowerpoint
 
KvZ Web Tasarım Hizmetleri
KvZ Web Tasarım HizmetleriKvZ Web Tasarım Hizmetleri
KvZ Web Tasarım Hizmetleri
 

Destacado

Private Work: How to Secure a Fair Contract + Get Paid
Private Work: How to Secure a Fair Contract + Get PaidPrivate Work: How to Secure a Fair Contract + Get Paid
Private Work: How to Secure a Fair Contract + Get PaidKegler Brown Hill + Ritter
 
Growing Through China: A Comprehensive Look at Market Opportunities
Growing Through China: A Comprehensive Look at Market Opportunities Growing Through China: A Comprehensive Look at Market Opportunities
Growing Through China: A Comprehensive Look at Market Opportunities Kegler Brown Hill + Ritter
 
Healthcare Costs And Performance in the OECD
Healthcare Costs And Performance in the OECDHealthcare Costs And Performance in the OECD
Healthcare Costs And Performance in the OECDAlex Rascanu
 
Contiguity Principle
Contiguity PrincipleContiguity Principle
Contiguity Principlejnpletcher
 
La comunicazione-del-vino-ai-tempi-di-facebook
La comunicazione-del-vino-ai-tempi-di-facebookLa comunicazione-del-vino-ai-tempi-di-facebook
La comunicazione-del-vino-ai-tempi-di-facebookSlawka G. Scarso
 
Whitepaper De Menskant Van Sourcing
Whitepaper De Menskant Van SourcingWhitepaper De Menskant Van Sourcing
Whitepaper De Menskant Van SourcingElitas Groep BV
 
Business in Brazil: An Insider's View, Regulatory and Legal Considerations
Business in Brazil: An Insider's View, Regulatory and Legal ConsiderationsBusiness in Brazil: An Insider's View, Regulatory and Legal Considerations
Business in Brazil: An Insider's View, Regulatory and Legal ConsiderationsKegler Brown Hill + Ritter
 
Introducing BlackBerry 10 [Indonesian Version]
Introducing BlackBerry 10 [Indonesian Version]Introducing BlackBerry 10 [Indonesian Version]
Introducing BlackBerry 10 [Indonesian Version]Khomeini Mujahid
 
Trabajos Verano 2º Eso 2009
Trabajos Verano 2º Eso 2009Trabajos Verano 2º Eso 2009
Trabajos Verano 2º Eso 2009guest5bbe75
 
Cloudxp keynote 19 sept pvu
Cloudxp keynote 19 sept pvuCloudxp keynote 19 sept pvu
Cloudxp keynote 19 sept pvuPiet van Vugt
 
The tsunami that washed time away
The tsunami that washed time awayThe tsunami that washed time away
The tsunami that washed time awayTakahe One
 
ROI, magic bullets and social business
ROI, magic bullets and social businessROI, magic bullets and social business
ROI, magic bullets and social businessNiall O'Malley
 
2012 hpcuserforum talk
2012 hpcuserforum talk2012 hpcuserforum talk
2012 hpcuserforum talkc.titus.brown
 
Kegler Brown's 2015 Managing Labor + Employee Relations Seminar
Kegler Brown's 2015 Managing Labor + Employee Relations SeminarKegler Brown's 2015 Managing Labor + Employee Relations Seminar
Kegler Brown's 2015 Managing Labor + Employee Relations SeminarKegler Brown Hill + Ritter
 
MoMoTLV Israel March 2010 - Trixcell - Off-deck
MoMoTLV Israel March 2010 - Trixcell - Off-deckMoMoTLV Israel March 2010 - Trixcell - Off-deck
MoMoTLV Israel March 2010 - Trixcell - Off-deckMobileMonday Tel-Aviv
 
Long term evaluation of IL programme slides
Long term evaluation of IL programme slidesLong term evaluation of IL programme slides
Long term evaluation of IL programme slidesTina Hohmann
 

Destacado (20)

Private Work: How to Secure a Fair Contract + Get Paid
Private Work: How to Secure a Fair Contract + Get PaidPrivate Work: How to Secure a Fair Contract + Get Paid
Private Work: How to Secure a Fair Contract + Get Paid
 
Growing Through China: A Comprehensive Look at Market Opportunities
Growing Through China: A Comprehensive Look at Market Opportunities Growing Through China: A Comprehensive Look at Market Opportunities
Growing Through China: A Comprehensive Look at Market Opportunities
 
CG borodino
CG borodinoCG borodino
CG borodino
 
Healthcare Costs And Performance in the OECD
Healthcare Costs And Performance in the OECDHealthcare Costs And Performance in the OECD
Healthcare Costs And Performance in the OECD
 
RealTimeSchool
RealTimeSchoolRealTimeSchool
RealTimeSchool
 
Contiguity Principle
Contiguity PrincipleContiguity Principle
Contiguity Principle
 
La comunicazione-del-vino-ai-tempi-di-facebook
La comunicazione-del-vino-ai-tempi-di-facebookLa comunicazione-del-vino-ai-tempi-di-facebook
La comunicazione-del-vino-ai-tempi-di-facebook
 
Whitepaper De Menskant Van Sourcing
Whitepaper De Menskant Van SourcingWhitepaper De Menskant Van Sourcing
Whitepaper De Menskant Van Sourcing
 
Business in Brazil: An Insider's View, Regulatory and Legal Considerations
Business in Brazil: An Insider's View, Regulatory and Legal ConsiderationsBusiness in Brazil: An Insider's View, Regulatory and Legal Considerations
Business in Brazil: An Insider's View, Regulatory and Legal Considerations
 
Introducing BlackBerry 10 [Indonesian Version]
Introducing BlackBerry 10 [Indonesian Version]Introducing BlackBerry 10 [Indonesian Version]
Introducing BlackBerry 10 [Indonesian Version]
 
Trabajos Verano 2º Eso 2009
Trabajos Verano 2º Eso 2009Trabajos Verano 2º Eso 2009
Trabajos Verano 2º Eso 2009
 
Cloudxp keynote 19 sept pvu
Cloudxp keynote 19 sept pvuCloudxp keynote 19 sept pvu
Cloudxp keynote 19 sept pvu
 
The tsunami that washed time away
The tsunami that washed time awayThe tsunami that washed time away
The tsunami that washed time away
 
ROI, magic bullets and social business
ROI, magic bullets and social businessROI, magic bullets and social business
ROI, magic bullets and social business
 
2012 hpcuserforum talk
2012 hpcuserforum talk2012 hpcuserforum talk
2012 hpcuserforum talk
 
2012 oslo-talk
2012 oslo-talk2012 oslo-talk
2012 oslo-talk
 
Kegler Brown's 2015 Managing Labor + Employee Relations Seminar
Kegler Brown's 2015 Managing Labor + Employee Relations SeminarKegler Brown's 2015 Managing Labor + Employee Relations Seminar
Kegler Brown's 2015 Managing Labor + Employee Relations Seminar
 
2014 mmg-talk
2014 mmg-talk2014 mmg-talk
2014 mmg-talk
 
MoMoTLV Israel March 2010 - Trixcell - Off-deck
MoMoTLV Israel March 2010 - Trixcell - Off-deckMoMoTLV Israel March 2010 - Trixcell - Off-deck
MoMoTLV Israel March 2010 - Trixcell - Off-deck
 
Long term evaluation of IL programme slides
Long term evaluation of IL programme slidesLong term evaluation of IL programme slides
Long term evaluation of IL programme slides
 

Más de Egdares Futch H.

FIT 2018 - Malware Avanzado y Respuesta a Incidentes
FIT 2018 - Malware Avanzado y Respuesta a IncidentesFIT 2018 - Malware Avanzado y Respuesta a Incidentes
FIT 2018 - Malware Avanzado y Respuesta a IncidentesEgdares Futch H.
 
FIT 2020 - Artificial Life
FIT 2020 - Artificial LifeFIT 2020 - Artificial Life
FIT 2020 - Artificial LifeEgdares Futch H.
 
Blockchain - Una mirada técnica y aplicaciones
Blockchain - Una mirada técnica y aplicacionesBlockchain - Una mirada técnica y aplicaciones
Blockchain - Una mirada técnica y aplicacionesEgdares Futch H.
 
Digital forensics SIFT como herramienta
Digital forensics  SIFT como herramientaDigital forensics  SIFT como herramienta
Digital forensics SIFT como herramientaEgdares Futch H.
 
Machine Learning: ¿Caminos? A donde vamos, no necesitamos caminos
Machine Learning: ¿Caminos? A donde vamos, no necesitamos caminosMachine Learning: ¿Caminos? A donde vamos, no necesitamos caminos
Machine Learning: ¿Caminos? A donde vamos, no necesitamos caminosEgdares Futch H.
 
Herramientas de Pen Testing de redes y aplicaciones web
Herramientas de Pen Testing de redes y aplicaciones webHerramientas de Pen Testing de redes y aplicaciones web
Herramientas de Pen Testing de redes y aplicaciones webEgdares Futch H.
 
El "Internet de Todo" (IoT)
El "Internet de Todo" (IoT)El "Internet de Todo" (IoT)
El "Internet de Todo" (IoT)Egdares Futch H.
 
El “Internet de Todo” (IoT) y lo que lo hace posible
El “Internet de Todo” (IoT) y lo que lo hace posible El “Internet de Todo” (IoT) y lo que lo hace posible
El “Internet de Todo” (IoT) y lo que lo hace posible Egdares Futch H.
 
MGTI: Tendencias de Tecnología 2015 - Campus Tegucigalpa
MGTI: Tendencias de Tecnología 2015 - Campus TegucigalpaMGTI: Tendencias de Tecnología 2015 - Campus Tegucigalpa
MGTI: Tendencias de Tecnología 2015 - Campus TegucigalpaEgdares Futch H.
 
MGTI: Tendencias de Tecnología 2015 y su aplicación en el país Campus La Ceiba
MGTI: Tendencias de Tecnología 2015 y su aplicación en el país Campus La CeibaMGTI: Tendencias de Tecnología 2015 y su aplicación en el país Campus La Ceiba
MGTI: Tendencias de Tecnología 2015 y su aplicación en el país Campus La CeibaEgdares Futch H.
 
Introducción a la Teoría de Juegos con aplicación a las Ciencias de la Comput...
Introducción a la Teoría de Juegos con aplicación a las Ciencias de la Comput...Introducción a la Teoría de Juegos con aplicación a las Ciencias de la Comput...
Introducción a la Teoría de Juegos con aplicación a las Ciencias de la Comput...Egdares Futch H.
 
The Hour of Code - Presentación Diciembre 2014
The Hour of Code - Presentación Diciembre 2014The Hour of Code - Presentación Diciembre 2014
The Hour of Code - Presentación Diciembre 2014Egdares Futch H.
 
Criptografía para las masas
Criptografía para las masasCriptografía para las masas
Criptografía para las masasEgdares Futch H.
 
Más sobre el Algoritmo de Peterson
Más sobre el Algoritmo de PetersonMás sobre el Algoritmo de Peterson
Más sobre el Algoritmo de PetersonEgdares Futch H.
 
Análisis de ataques a un sistema de correo electrónico por medio de mensajes ...
Análisis de ataques a un sistema de correo electrónico por medio de mensajes ...Análisis de ataques a un sistema de correo electrónico por medio de mensajes ...
Análisis de ataques a un sistema de correo electrónico por medio de mensajes ...Egdares Futch H.
 
Apuntes de clase Sistemas Operativos: Administración de Memoria
Apuntes de clase Sistemas Operativos: Administración de MemoriaApuntes de clase Sistemas Operativos: Administración de Memoria
Apuntes de clase Sistemas Operativos: Administración de MemoriaEgdares Futch H.
 

Más de Egdares Futch H. (20)

FIT 2018 - Malware Avanzado y Respuesta a Incidentes
FIT 2018 - Malware Avanzado y Respuesta a IncidentesFIT 2018 - Malware Avanzado y Respuesta a Incidentes
FIT 2018 - Malware Avanzado y Respuesta a Incidentes
 
FIT 2020 - Artificial Life
FIT 2020 - Artificial LifeFIT 2020 - Artificial Life
FIT 2020 - Artificial Life
 
Blockchain - Una mirada técnica y aplicaciones
Blockchain - Una mirada técnica y aplicacionesBlockchain - Una mirada técnica y aplicaciones
Blockchain - Una mirada técnica y aplicaciones
 
Digital forensics SIFT como herramienta
Digital forensics  SIFT como herramientaDigital forensics  SIFT como herramienta
Digital forensics SIFT como herramienta
 
Machine Learning: ¿Caminos? A donde vamos, no necesitamos caminos
Machine Learning: ¿Caminos? A donde vamos, no necesitamos caminosMachine Learning: ¿Caminos? A donde vamos, no necesitamos caminos
Machine Learning: ¿Caminos? A donde vamos, no necesitamos caminos
 
Herramientas de Pen Testing de redes y aplicaciones web
Herramientas de Pen Testing de redes y aplicaciones webHerramientas de Pen Testing de redes y aplicaciones web
Herramientas de Pen Testing de redes y aplicaciones web
 
El "Internet de Todo" (IoT)
El "Internet de Todo" (IoT)El "Internet de Todo" (IoT)
El "Internet de Todo" (IoT)
 
BPMS vs. workflow
BPMS vs. workflowBPMS vs. workflow
BPMS vs. workflow
 
El “Internet de Todo” (IoT) y lo que lo hace posible
El “Internet de Todo” (IoT) y lo que lo hace posible El “Internet de Todo” (IoT) y lo que lo hace posible
El “Internet de Todo” (IoT) y lo que lo hace posible
 
MGTI: Tendencias de Tecnología 2015 - Campus Tegucigalpa
MGTI: Tendencias de Tecnología 2015 - Campus TegucigalpaMGTI: Tendencias de Tecnología 2015 - Campus Tegucigalpa
MGTI: Tendencias de Tecnología 2015 - Campus Tegucigalpa
 
MGTI: Tendencias de Tecnología 2015 y su aplicación en el país Campus La Ceiba
MGTI: Tendencias de Tecnología 2015 y su aplicación en el país Campus La CeibaMGTI: Tendencias de Tecnología 2015 y su aplicación en el país Campus La Ceiba
MGTI: Tendencias de Tecnología 2015 y su aplicación en el país Campus La Ceiba
 
Introducción a la Teoría de Juegos con aplicación a las Ciencias de la Comput...
Introducción a la Teoría de Juegos con aplicación a las Ciencias de la Comput...Introducción a la Teoría de Juegos con aplicación a las Ciencias de la Comput...
Introducción a la Teoría de Juegos con aplicación a las Ciencias de la Comput...
 
The Hour of Code - Presentación Diciembre 2014
The Hour of Code - Presentación Diciembre 2014The Hour of Code - Presentación Diciembre 2014
The Hour of Code - Presentación Diciembre 2014
 
Unitec virtualización
Unitec   virtualizaciónUnitec   virtualización
Unitec virtualización
 
Criptografía para las masas
Criptografía para las masasCriptografía para las masas
Criptografía para las masas
 
Más sobre el Algoritmo de Peterson
Más sobre el Algoritmo de PetersonMás sobre el Algoritmo de Peterson
Más sobre el Algoritmo de Peterson
 
Análisis de ataques a un sistema de correo electrónico por medio de mensajes ...
Análisis de ataques a un sistema de correo electrónico por medio de mensajes ...Análisis de ataques a un sistema de correo electrónico por medio de mensajes ...
Análisis de ataques a un sistema de correo electrónico por medio de mensajes ...
 
Apuntes de clase Sistemas Operativos: Administración de Memoria
Apuntes de clase Sistemas Operativos: Administración de MemoriaApuntes de clase Sistemas Operativos: Administración de Memoria
Apuntes de clase Sistemas Operativos: Administración de Memoria
 
Memoria virtual
Memoria virtualMemoria virtual
Memoria virtual
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
 

Último

مختصر علم احكام القرآن فقه القرآن وفق منهج العرض
مختصر علم احكام القرآن فقه القرآن وفق منهج العرضمختصر علم احكام القرآن فقه القرآن وفق منهج العرض
مختصر علم احكام القرآن فقه القرآن وفق منهج العرضأنور غني الموسوي
 
Bahare Shariat Jild 4 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 4 By SadurshSharia Mufti Amjad Ali AzmiBahare Shariat Jild 4 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 4 By SadurshSharia Mufti Amjad Ali Azmibookbahareshariat
 
TUYỂN TẬP 25 ĐỀ THI HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2023 CÓ ĐÁP ÁN (SƯU...
TUYỂN TẬP 25 ĐỀ THI HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2023 CÓ ĐÁP ÁN (SƯU...TUYỂN TẬP 25 ĐỀ THI HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2023 CÓ ĐÁP ÁN (SƯU...
TUYỂN TẬP 25 ĐỀ THI HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2023 CÓ ĐÁP ÁN (SƯU...Nguyen Thanh Tu Collection
 
TUYỂN TẬP 20 ĐỀ THI KHẢO SÁT HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2020 (CÓ Đ...
TUYỂN TẬP 20 ĐỀ THI KHẢO SÁT HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2020 (CÓ Đ...TUYỂN TẬP 20 ĐỀ THI KHẢO SÁT HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2020 (CÓ Đ...
TUYỂN TẬP 20 ĐỀ THI KHẢO SÁT HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2020 (CÓ Đ...Nguyen Thanh Tu Collection
 
Bahare Shariat Jild 2 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 2 By SadurshSharia Mufti Amjad Ali AzmiBahare Shariat Jild 2 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 2 By SadurshSharia Mufti Amjad Ali Azmibookbahareshariat
 
Bahare Shariat Jild 5 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 5 By SadurshSharia Mufti Amjad Ali AzmiBahare Shariat Jild 5 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 5 By SadurshSharia Mufti Amjad Ali Azmibookbahareshariat
 
Bahare Shariat Jild 1 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 1 By SadurshSharia Mufti Amjad Ali AzmiBahare Shariat Jild 1 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 1 By SadurshSharia Mufti Amjad Ali Azmibookbahareshariat
 
FAIL REKOD PENGAJARAN.pptx fail rekod pengajaran
FAIL REKOD PENGAJARAN.pptx fail rekod pengajaranFAIL REKOD PENGAJARAN.pptx fail rekod pengajaran
FAIL REKOD PENGAJARAN.pptx fail rekod pengajaransekolah233
 
Bahare Shariat Jild 3 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 3 By SadurshSharia Mufti Amjad Ali AzmiBahare Shariat Jild 3 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 3 By SadurshSharia Mufti Amjad Ali Azmibookbahareshariat
 

Último (11)

مختصر علم احكام القرآن فقه القرآن وفق منهج العرض
مختصر علم احكام القرآن فقه القرآن وفق منهج العرضمختصر علم احكام القرآن فقه القرآن وفق منهج العرض
مختصر علم احكام القرآن فقه القرآن وفق منهج العرض
 
Bahare Shariat Jild 4 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 4 By SadurshSharia Mufti Amjad Ali AzmiBahare Shariat Jild 4 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 4 By SadurshSharia Mufti Amjad Ali Azmi
 
Energy drink .
Energy drink                           .Energy drink                           .
Energy drink .
 
TUYỂN TẬP 25 ĐỀ THI HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2023 CÓ ĐÁP ÁN (SƯU...
TUYỂN TẬP 25 ĐỀ THI HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2023 CÓ ĐÁP ÁN (SƯU...TUYỂN TẬP 25 ĐỀ THI HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2023 CÓ ĐÁP ÁN (SƯU...
TUYỂN TẬP 25 ĐỀ THI HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2023 CÓ ĐÁP ÁN (SƯU...
 
TUYỂN TẬP 20 ĐỀ THI KHẢO SÁT HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2020 (CÓ Đ...
TUYỂN TẬP 20 ĐỀ THI KHẢO SÁT HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2020 (CÓ Đ...TUYỂN TẬP 20 ĐỀ THI KHẢO SÁT HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2020 (CÓ Đ...
TUYỂN TẬP 20 ĐỀ THI KHẢO SÁT HỌC SINH GIỎI MÔN TIẾNG ANH LỚP 6 NĂM 2020 (CÓ Đ...
 
Bahare Shariat Jild 2 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 2 By SadurshSharia Mufti Amjad Ali AzmiBahare Shariat Jild 2 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 2 By SadurshSharia Mufti Amjad Ali Azmi
 
LAR MARIA MÃE DE ÁFRICA .
LAR MARIA MÃE DE ÁFRICA                 .LAR MARIA MÃE DE ÁFRICA                 .
LAR MARIA MÃE DE ÁFRICA .
 
Bahare Shariat Jild 5 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 5 By SadurshSharia Mufti Amjad Ali AzmiBahare Shariat Jild 5 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 5 By SadurshSharia Mufti Amjad Ali Azmi
 
Bahare Shariat Jild 1 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 1 By SadurshSharia Mufti Amjad Ali AzmiBahare Shariat Jild 1 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 1 By SadurshSharia Mufti Amjad Ali Azmi
 
FAIL REKOD PENGAJARAN.pptx fail rekod pengajaran
FAIL REKOD PENGAJARAN.pptx fail rekod pengajaranFAIL REKOD PENGAJARAN.pptx fail rekod pengajaran
FAIL REKOD PENGAJARAN.pptx fail rekod pengajaran
 
Bahare Shariat Jild 3 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 3 By SadurshSharia Mufti Amjad Ali AzmiBahare Shariat Jild 3 By SadurshSharia Mufti Amjad Ali Azmi
Bahare Shariat Jild 3 By SadurshSharia Mufti Amjad Ali Azmi
 

Analizador sintáctico de Pascal escrito en Bison

  • 1. /* pascal.y – Un parser escrito en Bison para lenguaje Pascal. Genera AST linealizado */ /* Escrito por Egdares Futch H. – UNITEC Honduras */ %{ #include <stdio.h> #include <ctype.h> #include "protos.h" #include "token.h" #include "tmpvar.h" #include "error.h" #include "table.h" extern TmpVars TmpVarGenerator; extern SymbolTable *GlobalSymbolTable,*CurrentSymbolTable; int CanInsert; int proc_id,func_id; SymbolTable *LocalSymbolTable; #define TRUELABEL 0 #define FALSELABEL 1 #define OUTLABEL 2 #define STARTLABEL 3 %} %union { int intval; unsigned char charval; int opval; // Posicion en la tabla de simbolos Token *tokenpos; // SI SE USA EN DECLS ARRAY DE ETIQUETAS // typeinfo[0] = type true // typeinfo[1] = base type if array false // typeinfo[2] = low array bound out // typeinfo[3] = high array bound start // typeinfo[4] = cuantos elementos tienen este tipo int typeinfo[5]; } %token PROG_TOK %token VAR_TOK %token INT_TOK %token CHAR_TOK %token ARR_TOK %token DOT_DOT %token OF_TOK %token PROC_TOK %token FUNC_TOK %token BEGIN_TOK %token END_TOK %token IF_TOK %token THEN_TOK %token ELSE_TOK %token WHILE_TOK %token DO_TOK %left NOT_TOK %token ASSIGNOP %token <tokenpos> ID %token NUM %token CHARCONST %token PROC_ID %token <tokenpos> FUNC_ID %token ARR_INT %token ARR_CHAR %nonassoc RELOP %left '+' '-' OR_TOK %left '*' '/' DIV_TOK MOD_TOK AND_TOK %left UMINUS %type <typeinfo> identifier_list typed_id_list arguments type parameter_list %type <intval> expression_list
  • 2. %type <tokenpos> untyped_id_list simple_expression expression term factor variable %expect 1 %start program %% allow_ids : { CanInsert = 1; } ; disallow_ids : { CanInsert = 0; } ; program : PROG_TOK allow_ids ID '(' untyped_id_list ')' disallow_ids ';' declarations subprogram_declarations { printf("proc main,0n"); } compound_statement '.' { printf("endprocn"); } ; untyped_id_list : ID | untyped_id_list ',' ID ; identifier_list : ID typed_id_list { $<tokenpos>1->SetType($<typeinfo>2[0]); switch ($<typeinfo>2[0]) { case INT_TOK: printf("defint %sn",$<tokenpos>1->GetName()); break; case CHAR_TOK: printf("defchar %sn",$<tokenpos>1->GetName()); break; case ARR_INT: { int size = $<typeinfo>2[3] - $<typeinfo>2[2] + 1; $<tokenpos>1->SetLowArrBound($<typeinfo>2[2]); $<tokenpos>2->SetHighArrBound($<typeinfo>2[3]); printf("defintarr %s %dn",$<tokenpos>1->GetName(),size); break; } case ARR_CHAR: { int size = $<typeinfo>2[3] - $<typeinfo>2[2] + 1; $<tokenpos>1->SetLowArrBound($<typeinfo>2[2]); $<tokenpos>2->SetHighArrBound($<typeinfo>2[3]); printf("defchararr %s %dn",$<tokenpos>1->GetName(),size); break; } }
  • 3. // Copia de atributo compuesto $<typeinfo>$[0] = $<typeinfo>2[0]; $<typeinfo>$[1] = $<typeinfo>2[1]; $<typeinfo>$[2] = $<typeinfo>2[2]; $<typeinfo>$[3] = $<typeinfo>2[3]; $<typeinfo>$[4] = $<typeinfo>2[4]; // Fin de copia $<typeinfo>$[4]++; } ; typed_id_list : ',' ID typed_id_list { $<tokenpos>2->SetType($<typeinfo>3[0]); switch ($<typeinfo>3[0]) { case INT_TOK: printf("defint %sn",$<tokenpos>2->GetName()); break; case CHAR_TOK: printf("defchar %sn",$<tokenpos>2->GetName()); break; case ARR_INT: { int size = $<typeinfo>2[3] - $<typeinfo>2[2] + 1; $<tokenpos>1->SetLowArrBound($<typeinfo>2[2]); $<tokenpos>2->SetHighArrBound($<typeinfo>2[3]); printf("defintarr %s %dn",$<tokenpos>1->GetName(),size); break; } case ARR_CHAR: { int size = $<typeinfo>2[3] - $<typeinfo>2[2] + 1; $<tokenpos>1->SetLowArrBound($<typeinfo>2[2]); $<tokenpos>2->SetHighArrBound($<typeinfo>2[3]); printf("defchararr %s %dn",$<tokenpos>1->GetName(),size); break; } } // Copia de atributo compuesto $<typeinfo>$[0] = $<typeinfo>3[0]; $<typeinfo>$[1] = $<typeinfo>3[1]; $<typeinfo>$[2] = $<typeinfo>3[2]; $<typeinfo>$[3] = $<typeinfo>3[3]; $<typeinfo>$[4] = $<typeinfo>3[4]; // Fin de copia $<typeinfo>$[4]++; } | ':' type { // Copia de atributo compuesto $<typeinfo>$[0] = $<typeinfo>2[0]; $<typeinfo>$[1] = $<typeinfo>2[1]; $<typeinfo>$[2] = $<typeinfo>2[2]; $<typeinfo>$[3] = $<typeinfo>2[3]; $<typeinfo>$[4] = $<typeinfo>2[4]; // Fin de copia } ; declarations : declarations VAR_TOK allow_ids identifier_list ';' disallow_ids | ; type : standard_type {
  • 4. $<typeinfo>$[0] = $<typeinfo>1[0]; $<typeinfo>$[4] = $<typeinfo>1[4]; } | ARR_TOK '[' NUM DOT_DOT NUM ']' OF_TOK standard_type { if ($<typeinfo>8[0] == INT_TOK) $<typeinfo>$[0] = ARR_INT; else $<typeinfo>$[0] = ARR_CHAR; $<typeinfo>$[1] = $<typeinfo>8[0]; $<typeinfo>$[2] = $<intval>3; $<typeinfo>$[3] = $<intval>5; $<typeinfo>$[4] = $<typeinfo>8[4]; } ; standard_type : INT_TOK { $<typeinfo>$[0] = INT_TOK; $<typeinfo>$[4] = 0; } | CHAR_TOK { $<typeinfo>$[0] = CHAR_TOK; $<typeinfo>$[4] = 0; } ; subprogram_declarations : subprogram_declarations subprogram_declaration ';' | ; subprogram_declaration : allow_ids subprogram_head declarations disallow_ids compound_statement { printf("endprocn"); CurrentSymbolTable = GlobalSymbolTable; delete LocalSymbolTable; } ; subprogram_head : PROC_TOK { // Comunicar al analizador lexico que el proximo // ID es un identificador de procedimiento PROC_ID proc_id = 1; } PROC_ID { proc_id = 0; // Entrando a un nuevo scope, cambiar tabla LocalSymbolTable = new SymbolTable(CurrentSymbolTable); CurrentSymbolTable = LocalSymbolTable; printf("startargsn"); } arguments { printf("endargsn"); $<tokenpos>3->SetParamCount($<typeinfo>5[4]); } ';' { printf("proc _%s,%dn",$<tokenpos>3->GetName(),$<tokenpos>3->GetParamCount()); } | FUNC_TOK { // Comunicar al analizador lexico que el proximo // ID es un identificador de funcion FUNC_ID func_id = 1;
  • 5. } FUNC_ID { func_id = 0; // Entrando a un nuevo scope, cambiar tabla LocalSymbolTable = new SymbolTable(CurrentSymbolTable); CurrentSymbolTable = LocalSymbolTable; printf("startargsn"); } arguments { printf("endargsn"); $<tokenpos>3->SetParamCount($<typeinfo>5[4]); } ':' standard_type { $<tokenpos>3->SetFuncReturnType($<typeinfo>8[0]); switch($<typeinfo>8[0]) { case INT_TOK: printf("intfunc _%s,%dn",$<tokenpos>3->GetName(),$<tokenpos>3- >GetParamCount()); break; case CHAR_TOK: printf("charfunc _%s,%dn",$<tokenpos>3->GetName(),$<tokenpos>3- >GetParamCount()); break; default: error(ERR_TYPEMISMATCH); } } ';' ; arguments : '(' parameter_list ')' { // Copia de atributo compuesto $<typeinfo>$[0] = $<typeinfo>2[0]; $<typeinfo>$[1] = $<typeinfo>2[1]; $<typeinfo>$[2] = $<typeinfo>2[2]; $<typeinfo>$[3] = $<typeinfo>2[3]; $<typeinfo>$[4] = $<typeinfo>2[4]; // Fin de copia } | { $<typeinfo>$[4] = 0; } ; parameter_list : identifier_list | parameter_list ';' identifier_list { // Copia de atributo compuesto $<typeinfo>$[0] = $<typeinfo>2[0]; $<typeinfo>$[1] = $<typeinfo>2[1]; $<typeinfo>$[2] = $<typeinfo>2[2]; $<typeinfo>$[3] = $<typeinfo>2[3]; $<typeinfo>$[4] = $<typeinfo>2[4]; // Fin de copia } ; compound_statement : BEGIN_TOK optional_statements END_TOK ; optional_statements : statement_list | ;
  • 6. statement_list : statement | statement_list ';' statement statement : variable ASSIGNOP expression { Token *tmpoffset = $1->GetOffset(); if (tmpoffset) { printf("%s[%s] = %sn",$<tokenpos>1->GetName(), tmpoffset->GetName(), $<tokenpos>3->GetName()); TmpVarGenerator.FreeTemp(tmpoffset); $1->SetOffset(NULL); } else printf("%s = %sn",$<tokenpos>1->GetName(), $<tokenpos>3->GetName()); TmpVarGenerator.FreeTemp($<tokenpos>3); $<tokenpos>$ = $<tokenpos>1; } | procedure_statement | compound_statement | IF_TOK expression THEN_TOK { $<typeinfo>$[FALSELABEL] = TmpVarGenerator.NewLabel(); $<typeinfo>$[OUTLABEL] = TmpVarGenerator.NewLabel(); printf("gofalse %s,__lab%dn",$2->GetName(),$<typeinfo>$[FALSELABEL]); TmpVarGenerator.FreeTemp($2); } statement { printf("goto __lab%dn",$<typeinfo>4[OUTLABEL]); printf("label __lab%dn",$<typeinfo>4[FALSELABEL]); } else_part { printf("label __lab%dn",$<typeinfo>4[OUTLABEL]); } | WHILE_TOK { $<typeinfo>$[OUTLABEL] = TmpVarGenerator.NewLabel(); $<typeinfo>$[STARTLABEL] = TmpVarGenerator.NewLabel(); printf("label __lab%dn",$<typeinfo>$[STARTLABEL]); } expression { printf("gofalse %s,__lab%dn",$3->GetName(),$<typeinfo>2[OUTLABEL]); } DO_TOK statement { printf("goto __lab%dn",$<typeinfo>2[STARTLABEL]); printf("label __lab%dn",$<typeinfo>2[OUTLABEL]); TmpVarGenerator.FreeTemp($3); } ; else_part : ELSE_TOK statement | ; variable : ID { $$ = $1; TmpVarGenerator.FreeTemp($<tokenpos>1); }
  • 7. | ID '[' expression ']' { $1->SetOffset($3); $$ = $1; } | FUNC_ID ; procedure_statement : PROC_ID { if ($<tokenpos>1->GetParamCount() != 0) error(ERR_PARAMCOUNT); else printf("call %sn",$<tokenpos>1->GetName()); } | PROC_ID '(' expression_list ')' { if ($<tokenpos>1->GetParamCount() != $<intval>3) error(ERR_PARAMCOUNT); else printf("call %sn",$<tokenpos>1->GetName()); } ; expression_list : expression { printf("param %sn",$<tokenpos>1->GetName()); TmpVarGenerator.FreeTemp($<tokenpos>1); $<intval>$ = 1; } | expression_list ',' expression { printf("param %sn",$<tokenpos>3->GetName()); TmpVarGenerator.FreeTemp($<tokenpos>3); $<intval>$ = $<intval>1 + 1; } ; expression : simple_expression { $<tokenpos>$ = $<tokenpos>1; } | simple_expression RELOP simple_expression { static const char* RelOps[] = { "==","!=","<","<=",">=",">" }; Token *tmp = TmpVarGenerator.NewTemp(); printf("%s = %s %s %sn",tmp->GetName(), $<tokenpos>1->GetName(), RelOps[$<opval>2], $<tokenpos>3->GetName()); TmpVarGenerator.FreeTemp($<tokenpos>1); TmpVarGenerator.FreeTemp($<tokenpos>3); $<tokenpos>$ = tmp; } ; simple_expression : term { $<tokenpos>$ = $<tokenpos>1; } | simple_expression '+' term { if (($<tokenpos>1->GetType() != INT_TOK) ||
  • 8. ($<tokenpos>3->GetType() != INT_TOK)) error(ERR_TYPEMISMATCH); Token *tmp = TmpVarGenerator.NewTemp(); printf("%s = %s + %sn",tmp->GetName(), $<tokenpos>1->GetName(), $<tokenpos>3->GetName()); TmpVarGenerator.FreeTemp($<tokenpos>1); TmpVarGenerator.FreeTemp($<tokenpos>3); $<tokenpos>$ = tmp; } | simple_expression '-' term { if (($<tokenpos>1->GetType() != INT_TOK) || ($<tokenpos>3->GetType() != INT_TOK) || ($<tokenpos>1->GetType() != $<tokenpos>3->GetType())) error(ERR_TYPEMISMATCH); Token *tmp = TmpVarGenerator.NewTemp(); printf("%s = %s - %sn",tmp->GetName(), $<tokenpos>1->GetName(), $<tokenpos>3->GetName()); TmpVarGenerator.FreeTemp($<tokenpos>1); TmpVarGenerator.FreeTemp($<tokenpos>3); $<tokenpos>$ = tmp; } | simple_expression OR_TOK term { if (($<tokenpos>1->GetType() != INT_TOK) || ($<tokenpos>3->GetType() != INT_TOK) || ($<tokenpos>1->GetType() != $<tokenpos>3->GetType())) error(ERR_TYPEMISMATCH); Token *tmp = TmpVarGenerator.NewTemp(); printf("%s = %s | %sn",tmp->GetName(), $<tokenpos>1->GetName(), $<tokenpos>3->GetName()); TmpVarGenerator.FreeTemp($<tokenpos>1); TmpVarGenerator.FreeTemp($<tokenpos>3); $<tokenpos>$ = tmp; } ; term : factor { $<tokenpos>$ = $<tokenpos>1; } | term '*' factor { if (($<tokenpos>1->GetType() != INT_TOK) || ($<tokenpos>3->GetType() != INT_TOK) || ($<tokenpos>1->GetType() != $<tokenpos>3->GetType())) error(ERR_TYPEMISMATCH); Token *tmp = TmpVarGenerator.NewTemp(); printf("%s = %s * %sn",tmp->GetName(), $<tokenpos>1->GetName(), $<tokenpos>3->GetName()); TmpVarGenerator.FreeTemp($<tokenpos>1); TmpVarGenerator.FreeTemp($<tokenpos>3); $<tokenpos>$ = tmp; } | term '/' factor { if (($<tokenpos>1->GetType() != INT_TOK) || ($<tokenpos>3->GetType() != INT_TOK) || ($<tokenpos>1->GetType() != $<tokenpos>3->GetType())) error(ERR_TYPEMISMATCH); Token *tmp = TmpVarGenerator.NewTemp(); printf("%s = %s / %sn",tmp->GetName(),
  • 9. $<tokenpos>1->GetName(), $<tokenpos>3->GetName()); TmpVarGenerator.FreeTemp($<tokenpos>1); TmpVarGenerator.FreeTemp($<tokenpos>3); $<tokenpos>$ = tmp; } | term AND_TOK factor { if (($<tokenpos>1->GetType() != INT_TOK) || ($<tokenpos>3->GetType() != INT_TOK) || ($<tokenpos>1->GetType() != $<tokenpos>3->GetType())) error(ERR_TYPEMISMATCH); Token *tmp = TmpVarGenerator.NewTemp(); printf("%s = %s & %sn",tmp->GetName(), $<tokenpos>1->GetName(), $<tokenpos>3->GetName()); TmpVarGenerator.FreeTemp($<tokenpos>1); TmpVarGenerator.FreeTemp($<tokenpos>3); $<tokenpos>$ = tmp; } | term DIV_TOK factor { if (($<tokenpos>1->GetType() != INT_TOK) || ($<tokenpos>3->GetType() != INT_TOK) || ($<tokenpos>1->GetType() != $<tokenpos>3->GetType())) error(ERR_TYPEMISMATCH); Token *tmp = TmpVarGenerator.NewTemp(); printf("%s = %s / %sn",tmp->GetName(), $<tokenpos>1->GetName(), $<tokenpos>3->GetName()); TmpVarGenerator.FreeTemp($<tokenpos>1); TmpVarGenerator.FreeTemp($<tokenpos>3); $<tokenpos>$ = tmp; } | term MOD_TOK factor { if (($<tokenpos>1->GetType() != INT_TOK) || ($<tokenpos>3->GetType() != INT_TOK) || ($<tokenpos>1->GetType() != $<tokenpos>3->GetType())) error(ERR_TYPEMISMATCH); Token *tmp = TmpVarGenerator.NewTemp(); printf("%s = %s %% %sn",tmp->GetName(), $<tokenpos>1->GetName(), $<tokenpos>3->GetName()); TmpVarGenerator.FreeTemp($<tokenpos>1); TmpVarGenerator.FreeTemp($<tokenpos>3); $<tokenpos>$ = tmp; } ; factor : ID { $$ = $1; } | ID '[' expression ']' { Token *tmp = TmpVarGenerator.NewTemp(); printf("%s = %s[%s]n",tmp->GetName(),$<tokenpos>1->GetName(), $<tokenpos>3->GetName()); TmpVarGenerator.FreeTemp($<tokenpos>3); $$ = tmp; } | FUNC_ID { if ($1->GetParamCount() != 0)
  • 10. error(ERR_PARAMCOUNT); else { printf("callfunc %sn",$<tokenpos>1->GetName()); $$ = $1; } } | FUNC_ID '(' expression_list ')' { if ($<tokenpos>1->GetParamCount() != $<intval>3) error(ERR_PARAMCOUNT); else { printf("callfunc %sn",$<tokenpos>1->GetName()); $$ = $1; } } | NUM { Token *tmp = TmpVarGenerator.NewTemp(); printf("%s = %dn",tmp->GetName(),$<intval>1); $$ = tmp; } | CHARCONST { Token *tmp = TmpVarGenerator.NewTemp(CHAR_TOK); printf("%s = '%c'n",tmp->GetName(),$<charval>1); $$ = tmp; } | '(' expression ')' { $$ = $2; } | NOT_TOK factor { Token *tmp = TmpVarGenerator.NewTemp(); printf("%s = ~%sn",tmp->GetName(), $<tokenpos>2->GetName()); TmpVarGenerator.FreeTemp($<tokenpos>2); $$ = tmp; } | '-' factor %prec UMINUS { Token *tmp = TmpVarGenerator.NewTemp(); printf("%s = -%sn",tmp->GetName(), $<tokenpos>2->GetName()); TmpVarGenerator.FreeTemp($<tokenpos>2); $$ = tmp; } ; %% #include <process.h> extern int line,column; void cdecl yyerror(char *s) { fprintf(stderr,"Error: %s in line %d, column %dn",s,line,column); exit(1); } /* yyerror() */