Skull Custom Language Creator By ZS - Printable Version +- Small Basic Forum (https://litdev.uk/mybb) +-- Forum: Small Basic (https://litdev.uk/mybb/forumdisplay.php?fid=1) +--- Forum: Discussion (https://litdev.uk/mybb/forumdisplay.php?fid=4) +--- Thread: Skull Custom Language Creator By ZS (/showthread.php?tid=38) |
RE: Skull Custom Language Creator By ZS - litdev - 03-15-2024 Hi, for a potentially complex task like this - it is starting to look like writing an IDE. I would first write down a list of all the features needed and then break these down into sub-tasks. Do all this in some detail before writing any code! Then look at any that you are not sure how to do, break these down further and prototype the hardest bits. If these cannot be done, then modify the design accordingly. For example, will it require a text lexer? to identify keywords, comments, literals, commands etc. Since VS is too heavy, there may be other language choices, Java, php etc with much lighter environments with better support, but you cannot decide this until you have a very clear understanding of the requirements. If yoy stick with SB or sVB, then this may limit what is feasible and the design should reflect this as you prototype. RE: Skull Custom Language Creator By ZS - z-s - 03-15-2024 code till now HERE https://www.mediafire.com Can We Make When Selected The Intelnise Will Come Or Else In Next Post I Will Provide Step For 1 Option In Poll And Then Stop This Project Should I Share Improved Code Which Work Upon .ske Files Should I Share Improved Code Which Work Upon .ske Files RE: Skull Custom Language Creator By ZS - litdev - 03-15-2024 I have question on this. If the code below is the final Small Basic code after language conversion and ready to be compiled, then what would your language version be. In other words, what would you type in your language to be converted into the sample below - this would help understanding the scope of the project. I would assume: 1] Comments and string literals ("This is textbox" etc) remain unchanged 2] Variable names (i, box etc) remain unchanged 3] Keywords (Sub, For etc) will be converted 4] Language commands (Controls, AddTextBox, SetTextBoxText etc) will be converted So it is just keywords and language commands, am I missing anything in the plan? The fist programming task therefore would be to identify keywords and language commands in some text. Code: 'Start with a comment RE: Skull Custom Language Creator By ZS - z-s - 03-15-2024 This is not Final But I Will Give You Updated Code Till Tomorrow Which Will Convert All T.SelectAll() a = T.SelectedText b = LDText.Replace(a, "liborop", "res") T.Text = b You Can Simply replace "liborop" with library and "res" with the end result Ex: T.SelectAll() a = T.SelectedText b = LDText.Replace(a, "Mylib.Show", "GraphicsWindow.ShowMessage") T.Text = b after adding to code it can be written like this Mylib.Show("Hello","Litdev") Hope You Get It RE: Skull Custom Language Creator By ZS - AbsoluteBeginner - 03-15-2024 (translated by Google translator) Z-S. I think we will have to use diagrams to understand the structure of your program. Your program will have a lot of elements and connections between them. What do you think about it? RE: Skull Custom Language Creator By ZS - z-s - 03-16-2024 I Am Starting Ske Work In This Project And I Think This Project Will Not End RE: Skull Custom Language Creator By ZS - z-s - 03-16-2024 Guide To Skull Compiled Extension: There Would Be A Main File named Lib.ske Which will store all libraries name,path and summary like this: ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Lib.ske: line1: 2-4 -> this line would show program from which line should start inputting libs Ex: start lib line number - last lib line number line2: Array-This object provides a way of storing more than one value for a given name. These values can be accessed by another index.-Array.Method.ske -> Libname-Summary-Path to lib Method f ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Array.Method.ske: line1: ContainsIndex line2: ContainsValue line3: GetAllIndices line4: GetItemCount line5: GetValue line6: IsArray line7: RemoveValue line8: SetValue till now all work well but how we will Have to format it format it like in sb just litdev please compile this extension and upload it as soon as possible then intelnise work will be also complete llink to Csharp file :https://www.mediafire.com/file/t4rs6zhqbjixzgl/ZSFile.cs/file RE: Skull Custom Language Creator By ZS - litdev - 03-16-2024 Hi ZS, 1] Did you try using the command line csc C# compiler that I described how to use in a previous post. If you want me to help you with this then please start a new thread post for this topic, where we can go through all the steps systematically. 2] Your C# code has various errors that mean it wouldn't work as a SB extension, mostly to do with referencing SmallBasicLibrary and use of Primitive type. 3] It looks like the extension would read selected lines from a file into a single concatenated string with lines deliminated by newline character. Why not just use the existing method File.ReadLine to read required lines into an array. RE: Skull Custom Language Creator By ZS - litdev - 03-16-2024 One other thought... In the samples that I provide with the LitDev extension download is a program called LDxml.sb in the folder other-samples. As an example it parses SmallBasicLibarary.xml. Once read and parsed you could format it any way you want to a file and translate it to have multiple files with identical format, one for each language for easy translation. You could also parse the different language versions of this xml to get translations for the method descriptions (for intellisense). RE: Skull Custom Language Creator By ZS - z-s - 03-16-2024 i want that it read from specific line to specific line |