doge2dev / lexer-v2 Goto Github PK
View Code? Open in Web Editor NEWComplete Compiler based on tokens
License: BSD 2-Clause "Simplified" License
Complete Compiler based on tokens
License: BSD 2-Clause "Simplified" License
[COMENTÁRIOS]: #% Meu comentário %# [TIPOS PRIMITIVOS]: inteiro flutuante cadeia logico verdadeiro falso vazio [DECLARAR VARIÁVEIS E CONSTANTES]: <tipo> variavel <nome> = <valor> <tipo> constante <nome> = <valor> inteiro variavel n1 = 15 inteiro constante n1 = 15 flutuante variavel f1 = 34.5 flutuante constante f1 = 34.5 cadeia variavel str1 = "Hello world" cadeia constante str1 = "Hello world" logico variavel b1 = verdadeiro logico constante b1 = verdadeiro [WHILE LOOP]: enquanto a < 10 { ... } [ITERAÇÃO]: para i 1..10 { ... } [IF-ELSEIF-ELSE]: se a == 13 { ... } senaose a > 13 { ... } senao { ... } [SAÍDA DE DADOS]: [MESMA LINHA]: escreva "Ola" [PULA UMA LINHA]: escreval "Ola" [ENTRADA DE DADOS] leia x [ENTRADA E SAÍDA DE DADOS] leia x escreval x [CONCATENAR VARIAVEIS]: cadeia variavel str3 = str1..str2 [CONCATENAR VARIAVEIS EM SAÍDA PADRÃO]: escreval str1..str2 [VETORES/ARRAYS]: vetor gama (3) = [13,14,45] [MATRIZES]: matriz eta (3)(4)(2) = [0,1,0],[3,1,9,6],[2,9] [DECLARAR MÉTODO] <tipo> funcao <nome> : (<nome>:<tipo>,<nome>:<tipo>, ...) { ... } inteiro funcao calcular : (a:inteiro,b:inteiro) { ... } [DECLARAR FUNÇÃO] <tipo> funcao <nome> : (<nome>:<tipo>,<nome>:<tipo>, ...) { ... retorne <valor> } inteiro funcao calcular : (a:inteiro,b:inteiro) { retorne a+b } [CHAMAR FUNÇÃO OU MÉTODO] chamar calcular : () chamar somar : (3,4) [INCREMENTO (+1)] inteiro variavel x = 0 inc x [DECREMENTO (-1)] inteiro variavel x = 15 dec x Gabriel Margarido
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.