Skip to content

Krauzy/blair

Repository files navigation

BLAIR

The magic of code🧙‍♀️🔮

BLAIR© is a programming language made in C# with the intention of learning the operation, structure and logic of raw programming languages

 init: {
     integer a;
     loop(a = 0; a < 10; a++): {
         a = a - 0.5;
     }
 }

Analysis

A compiler has:

Name Description Example
Tokens The compiler creates a list of tokens by analyzing all the words written in the code against the reserved words of the language grammar (EBNF) if else while
Output Errors The compiler has a list of errors that are displayed during or after the end of the compilation and are made up of errors found in any of the three compilation analyzes Unexpected Token
Lexical Analysis The first phase of compiler analysis, here, the compiler identifies and lists tokens and identifies lexical errors Reference
Syntactic Analysis The second phase of compiler analysis, here, the compiler identifies whether tokens are following the rules of language grammar Reference
Semantic Analysis The third and final analysis phase, here, the compiler checks whether the value of the variable tokens (numbers, string, boolean, etc.) are inserted in logically correct operations Reference

Lexical✔️

  • Consistent grammar
  • Definition of First and Follow rules
  • Token recognition (with details)

Syntatic✔️

  • Complete syntatic analysis
  • Error identification and indication (row and column)
  • Error handling

Semantic❌

  • Types check
  • Inicialization check
  • Non-use check
  • Use of casting

About

blair language and compiler

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages