diff --git a/.DS_Store b/.DS_Store index 010a58f..83f1114 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.vs/.DS_Store b/.vs/.DS_Store index f052fc0..ca28d35 100644 Binary files a/.vs/.DS_Store and b/.vs/.DS_Store differ diff --git a/.vs/RuanScript/.DS_Store b/.vs/RuanScript/.DS_Store index d639420..37f625e 100644 Binary files a/.vs/RuanScript/.DS_Store and b/.vs/RuanScript/.DS_Store differ diff --git a/.vs/RuanScript/FileContentIndex/1194550e-7f6e-4d88-8e33-db7cf25db57b.vsidx b/.vs/RuanScript/FileContentIndex/1194550e-7f6e-4d88-8e33-db7cf25db57b.vsidx new file mode 100644 index 0000000..2729691 Binary files /dev/null and b/.vs/RuanScript/FileContentIndex/1194550e-7f6e-4d88-8e33-db7cf25db57b.vsidx differ diff --git a/.vs/RuanScript/FileContentIndex/40c5631a-3656-4a59-b764-cc12ac333b1d.vsidx b/.vs/RuanScript/FileContentIndex/40c5631a-3656-4a59-b764-cc12ac333b1d.vsidx deleted file mode 100644 index 134ac75..0000000 Binary files a/.vs/RuanScript/FileContentIndex/40c5631a-3656-4a59-b764-cc12ac333b1d.vsidx and /dev/null differ diff --git a/.vs/RuanScript/FileContentIndex/43b67983-a083-4aef-a743-e99e70ab866b.vsidx b/.vs/RuanScript/FileContentIndex/43b67983-a083-4aef-a743-e99e70ab866b.vsidx new file mode 100644 index 0000000..64fca4a Binary files /dev/null and b/.vs/RuanScript/FileContentIndex/43b67983-a083-4aef-a743-e99e70ab866b.vsidx differ diff --git a/.vs/RuanScript/FileContentIndex/8eaadea6-3ce4-4a16-99f7-b0fe7848b6a9.vsidx b/.vs/RuanScript/FileContentIndex/68ab54d0-fc45-4ec1-83bf-ce743e841963.vsidx similarity index 81% rename from .vs/RuanScript/FileContentIndex/8eaadea6-3ce4-4a16-99f7-b0fe7848b6a9.vsidx rename to .vs/RuanScript/FileContentIndex/68ab54d0-fc45-4ec1-83bf-ce743e841963.vsidx index 396a80d..f647a01 100644 Binary files a/.vs/RuanScript/FileContentIndex/8eaadea6-3ce4-4a16-99f7-b0fe7848b6a9.vsidx and b/.vs/RuanScript/FileContentIndex/68ab54d0-fc45-4ec1-83bf-ce743e841963.vsidx differ diff --git a/.vs/RuanScript/FileContentIndex/8c99c01d-c952-47f4-ab60-cc1566cf685d.vsidx b/.vs/RuanScript/FileContentIndex/8c99c01d-c952-47f4-ab60-cc1566cf685d.vsidx deleted file mode 100644 index 0e8d3fb..0000000 Binary files a/.vs/RuanScript/FileContentIndex/8c99c01d-c952-47f4-ab60-cc1566cf685d.vsidx and /dev/null differ diff --git a/.vs/RuanScript/copilot-chat/61f2811d/sessions/3258661a-e438-4491-a2bb-14c95abd8c76 b/.vs/RuanScript/copilot-chat/61f2811d/sessions/3258661a-e438-4491-a2bb-14c95abd8c76 new file mode 100644 index 0000000..2cbbcd9 Binary files /dev/null and b/.vs/RuanScript/copilot-chat/61f2811d/sessions/3258661a-e438-4491-a2bb-14c95abd8c76 differ diff --git a/.vs/RuanScript/copilot-chat/61f2811d/sessions/59dedfce-17cc-4786-a774-31ddf2151516 b/.vs/RuanScript/copilot-chat/61f2811d/sessions/59dedfce-17cc-4786-a774-31ddf2151516 new file mode 100644 index 0000000..7e2ce0d Binary files /dev/null and b/.vs/RuanScript/copilot-chat/61f2811d/sessions/59dedfce-17cc-4786-a774-31ddf2151516 differ diff --git a/.vs/RuanScript/copilot-chat/61f2811d/sessions/b94c20c4-b09f-41d6-bf01-213fe139e595 b/.vs/RuanScript/copilot-chat/61f2811d/sessions/b94c20c4-b09f-41d6-bf01-213fe139e595 new file mode 100644 index 0000000..02ac437 Binary files /dev/null and b/.vs/RuanScript/copilot-chat/61f2811d/sessions/b94c20c4-b09f-41d6-bf01-213fe139e595 differ diff --git a/.vs/RuanScript/copilot-chat/61f2811d/sessions/d5b08925-3a04-4f3b-8409-1502f6075ca7 b/.vs/RuanScript/copilot-chat/61f2811d/sessions/d5b08925-3a04-4f3b-8409-1502f6075ca7 new file mode 100644 index 0000000..dc78414 Binary files /dev/null and b/.vs/RuanScript/copilot-chat/61f2811d/sessions/d5b08925-3a04-4f3b-8409-1502f6075ca7 differ diff --git a/.vs/RuanScript/v17/.wsuo b/.vs/RuanScript/v17/.wsuo index f708707..3791840 100644 Binary files a/.vs/RuanScript/v17/.wsuo and b/.vs/RuanScript/v17/.wsuo differ diff --git a/.vs/RuanScript/v17/Browse.VC.db b/.vs/RuanScript/v17/Browse.VC.db index 6bd92d1..2f2ee73 100644 Binary files a/.vs/RuanScript/v17/Browse.VC.db and b/.vs/RuanScript/v17/Browse.VC.db differ diff --git a/.vs/RuanScript/v17/Browse.VC.db-shm b/.vs/RuanScript/v17/Browse.VC.db-shm deleted file mode 100644 index 4f12933..0000000 Binary files a/.vs/RuanScript/v17/Browse.VC.db-shm and /dev/null differ diff --git a/.vs/RuanScript/v17/Browse.VC.db-wal b/.vs/RuanScript/v17/Browse.VC.db-wal deleted file mode 100644 index e69de29..0000000 diff --git a/.vs/RuanScript/v17/Browse.VC.opendb b/.vs/RuanScript/v17/Browse.VC.opendb deleted file mode 100644 index ecf9e09..0000000 Binary files a/.vs/RuanScript/v17/Browse.VC.opendb and /dev/null differ diff --git a/.vs/RuanScript/v17/DocumentLayout.json b/.vs/RuanScript/v17/DocumentLayout.json index d668d5f..8c4b12b 100644 --- a/.vs/RuanScript/v17/DocumentLayout.json +++ b/.vs/RuanScript/v17/DocumentLayout.json @@ -3,8 +3,12 @@ "WorkspaceRootPath": "C:\\Mac\\Home\\Downloads\\RuanScript\\", "Documents": [ { - "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Mac\\Home\\Downloads\\RuanScript\\input\\A12.bat||{3B902123-F8A7-4915-9F01-361F908088D0}", - "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:input\\A12.bat||{3B902123-F8A7-4915-9F01-361F908088D0}" + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Mac\\Home\\Downloads\\RuanScript\\code\\Reader.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:code\\Reader.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}" } ], "DocumentGroupContainers": [ @@ -19,14 +23,27 @@ { "$type": "Document", "DocumentIndex": 0, - "Title": "A12.bat", - "DocumentMoniker": "C:\\Mac\\Home\\Downloads\\RuanScript\\input\\A12.bat", - "RelativeDocumentMoniker": "input\\A12.bat", - "ToolTip": "C:\\Mac\\Home\\Downloads\\RuanScript\\input\\A12.bat", - "RelativeToolTip": "input\\A12.bat", - "ViewState": "AQIAAD0AAAAAmpmZmZkewFMAAAAAAAAA", - "Icon": "00000000-0000-0000-0000-000000000000.000000|iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAMDSURBVFhH7ZVbSNNRHMe/C\u002BcNdOrU7OIlSc1LpeWltIt2EUyMokDKjMiHCMosi6UUJtEFgrKXHnrtyYeKqAwiC0pBXWYTN10asxQ056R20/X/b\u002Bv8j0eJcG5zpQ/5gbNz2e/w\u002B/x/5/w3LCh2u52NFlk4RFWy83dIXzE5nXfqlpCPf568sGjfjD2hQqiAvfbqdTafX2ouV0OowILitoCq7wuev2nBq\u002BZ2cDzPVueOSwI8SaQ3mul46JsOVqsVJpMZo2M/wHE8RnTf6XdzwSWBd/IuvG1ToLGpHUaTiQoIra1DiWeNTXjd1IaR0TEW7R5OBYa1YzCZzbCRhAby1FablY4FgYmfFlgsFtjIWnevhu1wD6cC0uBAhEmDwNOkPCJCpdibvxUZ6xNh5SdF/Hx8sDZxNdvhHk4FxF5eSIiNmn7qZUuldC0mcjmdCy0sNAghQRK2wz2cCpjME2iWK2giodSdqk\u002B03PKPXVRKaOq\u002BfijVvWyHezgXGB\u002BHwWiiyQUJvcFIkyvVn\u002Bl9mBLTzvFNcCoQLg1GcnwsfMk5ryJlp0dBXkuhD5IEIHJFBPx9fZFEYlo7FBgcGmY7XcOpgIBwwfYX5CE7IxWSwIDps9\u002B8cR3yc3NQcrAImq8DeFD/ELfv3ad7zOZx2jvDi/Uuk5ayBpqBQdhtdnIhw/H4xUu0vu8gQjx4joOFHFnNjVvQjmghO1eO6MiVbOfMuFSB34kmx5CbnYm8LVl03iL/AIPBAG\u002BxGEeLD2BTeho0/f3Q6/VQdffQmNlwW\u002BBPykqKyU81h6wNqcjOTEdZ6WEESySIj4tFQf4uFuUYjwXqHz2hpe/uUWNUp6NPPTw0hE5FJ542NLAox3gs4OMthpUIdClVOF0pQ\u002B21m\u002BQt4egfmL\u002BfP4tyjMcCx48cguxsOXbv2M4Sc7hyqRpVFyqxMy\u002BXRTnGY4FQaQgSE\u002BKwLSebtmOlJUhJTkJWZgaLmB2PBaaIiY7CqZMnUFS4h624xl8TmCuii7LKOhFEZ9h8XrFDdJcNF/lvAX4BFPtSJL7S3gcAAAAASUVORK5CYII=", - "WhenOpened": "2024-06-12T19:10:43.661Z", + "Title": "Reader.c", + "DocumentMoniker": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\Reader.c", + "RelativeDocumentMoniker": "code\\Reader.c", + "ToolTip": "C:\\Mac\\Home\\Downloads\\RuanScript\\code\\Reader.c", + "RelativeToolTip": "code\\Reader.c", + "ViewState": "AQIAANMAAAAAAAAAAAAWwOkAAAAAAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000423|", + "WhenOpened": "2024-06-13T16:55:18.632Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "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": "AQIAAAEAAACazMzMzIwjwAkAAAAIAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2024-06-12T20:34:20.187Z", "EditorCaption": "" } ] diff --git a/.vs/RuanScript/v17/Solution.VC.db b/.vs/RuanScript/v17/Solution.VC.db new file mode 100644 index 0000000..c9689c7 Binary files /dev/null and b/.vs/RuanScript/v17/Solution.VC.db differ diff --git a/.vs/RuanScript/v17/ipch/AutoPCH/52c9afbe93b57e0d/READER.ipch b/.vs/RuanScript/v17/ipch/AutoPCH/52c9afbe93b57e0d/READER.ipch index ee630df..3c41b3a 100644 Binary files a/.vs/RuanScript/v17/ipch/AutoPCH/52c9afbe93b57e0d/READER.ipch and b/.vs/RuanScript/v17/ipch/AutoPCH/52c9afbe93b57e0d/READER.ipch differ diff --git a/.vs/RuanScript/v17/ipch/AutoPCH/8f753891a3e0c6f0/MAINREADER.ipch b/.vs/RuanScript/v17/ipch/AutoPCH/8f753891a3e0c6f0/MAINREADER.ipch new file mode 100644 index 0000000..0b5eeb5 Binary files /dev/null and b/.vs/RuanScript/v17/ipch/AutoPCH/8f753891a3e0c6f0/MAINREADER.ipch differ diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json index 0326811..1c1bf29 100644 --- a/.vs/VSWorkspaceState.json +++ b/.vs/VSWorkspaceState.json @@ -2,7 +2,10 @@ "ExpandedNodes": [ "", "\\code", + "\\code\\.idea", + "\\code\\out", "\\input" ], + "SelectedNode": "\\code\\Reader.c", "PreviewInSolutionExplorer": false } \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index 60b5c6b..56fea89 100644 Binary files a/.vs/slnx.sqlite and b/.vs/slnx.sqlite differ diff --git a/code/Reader.c b/code/Reader.c index fdb0498..562d6d1 100644 --- a/code/Reader.c +++ b/code/Reader.c @@ -84,6 +84,7 @@ BufferPointer readerCreate(Rs_intg size, Rs_intg increment, Rs_intg mode) { BufferPointer readerPointer; /* TO_DO: Defensive programming */ + /* Defensive programming: Check for invalid size or increment */ if (size < 0 || increment < 0) { return NULL; } @@ -91,6 +92,18 @@ BufferPointer readerCreate(Rs_intg size, Rs_intg increment, Rs_intg mode) { readerPointer = (BufferPointer)calloc(1, sizeof(Buffer)); if (!readerPointer) return NULL; + if (size != 0) + readerPointer->size = size; + else + readerPointer->size = READER_DEFAULT_SIZE; + if (increment != 0) + readerPointer->increment = increment; + else + readerPointer->increment = READER_DEFAULT_INCREMENT; + if (mode == MODE_ADDIT || mode == MODE_FIXED || mode == MODE_MULTI) + readerPointer->mode = mode; + else + readerPointer->mode = MODE_FIXED; readerPointer->content = (Rs_string)malloc(size); /* TO_DO: Defensive programming */ @@ -102,18 +115,6 @@ BufferPointer readerCreate(Rs_intg size, Rs_intg increment, Rs_intg mode) { for(int i =0; i < NCHAR; i++) readerPointer->histogram[i] = 0; - if (size != 0) - readerPointer->size = size; - else - readerPointer->size = READER_DEFAULT_SIZE; - if (increment!= 0) - readerPointer->increment = increment; - else - readerPointer->increment = READER_DEFAULT_INCREMENT; - if (mode == MODE_ADDIT || mode == MODE_FIXED || mode == MODE_MULTI) - readerPointer->increment = increment; - else - readerPointer->increment = MODE_FIXED; /* TO_DO: Initialize flags */ readerPointer->flags = READER_DEFAULT_FLAG; /* TO_DO: The created flag must be signalized as EMP */ @@ -145,13 +146,18 @@ BufferPointer readerCreate(Rs_intg size, Rs_intg increment, Rs_intg mode) { */ BufferPointer readerAddChar(BufferPointer const readerPointer, Rs_char ch) { - // Rs_string tempReader = NULL; to be used later - // Rs_intg newSize = 0; to be used later + Rs_string tempReader = NULL; + Rs_intg newSize = 0; /* TO_DO: Defensive programming */ + /* Defensive programming: Check if readerPointer is NULL */ + if (!readerPointer) { + return NULL; + } /* TO_DO: Reset Realocation */ /* TO_DO: Test the inclusion of chars */ if (readerPointer->position.wrte * (Rs_intg)sizeof(Rs_char) < readerPointer->size) { /* TO_DO: This buffer is NOT full */ + readerPointer->content[readerPointer->position.wrte++] = ch; } else { /* TO_DO: Reset Full flag */ switch (readerPointer->mode) { @@ -194,6 +200,10 @@ BufferPointer readerAddChar(BufferPointer const readerPointer, Rs_char ch) { */ Rs_boln readerClear(BufferPointer const readerPointer) { /* TO_DO: Defensive programming */ + /* Defensive programming: Check if readerPointer is NULL */ + if (!readerPointer) { + return FALSE; + } /* TO_DO: Adjust flags original */ readerPointer->position.wrte = readerPointer->position.mark = readerPointer->position.read = 0; return TRUE; @@ -215,7 +225,14 @@ Rs_boln readerClear(BufferPointer const readerPointer) { */ Rs_boln readerFree(BufferPointer const readerPointer) { /* TO_DO: Defensive programming */ + /* Defensive programming: Check if readerPointer is NULL */ + if (!readerPointer) { + return FALSE; + } /* TO_DO: Free pointers */ + free(readerPointer->content); + free(readerPointer); + //readerPointer = NULL; return TRUE; } @@ -235,6 +252,9 @@ Rs_boln readerFree(BufferPointer const readerPointer) { */ Rs_boln readerIsFull(BufferPointer const readerPointer) { /* TO_DO: Defensive programming */ + if (!readerPointer) { + return FALSE; + } /* TO_DO: Check flag if buffer is FUL */ return FALSE; } @@ -256,6 +276,9 @@ Rs_boln readerIsFull(BufferPointer const readerPointer) { */ Rs_boln readerIsEmpty(BufferPointer const readerPointer) { /* TO_DO: Defensive programming */ + if (!readerPointer) { + return FALSE; + } /* TO_DO: Check flag if buffer is EMP */ return FALSE; } @@ -519,8 +542,11 @@ Rs_intg readerGetPosWrte(BufferPointer const readerPointer) { */ Rs_intg readerGetPosMark(BufferPointer const readerPointer) { /* TO_DO: Defensive programming */ + if (!readerPointer) { + return READER_ERROR; + } /* TO_DO: Return mark */ - return 0; + return readerPointer->position.mark; } @@ -580,8 +606,11 @@ Rs_intg readerGetInc(BufferPointer const readerPointer) { */ Rs_intg readerGetMode(BufferPointer const readerPointer) { /* TO_DO: Defensive programming */ + if (!readerPointer) { + return READER_ERROR; + } /* TO_DO: Return mode */ - return 0; + return readerPointer->mode; } @@ -624,7 +653,23 @@ Rs_byte readerGetFlags(BufferPointer const readerPointer) { */ Rs_void readerPrintStat(BufferPointer const readerPointer) { /* TO_DO: Defensive programming */ + /* Defensive programming: Check if readerPointer is NULL */ + if(!readerPointer){ + fprintf(stderr, "Error: readerPointer is NULL\n"); + return; + } + /* Defensive programming: Check if histogram is valid */ + if (!readerPointer->histogram) { + fprintf(stderr, "Error: histogram is NULL\n"); + return; + } /* TO_DO: Print the histogram */ + for(int i = 0; i < NCHAR; i++){ + if(readerPointer->histogram[i] > 0){ + printf("Char: %c - Frequency: %d\n", i, readerPointer->histogram[i]); + } + } + } /* diff --git a/code/launch.vs.json b/code/launch.vs.json index 50920ff..d827aa3 100644 --- a/code/launch.vs.json +++ b/code/launch.vs.json @@ -7,15 +7,16 @@ "name": "Compiler.exe", "args": [ "r", - "C:/Mac/Home/Downloads/RuanScript/input/test.rs", - "C:/Mac/Home/Downloads/RuanScript/input/INPUT0_Empty.rs", - "C:/Mac/Home/Downloads/RuanScript/input/INPUT1_Hello.rs", - "C:/Mac/Home/Downloads/RuanScript/input/INPUT2_Volume.rs", - "C:/Mac/Home/Downloads/RuanScript/input/INPUT3_Factorial.rs", - "C:/Mac/Home/Downloads/RuanScript/input/INPUT4_Datatypes.rs", - "C:/Mac/Home/Downloads/RuanScript/input/INPUT5_General.rs", - "C:/Mac/Home/Downloads/RuanScript/input/INPUT6_Big.rs", - "C:/Mac/Home/Downloads/RuanScript/input/README.txt" + "C:/Mac/Home/Downloads/RuanScript/input/test.rs", + // "C:/Mac/Home/Downloads/RuanScript/input/INPUT0_Empty.rs", + // "C:/Mac/Home/Downloads/RuanScript/input/INPUT1_Hello.rs", + // "C:/Mac/Home/Downloads/RuanScript/input/INPUT2_Volume.rs", + // "C:/Mac/Home/Downloads/RuanScript/input/INPUT3_Factorial.rs", + // "C:/Mac/Home/Downloads/RuanScript/input/INPUT4_Datatypes.rs", + // "C:/Mac/Home/Downloads/RuanScript/input/INPUT5_General.rs", + // "C:/Mac/Home/Downloads/RuanScript/input/INPUT6_Big.rs", + // "C:/Mac/Home/Downloads/RuanScript/input/README.txt", + // "C:/Mac/Home/Downloads/RuanScript/input/INPUT7_Error.rs" ] } diff --git a/code/out/build/x64-Debug/.cmake/api/v1/reply/index-2024-06-12T19-26-44-0208.json b/code/out/build/x64-Debug/.cmake/api/v1/reply/index-2024-06-13T16-47-28-0628.json similarity index 100% rename from code/out/build/x64-Debug/.cmake/api/v1/reply/index-2024-06-12T19-26-44-0208.json rename to code/out/build/x64-Debug/.cmake/api/v1/reply/index-2024-06-13T16-47-28-0628.json diff --git a/code/out/build/x64-Debug/.ninja_deps b/code/out/build/x64-Debug/.ninja_deps index 7073157..9ea561c 100644 Binary files a/code/out/build/x64-Debug/.ninja_deps and b/code/out/build/x64-Debug/.ninja_deps differ diff --git a/code/out/build/x64-Debug/.ninja_log b/code/out/build/x64-Debug/.ninja_log index 0b4667f..04952d0 100644 --- a/code/out/build/x64-Debug/.ninja_log +++ b/code/out/build/x64-Debug/.ninja_log @@ -2,5 +2,43 @@ 15 185 7394924388314107 CMakeFiles/Compiler.dir/Compilers.c.obj 415acfa213439be1 22 861 7394976581353249 CMakeFiles/Compiler.dir/Reader.c.obj a4c8113ae2b0e945 28 205 7394924388505498 CMakeFiles/Compiler.dir/MainReader.c.obj a8187c3450edeeda -14 379 7399236037962701 build.ninja 10add4a6052b72f8 +14 379 7400004486892868 build.ninja 10add4a6052b72f8 865 1439 7394976586503191 Compiler.exe 60774a4753864fbb +19 1111 7400010507894955 CMakeFiles/Compiler.dir/Reader.c.obj a4c8113ae2b0e945 +1114 2294 7400010516598619 Compiler.exe 60774a4753864fbb +16 49 0 clean 3807ae1e948da024 +17 145 7400012280477514 CMakeFiles/Compiler.dir/Compilers.c.obj 415acfa213439be1 +24 151 7400012280548421 CMakeFiles/Compiler.dir/Reader.c.obj a4c8113ae2b0e945 +30 167 7400012280747799 CMakeFiles/Compiler.dir/MainReader.c.obj a8187c3450edeeda +169 558 7400012283816512 Compiler.exe 60774a4753864fbb +13 39 0 clean 3807ae1e948da024 +19 150 7400012502078950 CMakeFiles/Compiler.dir/Compilers.c.obj 415acfa213439be1 +29 166 7400012502253735 CMakeFiles/Compiler.dir/Reader.c.obj a4c8113ae2b0e945 +36 183 7400012502406911 CMakeFiles/Compiler.dir/MainReader.c.obj a8187c3450edeeda +184 579 7400012505447596 Compiler.exe 60774a4753864fbb +18 154 7400013086268399 CMakeFiles/Compiler.dir/Reader.c.obj a4c8113ae2b0e945 +158 492 7400013089065941 Compiler.exe 60774a4753864fbb +18 429 7400024758218857 CMakeFiles/Compiler.dir/Reader.c.obj a4c8113ae2b0e945 +433 801 7400024761226538 Compiler.exe 60774a4753864fbb +20 456 7400031727550684 CMakeFiles/Compiler.dir/Reader.c.obj a4c8113ae2b0e945 +462 844 7400031730642286 Compiler.exe 60774a4753864fbb +22 162 7400032588618450 CMakeFiles/Compiler.dir/Reader.c.obj a4c8113ae2b0e945 +165 492 7400032591301376 Compiler.exe 60774a4753864fbb +28 183 7400035388987964 CMakeFiles/Compiler.dir/Reader.c.obj a4c8113ae2b0e945 +187 663 7400035392898356 Compiler.exe 60774a4753864fbb +21 149 7400035592687588 CMakeFiles/Compiler.dir/Reader.c.obj a4c8113ae2b0e945 +152 544 7400035595852784 Compiler.exe 60774a4753864fbb +22 171 7400036683069618 CMakeFiles/Compiler.dir/Reader.c.obj a4c8113ae2b0e945 +175 557 7400036686167707 Compiler.exe 60774a4753864fbb +16 49 0 clean 3807ae1e948da024 +18 179 7400038397713804 CMakeFiles/Compiler.dir/Compilers.c.obj 415acfa213439be1 +27 196 7400038397839743 CMakeFiles/Compiler.dir/Reader.c.obj a4c8113ae2b0e945 +34 210 7400038398014622 CMakeFiles/Compiler.dir/MainReader.c.obj a8187c3450edeeda +213 651 7400038401545536 Compiler.exe 60774a4753864fbb +18 158 7400041344381313 CMakeFiles/Compiler.dir/Reader.c.obj a4c8113ae2b0e945 +161 525 7400041347392272 Compiler.exe 60774a4753864fbb +14 41 0 clean 3807ae1e948da024 +19 157 7400043843172586 CMakeFiles/Compiler.dir/Compilers.c.obj 415acfa213439be1 +33 171 7400043843312456 CMakeFiles/Compiler.dir/MainReader.c.obj a8187c3450edeeda +17 150 7400044606921288 CMakeFiles/Compiler.dir/Reader.c.obj a4c8113ae2b0e945 +153 520 7400044609840306 Compiler.exe 60774a4753864fbb diff --git a/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/Compilers.c.obj b/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/Compilers.c.obj index ba64177..44f2268 100644 Binary files a/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/Compilers.c.obj and b/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/Compilers.c.obj differ diff --git a/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/MainReader.c.obj b/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/MainReader.c.obj index 4d3d45b..06ba2e4 100644 Binary files a/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/MainReader.c.obj and b/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/MainReader.c.obj differ diff --git a/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/Reader.c.obj b/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/Reader.c.obj index d1497ee..c495239 100644 Binary files a/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/Reader.c.obj and b/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/Reader.c.obj differ diff --git a/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/vc140.pdb b/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/vc140.pdb index bb9c98e..a351f09 100644 Binary files a/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/vc140.pdb and b/code/out/build/x64-Debug/CMakeFiles/Compiler.dir/vc140.pdb differ diff --git a/code/out/build/x64-Debug/Compiler.exe b/code/out/build/x64-Debug/Compiler.exe index 1639d72..3339381 100644 Binary files a/code/out/build/x64-Debug/Compiler.exe and b/code/out/build/x64-Debug/Compiler.exe differ diff --git a/code/out/build/x64-Debug/Compiler.ilk b/code/out/build/x64-Debug/Compiler.ilk index d2d5182..5ebd9ed 100644 Binary files a/code/out/build/x64-Debug/Compiler.ilk and b/code/out/build/x64-Debug/Compiler.ilk differ diff --git a/code/out/build/x64-Debug/Compiler.pdb b/code/out/build/x64-Debug/Compiler.pdb index 0691cff..c5ac16f 100644 Binary files a/code/out/build/x64-Debug/Compiler.pdb and b/code/out/build/x64-Debug/Compiler.pdb differ diff --git a/code/out/build/x64-Debug/Testing/Temporary/LastTest.log b/code/out/build/x64-Debug/Testing/Temporary/LastTest.log index 0470168..b0e80fc 100644 --- a/code/out/build/x64-Debug/Testing/Temporary/LastTest.log +++ b/code/out/build/x64-Debug/Testing/Temporary/LastTest.log @@ -1,3 +1,3 @@ -Start testing: Jun 12 15:26 Eastern Daylight Time +Start testing: Jun 13 12:47 Eastern Daylight Time ---------------------------------------------------------- -End testing: Jun 12 15:26 Eastern Daylight Time +End testing: Jun 13 12:47 Eastern Daylight Time diff --git a/input/INPUT1_Hello.rs b/input/INPUT1_Hello.rs index 8a403a7..88f8a4c 100644 --- a/input/INPUT1_Hello.rs +++ b/input/INPUT1_Hello.rs @@ -1,6 +1,4 @@ -# Rs Example 2: - The program is "lexically" correct - and should not generate any error # +# Rs Example 2: The program is "lexically" correctand should not generate any error # main& { data { } diff --git a/input/INPUT7_Error.rs b/input/INPUT7_Error.rs new file mode 100644 index 0000000..003a003 --- /dev/null +++ b/input/INPUT7_Error.rs @@ -0,0 +1,9 @@ +main& { + data { + Rs_intg number; // Define a variable without initialization + } + code { + number = 10; + print&('The number is: ' + number); + } +}