From e84b2491497208e878eac28b88790cc8f6edc496 Mon Sep 17 00:00:00 2001 From: Gustavo Murayama Date: Fri, 23 Aug 2019 22:07:20 -0300 Subject: [PATCH] Installing and running instructions --- README.md | 24 +++++++++++++++++++++++- README.pt-BR.md | 26 ++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7409d22..7544e14 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,34 @@ [portuguese](README.pt-BR.md) | [english](README.md) -Compiler developed in Rust for the Compilers subject at Federal University of ABC, given by professor [Francisco Isidro Massetto](http://professor.ufabc.edu.br/~francisco.massetto/) in the second quarter of 2019. +Compiler developed in [Rust](https://www.rust-lang.org) for the Compilers subject at Federal University of ABC, given by professor [Francisco Isidro Massetto](http://professor.ufabc.edu.br/~francisco.massetto/) in the second quarter of 2019. + +This project was developed on `rustc 1.35.0 (3c235d560 2019-05-20)` # Objective Create a transpiler for a fictional language to C language by implementing the features described in [milestone v1.0](https://github.com/gmurayama/comp-rs/milestone/1). +# Install + +To install Rust, the recommended way is using [rustup](https://www.rust-lang.org/tools/install), a toolchain installer that enables you to switch between different version of the compiler. + +Linux or another Unix-like OS: + +```bash +curl https://sh.rustup.rs -sSf | sh +``` + +# Compiling a program + +There is some files in [examples](examples) folder showing the language basic syntax. + +```rust +cargo run +``` + +The transpiled source code will be printed at the scren and it will be saved a file named `out.c`. + # License This project is under the MIT License - see the [LICENSE](LICENSE) file for details. \ No newline at end of file diff --git a/README.pt-BR.md b/README.pt-BR.md index f03d8e3..96506c0 100644 --- a/README.pt-BR.md +++ b/README.pt-BR.md @@ -2,12 +2,34 @@ [português](README.pt-BR.md) | [inglês](README.md) -Compilador desenvolvido em Rust para a disciplina de Compiladores da Universidade Federal de ABC, ministrada pelo professor [Francisco Isidro Massetto](http://professor.ufabc.edu.br/~francisco.massetto/) no 2º quadrimestre de 2019. +Compilador desenvolvido em [Rust](https://www.rust-lang.org) para a disciplina de Compiladores da Universidade Federal de ABC, ministrada pelo professor [Francisco Isidro Massetto](http://professor.ufabc.edu.br/~francisco.massetto/) no 2º quadrimestre de 2019. + +Este projeto foi desenvolvido em `rustc 1.35.0 (3c235d560 2019-05-20)` # Objetivo Criar um transpilador de uma linguagem fictícia para a linguagem C implementando os recursos descritos no [milestone v1.0](https://github.com/gmurayama/comp-rs/milestone/1). -# License +# Instalação + +Para instalar o Rust, a maneira recomendada é usar [rustup](https://www.rust-lang.org/tools/install), um instalador de ferramentas que permite alternar entre diferentes versões do compilador. + +Linux ou outro Sistema Operacional baseado no Unix: + +```bash +curl https://sh.rustup.rs -sSf | sh +``` + +# Compilando um programa + +Existem alguns arquivos na pasta [examples](examples) mostrando a sintaxe básica da linguagem. + +```rust +cargo run +``` + +O código-fonte transpilado será impresso na tela e será salvo em um arquivo chamado `out.c`. + +# Licença Esse projeto está sob a licença MIT - veja o arquivo [LICENSE](LICENSE) para mais detalhes. \ No newline at end of file