Image logo-doc

Construcción del sistema

Fco. Javier Bohórquez Ogalla


Índice General

Vista general

En esta sección se tratan los aspectos relacionados con la con la implementación del sistema y su codificación. Para ello se describen las herramientas software y hardware utilizadas en el desarrollo, y la estructra del código fuente.

Entorno de construcción

Entodrno de desarrollo (IDE):
Geany
Lenguaje de programación:
C++
Compilador:
GCC
Configuración automática:
Autoconf
Construcción automática:
Automake
Gestión de dependencias:
Make
Control de versions:
Subversion
Generador de analizador léxico:
Flex
Generador de analizador sintáctico:
Bison
Depurador:
GDB
Bibliotecas de desarrollo
Editor de línea e histórico:
Readline
Expresiones regulares:
BoostRegex
Matemáticas:
Biblioteca estándar de C
Enlaces dinámicos:
Biblioteca del sistema GNU/Linux libdl
Desarrollo Web
Programación en servidor:
PHP
Programación en cliente:
JavaScript
Estructura del contenido:
HTML5
Presentación del contenido:
CSS

Ficheros de código fuente

El sistema software se constituye de una serie de módulos o componentes en forma de ficheros, cada uno de los cuales contiene las estructuras de programación y el código fuente necesario para implementar cada una de las funcionalidades del sistema.

interpreter:
Interprete.
lshScanner:
Analizador léxico.
lshParser:
Analizador sintáctico.
error:
Sistema de errores.
plugins:
Sistema de extensiones.
run/runTree:
Abstracción de nodo ejecutable.
run/expNode:
Abstracción de nodos ejecutables expresiones.
run/symbols:
Estructura de datos tabla de símbolos.
run/sTable:
Gestión de tabla de de símbolos y definiciones.
run/typeNode:
Nodos ejecutables para cada tipo de dato.
run/numData:
Representación interna de datos numéricos.
run/stmtNode:
Nodos ejecutables sentencias de control.
run/operatorBaseNode:
Nodos ejecutables operadores básicos.
run/operatorLogicNode:
Nodos ejecutables operadores lógicos.
run/operatorArithNode:
Nodos ejecutables operadores aritméticos.
run/operatorStrNode:
Nodos ejecutables operadores sobre cadenas.
run/operatorArrayNode:
Nodos ejecutables operadores sobre arrays.
run/operatorRegexpNode:
Nodos ejecutables operadores sobre expresiones regulares.
run/operatorDateNode:
Nodos ejecutables operadores sobre fechas y tiempo.
run/operatorFileNode:
Nodos ejecutables operadores sobre ficheros.
run/operatorProcessNode:
Nodos ejecutables operadores sobre procesos.

A continuación se describen las dependencias entre ficheros mediante una serie de paquetes que contienen diagramas de componentes. Este aspecto del sistema queda completamente descrito mediante la combinación de estos paquetes.

Image interpreter
Image error
Image plugin

Image runTree
Image expNode

Image sTable
Image symbols

Image typeData
Image stmtNode
Image operatorBaseNode
Image operatorLogicNode

Image operatorArithNode
Image operatorStrNode

Image operatorArrayNode
Image operatorRegexpNode

Image operatorDateNode
Image operatorFileNode

Image operatorProcessNode

Extractos de código fuente

Acceso a variable

void idNode::run (bool resolvkey) {
   #if JSON==1
      interpreter::to_jsonRun(this);
   #endif
   sTable *table_ = sTable::sTable_use;
   refNode *str = new refNode(id_);
   exist_ = table_->exist (str);
   ref_ = table_->access (str);
   delete str;
   runNode *val = ref_->getRef();
   refNode * key = NULL;
   ref_ = refNode::resolved (val);
   if (privateNode::is)
      table_->setPrivate(new refNode (id_));
   if (!ref_->isprivate_)
      ref_->isprivate_ = privateNode::is;
   #if JSON==1
         interpreter::to_jsonSetValue(this, val);
   #endif
}

Asignación

void asigNode::run () {
   runNode *node_aux = node2_, *nodeR_ = NULL;
   #if JSON==1
      interpreter::to_jsonRun(this);
   #endif
   ref_ = NULL;
   nexpNode::resolvedRef (node_aux);
   #if JSON==1
      if (node2_ != node_aux)
         interpreter::to_jsonRun(this);
   #endif
   if (!(bool)dynamic_cast<functionNode*>(node_aux) && node2_ == node_aux) {
      node_aux->run();
      #if JSON==1
         interpreter::to_jsonRun(this);
      #endif
   }
   nodeR_ = this->isRefNode (node_aux)?node_aux:expNode::clone (node_aux);
   noderef(nodeR_);
   #if JSON==1
      interpreter::to_jsonSetValue(this, nodeR_);
   #endif
   setValue (nodeR_);
}

Operación suma

void addNode::run () {
   #if JSON==1
      interpreter::to_jsonRun(this);
   #endif         
   runNode* op1 = node1_;
   runNode* op2 = node2_;
   nexpNode::resolved (op1);
   #if JSON==1
      interpreter::to_jsonRun(this);
   #endif      
   nexpNode::resolved (op2);
   #if JSON==1
      interpreter::to_jsonRun(this);
   #endif         
   numvalue_ = addNode::do_add (op1, op2);
   #if JSON==1
      interpreter::to_jsonSetValue(this, numvalue_);
   #endif
}

Sobre este documento...

Image logo-doc

This document was generated using the LaTeX2HTML translator Version 2008 (1.71)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -no_subdir -split 0 head.tex -html_version 4.0,latin1,unicode

The translation was initiated by franj on 2016-01-16

franj 2016-01-16