Commit Graph

59 Commits

Author SHA1 Message Date
8f92674387
lexer.cpp: Remove commented test code
Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
2024-03-13 18:02:54 +01:00
3476d3c642
lexer.cpp: Rename isString to isStringDelimiter
Add a few comments in other files

Signed-off-by: Username404 <w.iron.zombie@gmail.com>
2023-08-12 13:02:36 +02:00
c1b0184b64
filefuncs.cpp: Simplify the outputFileContent function
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
2023-06-13 00:35:09 +02:00
21137f5beb
Add a "--text" argument
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
2022-04-21 23:31:02 +02:00
14b71906b7
Add a SEMICOLON token
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
2022-04-08 11:01:16 +02:00
f21a79fb29
Include Yerbacon.hpp in filefuncs.cpp
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
2022-03-13 15:39:40 +01:00
f3d03adead
Add functions, indentation, better variables parsing and more
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
2022-03-13 15:15:29 +01:00
6955c5cb4d
Remove tok::type::EOF_ because it is useless, and fix the next local constant reference in Parser.hpp
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
2022-03-01 20:14:47 +01:00
f33aec687a
Parse Calls/ParseTrees
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
2022-02-14 14:12:00 +01:00
070189e4a0
Check whether failbit or badbit are set in filefuncs.cpp 2022-02-14 14:12:00 +01:00
eb709e60b0
Remove the (now useless) parallel parameter in the getFileContent() function from filefuncs.cpp 2022-02-14 14:12:00 +01:00
1082bcf58f
Allow "_" characters in identifiers 2022-02-14 14:12:00 +01:00
f44cceb11a
Ignore ';' characters 2022-02-14 14:12:00 +01:00
eb586a2899
Use generic_category::message() instead of strerror() in filefuncs.cpp 2022-02-14 14:12:00 +01:00
e720ff0f2d
Add an error message when an exception is thrown from the getFileContent() function & --parallel is not in use, and support MSVC 2022-02-14 14:12:00 +01:00
c9a6a6c918
Remove a useless condition and two unnecessary parentheses in lexer.cpp 2022-02-14 14:12:00 +01:00
3c4586cc70
Add "ASTERISK" and "DIVIDE" token types to lex.hpp, and implement comments 2022-02-14 14:12:00 +01:00
aac3085e94
Make currentCharType a constant variable in lexer.cpp 2021-10-06 14:37:13 +02:00
613e2f7019
Initialize the fileStream local variable instead of calling ifstream::open in filefuncs.cpp 2021-10-03 15:21:18 +02:00
54aa4105b8
Append new lines to the lineinput string instead of doing concatenation in filefuncs.cpp 2021-09-29 18:33:47 +02:00
c7981b9948
Throw an exception in filefuncs.cpp when a file is not found 2021-09-26 12:42:01 +02:00
3cddc7907e
Decrement the line number before creating an EOF token 2021-09-25 16:28:03 +02:00
fa9dacc23c
Fix a memory leak when iterating on characters in lexer.cpp 2021-09-23 17:53:05 +02:00
6af6c04d5f
Remove the unlikely attribute from the '\r' case, and add an EOF token type 2021-09-23 13:21:47 +02:00
95d6b2239a
Append characters directly instead of creating a new string in the default case of lexer.cpp 2021-09-14 20:22:42 +02:00
44e160ebf9
Don't throw an exception when "isTypeString" is false in lexer.cpp 2021-09-14 20:20:34 +02:00
bfa8f50ad9
Revert "Add a "SEPARATOR" token type"
This reverts commit 47478173
2021-09-11 11:35:22 +02:00
84b9f9de73
Add the [[unlikely]] attribute to the '\r' case in lexer.cpp 2021-09-10 22:20:41 +02:00
6de05633d9
Add a "SEPARATOR" token type 2021-09-10 22:15:05 +02:00
664a6a92be
Begin adding transpilation of basic elements 2021-08-22 23:57:18 +02:00
66af9b9e2b
Update a multi-line comment in lexer.cpp 2021-08-18 19:36:30 +02:00
fd6ce35291
Add line numbers to Yerbacon::Exception 2021-08-18 19:31:02 +02:00
e8916cf40f
Move the UNEXPECTED case in lexer.cpp 2021-08-10 14:55:28 +02:00
f4297fe851
Use STRING directly in the getIdentifierCharType() function. 2021-08-10 14:01:20 +02:00
e9ce6362af
Add a DOT token to lex.hpp, and only use the enum characters. 2021-08-10 13:54:50 +02:00
3b991da962
Require Clang 13.0+ in the CMakeLists.txt file, import the tok::type enumeration in lexer.cpp + Parser.hpp, and add [[likely]] attributes to 2 branches of the switch case in lexer.cpp. 2021-08-09 10:58:11 +02:00
2f853fe797
Add unsigned short values to the tok::type enum and move the parseString function to misc.hpp. 2021-08-06 19:12:28 +02:00
328a073d50
Add a "dollar sign" token to lex.hpp and use it in lexer.cpp 2021-08-05 00:03:50 +02:00
905e7e7e82
Add lexing and parsing exceptions and parse = and #= 2021-07-29 17:35:35 +02:00
a222e8a165
Fix the characters placed next to identifiers/numbers being skipped in lexer.cpp. 2021-07-06 14:44:09 +02:00
74a7a5f2f7
Simplify a condition in lexer.cpp 2021-07-06 10:15:30 +02:00
e8c633d545
Save 13 lines in lexer.cpp and remove the longlex boolean variable. 2021-07-06 10:12:37 +02:00
c5d33fd480
Add support for multiple input files 2021-06-10 16:29:54 +02:00
Username404
85c155fc3b
Remove a parameter from the setOutputFileContent function and remove a variable in the main function. 2021-04-24 17:58:12 +02:00
9ade88b6aa
Make the lex function return a value instead of a reference. 2021-04-01 16:20:14 +02:00
c190e308f8
Remove separator tokens, and move a boolean variable. 2021-04-01 15:32:31 +02:00
b37250492a
Don't ask to run as administrator in filefuncs.cpp. 2021-03-30 18:29:40 +02:00
ad7075db7e
Call exit() when the file(s) passed as argument(s) can't be opened. 2021-03-26 13:23:13 +01:00
f32f8abc5c
Remove useless comments in the beginning of each C++ file. 2021-03-17 13:00:22 +01:00
8772be9d5c
Use a switch-case expression instead of an if statement in lexer.cpp. 2021-03-06 13:38:26 +01:00