Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
New parser model for Code completion
rickg22:
AH HAH! Here's what I wanted to show you! Take special look at the "State Transition table".
http://en.wikipedia.org/wiki/Event_driven_finite_state_machine
This is the kind of automaton i'll be building. Fits like a shoe to the current C::B parser model.
takeshimiya:
Yeah, lot's of computer science theory :)
But how fits in the current parser, attaching to an identifier (myfunction, myclass, myvariable) the surrounding comments..?
I just hope it wouldn't become very hard to make more the parser more generalized (currently everything's hard coded).
And I hope by generalizing it, you don't reinvent the well, there are lot's of parser generators out there.
takeshimiya:
lol :lol:
http://www.w3.org/TR/2005/WD-scxml-20050705/
rickg22:
Wow, thanks! That'll save me a lot of time! :)
rickg22:
Some help, guys!
While I'm busy making my SearchTree class, i'd appreciate if someone of you can examine the tokenizer and parser classes (perhaps even parserthread?) and make a state transition (and actions?) table, like which token goes to which state... specifically, Tokenizer::DoGetToken(), Tokenizer::SkipUnwanted(), etc.
Generally, each Skip(char n) function is a state whose only exit transition is the one that breaks out of the loop.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version