Quote Originally Posted by Schol-R-LEA-2 View Post
I've come up with a partial token grammar for the language as you've described it, in EBNF notation, though some of it will need to be expanded upon or changed as the language design progresses. This should give you a leg up on defining the lexical analyzer when the time comes to implement it.

Code:
token ::= <keyword> | <number> | <char> | <string> | <identifier> |
          <assignment-op> | <arithmetic-op> | <bitwise-op> | <logical-op> | 
          <paren> | <colon> | <right-arrow> | <angle-bracket> | <brace> | 
          <comma> | <period> 
keyword ::= <base-type> | "if" | "elif" | "else" | 
            "loop" | "while" | "once" | "for" | 
            "fn" | "let" | "mut" | "return" | "object" | 
            "import" | "as" | "alias" |
            "and" | "or" | "not"
base-type ::= "i8"| "i16" | "i32" | "i64" |"f32" | "f64" | 
              "bool" | "char" | "string" | "ptr" | "Array" | "Vector"
identifer ::= <alpha><alphanum>*
alpha ::= "A" | "a" |"B" | "b" | "C" | "c"  ... | Z" | "z"
alphanum ::= <alpha> | <digit>
bit ::= "0" | "1"
octal-digit ::= <bit> | "2" | "3" | "4" | "5" | "6" | "7" 
digit ::= <octal-digit> | "8" | "9"
hex-digit ::= <digit> | "A" | "a" |"B" | "b" | "C" | "c" | "D" | "d" | "E" | "e" | "F" | "f"
number ::= <integer> | <float>
integer ::= <digit>+ | "0b" <bit> | "0" <octal-digit> | "0x" <hex-digit> 
float ::= <integer> <period> <integer> {("E"|"e") <integer>}
char ::= <quote> {<printable-character>} <quote>
string ::= <double-quote> {(<printable-character> | '\"')}* <double-quote>
assignment-op ::= "="
arithmetic-op ::= "+" | "-" | "*" | "/"
bitwise-op ::= "<<" | ">>" | "&" | "|"
logical-op ::= "==" | "<" | ">" | "<=" | ">="
paren ::= <lparen> | <rparen>
lparen ::= "("
rparen ::= ")"
angle-bracket ::= <langle> | <rangle>
lparen ::= "<"
rparen ::= ">"
brace ::= <lbrace> | <rbrace>
lbrace ::= "{"
rbrace ::= "}"
colon ::= ":"
right-arrow ::= "->"
comma ::= ","
period ::= "."
quote ::= "'"
double-quote ::= '"'
Wow! Just wow man! You made all this from nothing? I really don't know what to say. Seriously! I will first read then book, then learn assembly and then learn machine language. This may take years but It would be fun! Do you want me to hit you up when this happens and I'm ready to make a thing? Is there a chance that you see yourself not been interested on helping and made something together? I mean, of course things can change from now but I would like to hear if there is even a little interested on seeing yourself wanting to work in a project like that. How do you feel about that?