Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New fix #31

Merged
merged 6 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
Binary file modified .vs/.DS_Store
Binary file not shown.
Binary file modified .vs/RuanScript/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .vs/RuanScript/v17/.wsuo
Binary file not shown.
Binary file modified .vs/RuanScript/v17/Browse.VC.db
Binary file not shown.
Binary file modified .vs/RuanScript/v17/Browse.VC.db-shm
Binary file not shown.
120 changes: 86 additions & 34 deletions .vs/RuanScript/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,29 @@
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Mac\\Home\\Downloads\\RuanScript\\code\\Scanner.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:code\\Scanner.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Mac\\Home\\Downloads\\RuanScript\\code\\launch.vs.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:code\\launch.vs.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Mac\\Home\\Downloads\\RuanScript\\code\\MainScanner.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:code\\MainScanner.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Mac\\Home\\Downloads\\RuanScript\\code\\launch.vs.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:code\\launch.vs.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}"
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Mac\\Home\\Downloads\\RuanScript\\input\\INPUT2_Volume.rs||{3B902123-F8A7-4915-9F01-361F908088D0}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:input\\INPUT2_Volume.rs||{3B902123-F8A7-4915-9F01-361F908088D0}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Mac\\Home\\Downloads\\RuanScript\\code\\Parser.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:code\\Parser.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Mac\\Home\\Downloads\\RuanScript\\code\\Scanner.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:code\\Scanner.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Mac\\Home\\Downloads\\RuanScript\\code\\MainParser.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:code\\MainParser.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Mac\\Home\\Downloads\\RuanScript\\code\\Parser.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:code\\Parser.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
}
],
"DocumentGroupContainers": [
Expand All @@ -26,21 +38,8 @@
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 1,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "launch.vs.json",
"DocumentMoniker": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\launch.vs.json",
"RelativeDocumentMoniker": "code\\launch.vs.json",
"ToolTip": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\launch.vs.json",
"RelativeToolTip": "code\\launch.vs.json",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAkAAAAIAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|",
"WhenOpened": "2024-07-19T17:07:01.732Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
Expand All @@ -49,34 +48,87 @@
"RelativeDocumentMoniker": "code\\Scanner.c",
"ToolTip": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\Scanner.c",
"RelativeToolTip": "code\\Scanner.c",
"ViewState": "AQIAAG4BAAAAAAAAAAAWwHoBAAAAAAAA",
"ViewState": "AQIAAA8DAAAAAAAAAAAWwBsDAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000423|",
"WhenOpened": "2024-07-11T00:32:22.071Z",
"WhenOpened": "2024-07-30T17:58:27.125Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "MainScanner.c",
"DocumentMoniker": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\MainScanner.c",
"RelativeDocumentMoniker": "code\\MainScanner.c",
"ToolTip": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\MainScanner.c",
"RelativeToolTip": "code\\MainScanner.c",
"ViewState": "AQIAAJgAAAAAAAAAAAAWwKQAAAACAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000423|",
"WhenOpened": "2024-07-30T17:45:29.273Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "Scanner.h",
"DocumentMoniker": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\Scanner.h",
"RelativeDocumentMoniker": "code\\Scanner.h",
"ToolTip": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\Scanner.h",
"RelativeToolTip": "code\\Scanner.h",
"ViewState": "AQIAAJ8BAAAAZ2ZmZiYrwK8BAAAAAAAA",
"Title": "INPUT2_Volume.rs",
"DocumentMoniker": "C:\\Mac\\Home\\Downloads\\RuanScript\\input\\INPUT2_Volume.rs",
"RelativeDocumentMoniker": "input\\INPUT2_Volume.rs",
"ToolTip": "C:\\Mac\\Home\\Downloads\\RuanScript\\input\\INPUT2_Volume.rs",
"RelativeToolTip": "input\\INPUT2_Volume.rs",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAEAAAAVAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|",
"WhenOpened": "2024-07-30T17:21:27.813Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 6,
"Title": "Parser.h",
"DocumentMoniker": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\Parser.h",
"RelativeDocumentMoniker": "code\\Parser.h",
"ToolTip": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\Parser.h",
"RelativeToolTip": "code\\Parser.h",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
"WhenOpened": "2024-07-10T02:29:02.968Z"
"WhenOpened": "2024-07-30T17:05:17.62Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "Parser.c",
"DocumentMoniker": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\Parser.c",
"RelativeDocumentMoniker": "code\\Parser.c",
"ToolTip": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\Parser.c",
"RelativeToolTip": "code\\Parser.c",
"ViewState": "AQIAAFgAAAAAAAAAAAAWwGQAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000423|",
"WhenOpened": "2024-07-30T17:05:15.256Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "MainScanner.c",
"DocumentMoniker": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\MainScanner.c",
"RelativeDocumentMoniker": "code\\MainScanner.c",
"ToolTip": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\MainScanner.c",
"RelativeToolTip": "code\\MainScanner.c",
"ViewState": "AQIAAJgAAAAAAAAAAAAWwKQAAAAAAAAA",
"Title": "launch.vs.json",
"DocumentMoniker": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\launch.vs.json",
"RelativeDocumentMoniker": "code\\launch.vs.json",
"ToolTip": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\launch.vs.json",
"RelativeToolTip": "code\\launch.vs.json",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAIAAAAEAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|",
"WhenOpened": "2024-07-19T17:07:01.732Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "MainParser.c",
"DocumentMoniker": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\MainParser.c",
"RelativeDocumentMoniker": "code\\MainParser.c",
"ToolTip": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\MainParser.c",
"RelativeToolTip": "code\\MainParser.c",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000423|",
"WhenOpened": "2024-07-10T02:26:40.089Z",
"WhenOpened": "2024-07-30T17:05:20.854Z",
"EditorCaption": ""
}
]
Expand Down
Binary file modified .vs/RuanScript/v17/ipch/AutoPCH/52c9afbe93b57e0d/READER.ipch
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .vs/RuanScript/v17/ipch/AutoPCH/c8e4fd7d876001ca/SCANNER.ipch
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"ExpandedNodes": [
"",
"\\code",
"\\code\\out",
"\\input"
],
"SelectedNode": "\\input",
Expand Down
Binary file modified .vs/cmake.db
Binary file not shown.
Binary file modified .vs/slnx.sqlite
Binary file not shown.
Binary file modified code/.DS_Store
Binary file not shown.
3 changes: 1 addition & 2 deletions code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ add_executable (Compiler
"Compilers.h" "Compilers.c"
"Reader.h" "Reader.c" "MainReader.c"
"MainScanner.c" "Scanner.c" "Scanner.h"

#"MainParser.c" "Parser.c" "Parser.h"
"MainParser.c" "Parser.c" "Parser.h"
# TO_DO: Add A22 (Scanner) and A32 (Parser)
)

Expand Down
76 changes: 51 additions & 25 deletions code/Compilers.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Rs_intg main(int argc, char** argv) {
break;
case PGM_PARSER:
printf("%s%c%s", "\n[Option '", PGM_PARSER, "': Starting PARSER .....]\n\n");
// mainParser(argc, argv);
mainParser(argc, argv);
break;
default:
printf("%s%c%s%c%s%c%s", "* OPTIONS:\n- [",
Expand Down Expand Up @@ -130,32 +130,58 @@ Rs_intg main(int argc, char** argv) {
/* TO_DO: Update your logo with your own language message */

Rs_void printLogo() {
printf("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
"\t=---------------------------------------=\n",
"\t| COMPILERS - ALGONQUIN COLLEGE (S24) |\n",
"\t=---------------------------------------=\n",
"\t @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n",
"\t @@ @@ \n",
"\t @@ %&@@@@@@@@@@@ @@ \n",
"\t @@ @%% (@@@@@@@@@ @ @@ \n",
"\t @@ @& @ @ @ @ @@ \n",
"\t @@ @ @ % / / @@@@@@ @@ \n",
"\t @@ & @ @ @@ @@ \n",
"\t @@ @/ @*@ @ @ @ @@ \n",
"\t @@ @@@@ @@ @ @ @@ \n",
"\t @@ /@@ @@@ @ @@ \n",
"\t @@ @ / / @@ @ @@ \n",
"\t @@ @ @@ /@/ @@@ @ @@ \n",
"\t @@ @@@@@@@@@@@@@@@ @@ \n",
"\t @@ @@ \n",
"\t @@ RUANSCRIPT @@ \n",
"\t @@ @@ \n",
"\t @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n",
"\t \n",
"\t[READER SCRIPT .........................]\n",
const char *logo =
"\t=-------------------------------------------------------------------------=\n"
"\t| COMPILERS - ALGONQUIN COLLEGE (S24) |\n"
"\t=-------------------------------------------------------------------------=\n"
"\t _..-'( RUANSCRIPT )`-.._\n"
"\t ./'. '||\\. (\\_/) .//||` .`\\.\n"
"\t ./'.|'.'||||\\\\|.. )O O( ..|//||||.`|.`\\.\n"
"\t ./'..|'.|| |||||\\`````` '`\"'` ''''''/||||| ||.`|..`\\.\n"
"\t ./'.||'.|||| ||||||||||||. .|||||||||||| |||||.`||.`\\.\n"
"\t /'|||'.|||||| ||||||||||||{ }|||||||||||| ||||||.`|||`\\.\n"
"\t '.|||'.||||||| ||||||||||||{ }|||||||||||| |||||||.`|||.`\n"
"\t '.||| ||||||||| |/' ``\\||`` ''||/'' `\\| ||||||||| |||.`\n"
"\t |/' \\./' `\\./ \\!|\\ /|!/ \\./' `\\./ `\\|\n"
"\t V V V }' `\\ /' `{ V V V\n"
"\t ` ` ` V ' ' '\n"
"\t \n"
);
"\t[READER SCRIPT .............................................................]\n"
"\t \n";

printf("%s", logo);
}




// Rs_void printLogo() {
// printf("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
// "\t=---------------------------------------=\n",
// "\t| COMPILERS - ALGONQUIN COLLEGE (S24) |\n",
// "\t=---------------------------------------=\n",
// "\t @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n",
// "\t @@ @@ \n",
// "\t @@ %&@@@@@@@@@@@ @@ \n",
// "\t @@ @%% (@@@@@@@@@ @ @@ \n",
// "\t @@ @& @ @ @ @ @@ \n",
// "\t @@ @ @ % / / @@@@@@ @@ \n",
// "\t @@ & @ @ @@ @@ \n",
// "\t @@ @/ @*@ @ @ @ @@ \n",
// "\t @@ @@@@ @@ @ @ @@ \n",
// "\t @@ /@@ @@@ @ @@ \n",
// "\t @@ @ / / @@ @ @@ \n",
// "\t @@ @ @@ /@/ @@@ @ @@ \n",
// "\t @@ @@@@@@@@@@@@@@@ @@ \n",
// "\t @@ @@ \n",
// "\t @@ RUANSCRIPT @@ \n",
// "\t @@ @@ \n",
// "\t @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n",
// "\t \n",
// "\t[READER SCRIPT .........................]\n",
// "\t \n"
// );
// }



2 changes: 1 addition & 1 deletion code/Compilers.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Rs_intg mainReader(Rs_intg argc, Rs_string* argv);
TO_DO: Include later mainScaner (A22) and mainParser (A32)
*/
Rs_intg mainScanner(Rs_intg argc, Rs_string* argv);
// Rs_intg mainParser(Rs_intg argc, Rs_string* argv);
Rs_intg mainParser(Rs_intg argc, Rs_string* argv);

Rs_void printLogo();

Expand Down
Binary file modified code/Compilers.o
Binary file not shown.
Loading