I'm developing my language called "Mafdom" with the help of ChatGPT, and I am at the part of detecting Strings for printing. I'm still at the Lexer, and I noticed that I am really stuck at this part of String Recognization. Look at this example at the terminal:
"Hello" 'Hello' write: 'Hello, World!' write: "123abc"
STRING: "Hello"
STRING: 'Hello'
KEYWORD: write
21KEYWORD: write
IDENTIFIER: llo
SYMBOL: ,
IDENTIFIER: World
!
Bad string formation
Process finished with exit code 0
OBS.: The 21 before the Keyword is the index, that I forgot to remove while running this example.
Almost everyone sticks with C-branches for prog.lang development. But I tried to do something different. And now, I'm stuck!
At the Java script, we can see the part that recognizes the Strings and other Regexes, And at the top part of the script, we can see the Regex Pattern declarators. Take a look at both parts: