We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Poll: Chose Option
You do not have permission to vote in this poll.
First Option
0%
0 0%
Second Option
100.00%
2 100.00%
Total 2 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Skull Custom Language Creator By ZS
#11
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.
Reply
#12
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
[-] The following 1 user Likes z-s's post:
  • heloo
Reply
#13
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

Initialise()

Sub Initialise
  For i = 1 To 10
    box[i] = Controls.AddTextBox(25,25*i)
    Controls.SetTextBoxText(box[i],"This is textbox"+i)
  EndFor
EndSub
Reply
#14
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
[-] The following 2 users Like z-s's post:
  • heloo, litdev
Reply
#15
(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?
[-] The following 1 user Likes AbsoluteBeginner's post:
  • z-s
Reply
#16
I Am Starting Ske Work In This Project And I Think This Project Will Not End
[-] The following 1 user Likes z-s's post:
  • heloo
Reply
#17
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
[-] The following 1 user Likes z-s's post:
  • heloo
Reply
#18
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.
[-] The following 1 user Likes litdev's post:
  • stevantosic
Reply
#19
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).

   
[-] The following 1 user Likes litdev's post:
  • stevantosic
Reply
#20
i want that it read from specific line to specific line
[-] The following 1 user Likes z-s's post:
  • heloo
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)