Author Topic: Parsers  (Read 3441 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Parsers
« on: April 26, 2005, 05:23:32 PM »
chemistry still seems boring for me, hell maybe because the unboardem parts of my brain are currently buisy handling double side output errays?

Got to love the below , sry to mutch exsity to paste it

Quote
'{Used for Translation into dna or pb user code
Private Function lookup(inp As String) As String
Dim words(25) As String
words(0) = "turnleft"
words(1) = "turnright"
words(2) = "turnstop"
words(3) = "moveforward"
...
words(23) = "extract"
words(24) = "skip"
words(25) = "repeat"
'{the mother of all lookup codes
If inp = CStr(Val(inp)) Then
 lookup = words(inp)
Else
 For I = 0 To 25
  If words(I) = inp Then lookup = I
 Next
End If
'}
End Function

Very nice and all that, but what the heck has it got to do with Biology. This is a biology forum y'know!  :angry:
PY
« Last Edit: April 28, 2005, 03:27:43 PM by PurpleYouko »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Parsers
« Reply #1 on: April 26, 2005, 05:56:06 PM »
huh?

Talk about random.  Where are you going with this one?

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Parsers
« Reply #2 on: April 26, 2005, 06:04:21 PM »
That one is used to translate text into binary and binary into text in one shot , its for the compile and the get-source-code parts. and formating (witch is basicaly part of compile)

I have my own "cool" dna editor for PB , I thought you found it already Num
« Last Edit: April 26, 2005, 06:05:00 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Parsers
« Reply #3 on: April 26, 2005, 06:07:25 PM »
That's pretty standard for any kind of compiler.  If it's the first one you've done, congradulations.  I remember the first script compiler I wrote...  sniff, such memories.

Hardly revolutionary though.  Have you looked at how DB parses DNA?  Now there's a mind blower.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Parsers
« Reply #4 on: April 28, 2005, 02:01:33 PM »
Did you find the help menu hiddin in there, if you turn on "autoformat" checkbox and backclick on the textbox; I still did not do the execution codes so the only way to understand what each function and logic subrotine does is to read that help stuff.

And thx, It was my first compilor that I actualy posted on the web , thats for sure.

I rimember the good old days that I was actualy incoding codes directly as binary in an *.ini file, thought: why bother with compilors? Things change, Things change.