Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
Regular expressions
Ceniza:
--- Quote from: Seronis on March 20, 2008, 02:50:47 am ---
--- Quote from: Ceniza on March 20, 2008, 12:00:55 am ---"Stay tuned, and stay infected." (I wonder if anyone knows where this quote comes from :D)
--- End quote ---
I tried to google cheat. It linked back to this post. Damn their spiders are getting fast.
--- End quote ---
You didn't search carefully. It's in the first results page ;)
My expectations were wrong. The truth is that I've been working more on the parser than anything else. My first attempt was to create a simple parser like the one I used to evaluate constant expressions for #if directives, but the grammar as it is defined is not good for such a parser (LL(0)). LL(1) would help a bit more, but it wouldn't be enough. Besides, I don't want to calculate FIRST and FOLLOW to implement the parser. However, the LL(0) attempt gave me an idea: a brute force parser. I'm completely unaware of its performance, but it should just work. Quoting the description found in the YARD page: "The distinguishing characteristic of a R-D parser, is that it employs a recursive brute-force algorithm to attempt to match the various grammar production rules. If a match fails, the parser backs up to the position it was when it attempted to match the failing rule."1. Yet another parser I found, linked from YARD's website, is Biscuit. Right now I'm experimenting with something similar to Biscuit's syntax, but not exactly it. BTW, even Yacc has a special implementation that splits the parser when a grammar is detected as ambiguous, so it analyzes more than one production at a time.
To avoid more false expectations, I'll just say that I'll report more things when I have something to show.
Just for the sake of sharing, you can get the current bizarre code experiment from here.
[1]
JGM:
thanks for the link of the source! :D I was trying to check the sources of your svn repository to study them, but i don't know how :oops:
JGM:
I have a questions, I'm curious to know if the implementation is going to support different file encodings, that should be something to visualize or anticipate, I think :roll:
Ceniza:
--- Quote from: JGM on March 28, 2008, 02:45:10 pm ---thanks for the link of the source! :D I was trying to check the sources of your svn repository to study them, but i don't know how :oops:
--- End quote ---
I have to enable anonymous SVN access first :)
svn://svn.cenizasoft.cjb.net/svnrepos/CCP/trunk
--- Quote from: JGM on March 28, 2008, 02:50:17 pm ---I have a questions, I'm curious to know if the implementation is going to support different file encodings, that should be something to visualize or anticipate, I think :roll:
--- End quote ---
Actually, the current implementation needs you to provide it with a few classes to be able to work. Right now I have ones using std::string and std::istream. If you want your own, you create them and feed the classes through template arguments. However, I still need to work a bit on that part.
Ceniza:
It's been a while, and the news are _NOT_ as good as you would like them to be.
If you check the SVN commit log you'll see I started working on the project again about three weeks ago; however, I changed my proposal to implement ONLY the preprocessor. Implementing the whole thing would take me longer, and I do really want to graduate soon.
Well, the new proposal was approved, the project is finished, and the document is done. However, I might need to change a few things in the document if my director considers it necessary. I hope not :D
I wouldn't mind sharing the document, but it's in Spanish. Maybe the library reference would be of more help, yet it's not as interesting to read as the document itself :P
The next step: optimizing the library. I'm even planning to write a special String type for it to see if it improves performance (I'll do profiling later :P). I was even considering writing an article about the creation process of that String type plus the performance considerations and final implementation. Who knows? Maybe some of you may learn one or two things from it, or I just make you believe something that could not be true :P
Morten promised me to give me his blood in exchange for a good code-completion library. He threatened me too, but that's way OT :)
Let's see how it goes from here. At least the first step has been taken.
There's also a plugin laying around that can be installed in the latest Nightly build that tests the library. It doesn't offer any benefits, but it's good to see that its minimum functionality works.
-- END OF THE MESSAGE --
This message was written using only recycled bytes. The colors for the smileys do NOT use any dangerous substances. If your children eat this message take them to the hospital immediately.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version