c++ - Loading a text file in to memory and analyze its contents -


for educational purposes, build ide php coding.

i made form app , added openfiledialog ..(my c# knowledge useful, because easy ... though without intelisense!)

loading file , reading lines same in every language (even perl).

but goal write homemade intelisense. don't need info on richtextbox , events generates, endline, eof, etc, etc.

the problem have is, how handle data? line line?

  • a struct each line of text file?
  • looping structs in linked list? ...
  • while updating richtextbox?
  • searching opening , closing brackets, variables, etc, etc

i think microsoft stores sql type of database in app project folders. how keep track of variables , simulate them in sort of form?

i know how handle efficiently on dynamic text.

having never thought through before, sounds interesting challenge.

personally, think you'll have implement lexical scanner, tokenizing entire source file source tree, each token having information mapping token line/character inside of source file.

from there can see how far want go - when hovers on token, can use context of code around more intelligent "intellisense" providing.

hovering on map source tree, (as building it) load information want display.

maybe it's overkill, sounds fun project.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

android - Keyboard hides my half of edit-text and button below it even in scroll view -