Git Product home page Git Product logo

ads4-dessin's Introduction

ADS4-Dessin

Projet de ADS4 (JFlex)

##Résumé Le but du projet était de créer à l'aide d'un analyseur syntaxique un interpréteur permettant la création d'image. L'interpréteur va prendre ses instructions dans un fichier texte et dessiner à l'écran une image construite à partir de ces instructions. Voir fichier Exemple

##Compilation

Le fichier .flex est déjà compilé, mais en cas de besoin :

jflex image.flex

Pour compiler le programme :

javac *.java

Pour executer le programme:

java Main

Pour interpréter un fichier, il faut se rendre dans :

Fichier > Ouvrir

Il est également possible d’ouvrir un fichier directement dans le terminal avec

java Main <fichier>

##Syntaxe

Var <String>;

Crée la variable

Debut 
…
Fin

Délimite les instructions

BasPinceau;/HautPinceau;

Active/Désactive le dessin

<Variable> = <Int>;

Assigne la valeur à la variable

Tourne <Variable>/<Int>;

Faire pivoter le curseur

Avance <Int>/<Variable>;

Faire avancer le curseur

SI <Expression> ALORS <Instructions> SINON <Instructions>;

Effectue une condition. Attention, chacune des instructions doit être séparées d’un ; .

COLOR <red|blue|green|yellow|black>;

Change la couleur du curseur

Taille <Int>;

Change la taille du curseur

TANT QUE <Expression> FAIRE <Instructions>;

Effectue une boucle Attention, chacune des instructions doit être séparées d’un ; .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.