Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25

Thread: Tokenizer- user-keys, but how ???

  1. #21
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Will see what I can do, but pretty sure I can do almost all with cTokenizer module class
    Using a module class let me encapsulate all options under a single instance of the class without interference with the rest of the module.


    I think I will change .PosStart and .PosEnd to a more esplicative .ByteStart and .ByteEnd
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  2. #22
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,529
    Rep Power
    170
    ...err, the Byte(-Start and also Line) - idea i had too but in another sense:

    Long lStart ' should be in range 1 to Strptrlen(Strptr(sText)) 
    Long lLine  ' should be in range 1 to ParseCount(sText, $CRLF)
    
    myParser.Scan(sText, Byte lStart) ' Byte option to tell the parser to start scanning at Byte lStart
    myParser.Scan(sText, Line lLine ) ' Line option to scan desired line only
    
    Have time for a very small idea?
    check this:
    http://www.thinbasic.com/community/s...2320#post92320
    Last edited by ReneMiner; 25-11-2015 at 12:33.
    I think there are missing some Forum-sections as beta-testing and support

  3. #23
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Eros,

    thanks a lot for the explanations, now I understand, very practical!
    I like the new functions, thanks a lot for them!

    One wish - could ToString be added for SubType as well? There is a string specified during the NewSubType, so could be returned this way.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  4. #24
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Petr,

    actually there is not string we can specify on SubType information in Tokenizer class.
    A possible string is the Token itself.

    But maybe there is something I do not get from your request.
    If you can give me a real life example maybe I can better understand the request.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  5. #25
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Buonasera,

    my apologies for confusion. Take this line:
    Dim MyKeys    As Long Value MyParser.NewMainType("MyKeys")
    
    ...the generation of new main type takes "MyKeys" as parameter, and produces some integer.

    If there would be some kind of internal dictionary, it could match back the integer to "MyKeys".

    Just idea, low priority.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Comments and other keys
    By Michael Hartlef in forum M15 file format
    Replies: 2
    Last Post: 15-02-2008, 23:52
  2. Tokenizer: Configurizable?
    By Michael Hartlef in forum Tokenizer
    Replies: 12
    Last Post: 02-05-2007, 22:20

Members who have read this thread: 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •