Code Monkey home page Code Monkey logo

compilers_comments's Introduction

Compilers

[PT/BR] - A tarefa consistia em implementar um AFD que aceite comentários em C, no padrão definido pelo AFD dado, utilizando a solução TIPO 2 (A mesma usada no compilador de TINY).

Especificações:

  • O AFD deve aceitar ou rejeitar e ainda imprimir o lexema (quando for o caso).
  • O AFD pode ser implementado para aceitar apenas a primeira cadeia de caracteres que casar com o padrão.
  • Caso nenhuma string case com o padrão, apenas informar que nenhum token foi reconhecido.
  • Exemplo: Se a entrada for: /OI/*oioi/comment/, deve aceitar e imprimir o token /OI/. A substring /comment/ casa com o padrão, mas não é a primeira.

[ENG] - The task was to implement an AFD that accepts C comments, in the pattern defined by the given AFD, using the TYPE 2 solution (The same one used in the TINY compiler).

Specifications:

  • The AFD must accept or reject and still print the lexeme (where applicable).
  • The AFD can be implemented to accept only the first character string that matches the pattern.
  • If no string matches the pattern, just report that no token was recognized.
  • Example: If the input is: /OI/*oioi/comment/, it should accept and print the token /OI/. The substring /comment/ matches the pattern, but is not the first.

Imagem do AFD // DFA image

Compiladores

compilers_comments's People

Contributors

gethibou avatar

Watchers

 avatar

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.