Alex Mendez
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    > ### Universidad de San Carlos de Guatemala > #### Facultad de ingeniería > ##### Ingeniería en Ciencias y Sistemas # MANUAL DE USUARIO :bookmark_tabs: > ###### Elian Saúl Estrada Urbina > ###### 201806838 ## Acerca de JPR Editor :information_source: JPR es un intérprete que ejecuta instrucciones de alto nivel definidas en el nuevo lenguaje exclusivo para los nuevos estudiantes de la Universidad de Sancarlos de Guatemala (USAC), el cuál es llamado JPR. ## Requerimientos del sistema :computer: | Sistema Operativo | Arquitectura | Versión | Memoria RAM | | --- | --- | --- | --- | | Windows | 64 bits | Windows7 SP3 o superior | mínimo 2GB de memoria RAM | | Linux | 64 bits | Distribucines Debian 9 o superior | mínimo 2GB de memoria RAM | ## Instalación / Ejecución :arrow_forward: > ### Requisitos Opcionales - Tener instalado `git` > ### Requisitos - Tener instalado `python` en su versión 3. 1. Descargar los binarios - Clonando el repositorio ``` shell git clone https://github.com/ElianEstrada/OLC1_Project_201806838.git ``` - Descargar el archivo zip [JPR Editor - Download](https:// "title") 2. Dirigrise a la carperta de descarga. 3. Ejecutar la aplicación ``` shell phyton3 main.py ``` ## Interfaz :black_square_button: ![](https://i.imgur.com/YOUZ8ir.png) Esta es la vista principal que se mostrara al iniciar **JPR Editor**, esta divido en diferentes componentes que a continuación serán descritas: ### Editor ![](https://i.imgur.com/pNfvlyk.png) La función principal del editor será el ingreso del código fuente que será analizado. #### Principales Características - Se podrán abrir diferentes archivos al mismo tiempo - Cuenta con resaltado de sintaxis, para el lenguaje JPR. - Barra lateral derecha con el número de línea. ### Consola ![](https://i.imgur.com/eyAV5zQ.png) La función principal de la consola será mostrar los resultados, mensajes de consola, mensajes de error del archivo entrada fue analizado. ### Tabla de Símbolo ![](https://i.imgur.com/eDCNDLe.png) La función principal de este componente es mostrar todas las variables, métodos y funciones que han sido declarados dentro del flujo del programa. ### Barra lateral de Opciones <center> <img src="https://i.imgur.com/df0USlD.png"> </center> Cada opción realiza una funcionalidad distinta, que serán descritas a continuación de arriba hacia abajo: | Opción | Decripción | | -------- | -------- | | Abrir Archivo | Permite abrir un archvio con extensión *.jpr* guardado en nuestra máquina y muestra el contenido en el editor | | Guardar Archivo| Permite guardar de forma local el contenido del editor. | | Guardar Como.. | Permite guardar de forma local el contenido del editor, permintiendo cambiar el nombre y ruta de archivo. | | Ejecutar | Hará el llamado al intérprete, el cual se hará cargo de realizar los análisis léxico, sintáctico y semántico, además de ejecutar todas las sentencias. | | Debugger | Característica que nos ayudará a ver el flujo de nuestro código al momento de ser ejecutado. | | Reporte de Errores | Se mostrarán todos los errores encontrados al realizar el análisis léxico, sintáctico y semántico, este reporte se visualizará en un en navegador web. | ### Barra de estado <center> <img src="https://i.imgur.com/nC9aS1r.png"> </center> La barra de estado se encuentra en la parte inferior de la apicación Proporciona información sobre el documento en el que estás trabajando: - Fila actual del cursor - Columna actual del cursor - Cantidad de errores encontrados luego de realizar el análisis de un archivo de entrada. ## Sintaxis :memo: ### Case Insensitive El lenguaje no distinguirá entre mayúsculas o minúsculas. ```javascript var a=0; ``` es lo mismo a decir ```javascript var A=0 ``` Por lo tanto marcará error la declaración de `A` ya que la variable `a` ya existe previamente ### Comentarios - Comentarios de una línea ```python # Este es un comentario de una línea ``` - Comentarios muliti línea ``` #* Este es un comentario Multilínea Para este lenguaje JPR!!! #$#”%$#”$%$# *# ``` ### Caracteres de finalización y encapsulamiento de sentencias - **Finalización de instrucciones:** para finalizar una instrucciones puede o no venir el signo punto y coma `;`. ```javascript var edad = 10; var edad2 = 15 ``` - **Encapsular sentencias:** para encapsular sentencias dadas por los ciclos, métodos, funciones, etc, se utilizará los signos `{` y `}`. ```javascript if(i == 1){ var nota = 100; print(“Mi nota es de ” + nota ) } ``` ### Declaración y asignación de variables ```s var numero; # null var cadena = “hola” #String var var_1 = ‘a’; # char var verdadero; # null ``` ### Casteos El lenguaje aceptará los siguientes casteos: + Int a double + Double a Int + Int a String + Int a Char + Double a String + Char a int + Char a double ```s # ‘(’<TIPO>’)’ <EXPRESION> var edad = (int) 18.6; #toma el valor entero de 18 var letra = (char) 70 #tomar el valor ‘F’ ya que el 70 en ascii es F var numero = (double) 16; #toma el valor 16.0 ``` ### Incremento y Decremento ```s var nota = 100; # Incremento <EXPRESION>’+’’+’ nota++; #tiene el valor de 101 # Decremento <EXPRESION> ‘-‘‘-’ nota--; #tiene el valor 99 ``` ### Arreglos #### Declaración de Arreglos ```s # DECLARACION TIPO 1 # <TIPO> ‘[’ ‘]’ <ID> = new <TIPO> ( ’[’ <EXPRESION> ’]’ )+ int[ ] arr1 = new int[4]; #se crea un arreglo de 4 posiciones, con null en cada posición int[ ] matriz1 = new int[2][2]; #se crea un arreglo de 4 posiciones, con null en cadaposición # DECLARACION TIPO 2 # <TIPO> ‘[’ ‘]’ <ID> = ‘{’ <LISTAVALORES> ‘}’ string[ ] arreglo2 = {"hola", "Mundo"}; #arreglo de 2 posiciones, con "Hola" y "Mundo" int[ ][ ] matriz = { {11, 12} , {21,22} }; #arreglo de 2 dimensiones, con 2 posiciones en cada dimensión. ``` #### Acceso a Arreglos ```s # <ID> ( ’[’ EXPRESION ’]’ )+ string[ ] arr2 = {"hola", "Mundo"}; #creamos un arreglo de 2 posiciones de tipo string string valorPosicion = arr2 [0] #posición 0, valorPosicion = “hola” ``` #### Modificación de Arreglos ```s # <ID> ( ‘[’ EXPRESION ‘]’ )+ = EXPRESION string[] arr2 = {"hola", "Mundo"}; #arreglo de 2 posiciones, con "Hola" y "Mundo" int[] arrNumero = {2020,2021,2022}; arr2 [0] = “OLC1”; arr2 [1] = “1er Semestre ”+ arrNumero [1]; ``` ### Sentencias de control #### if ```javascript if (x <50) { Print(“Menor que 50”); #Más sentencias } ``` #### if-else ```javascript if (x <50) { print(“Menor que 50”); //Más sentencias } else { print(“Mayor que 100”); //Más sentencias } ``` #### else-if ```javascript if (x <50) { print(“Menor que 50”); //Más sentencias } else if (x <= 50 && x > 0) { print (“Menor que 50”); //Más sentencias } else { print(“Número negativo”); //Más sentencias } ``` #### Switch Case ```javascript,python var edad = 18; switch( edad ) { case 10: Print(“Tengo 10 anios.”); # mas sentencias break; case 18: Print(“Tengo 18 anios.”); # mas sentencias case “25”: Print(“Tengo 25 anios en String.”); # mas sentencias break; default: Print(“No se que edad tengo. :(”); # mas sentencias break; } ``` ### Sentencias cíclicas #### While ```python while ( x < 100 ) { if ( x > 50 ) { print(“Mayor que 50”); #Más sentencias } else { print(“Menor que 100”); #Más sentencias } X++; #Más sentencias } ``` #### For ```javascript for ( var i=0; i<3;i++ ) { print(“i=”+i) #más sentencias } ``` ### Sentencias de transferencia #### Break ```javascript for(var i = 0; i < 9; i++){ if(i==5){ print(“Me salgo del ciclo en el numero “ + i); break; } print(i); } ``` #### Continue ```javascript for(var i = 0; i < 9; i++){ if(i==5){ print(“Me salte el numero ” + i); continue; } print(i); } ``` #### Return ```go func sumar(int n1, int n2){ var n3; n3 = n1+n2; return n3; //retorno el valor } ``` ### Funciones ```go func sumar(int n1, int n2){ var n3; n3 = n1+n2; return n3; // retorno el valor } func holamundo(){ print(“Hola mundo”); } func conversion(double pies, string tipo){ if (tipo == “metro”) { return pies/3.281; } else { return -1; } } ``` ### Función Print ```javascript print(“Hola mundo!!”) print(“Sale compi \n” + valor); print(suma(2,2)) ``` ### Función Main ```javascript main(){ print(“hola soy un mensaje”); // mas instruciones } ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully