|
| 12 Jan 2013 07:48 PM |
Welp, it took me all day, but I finally got 95% or so of the bugs out of this.
The following is a pastebin ID: gqH3tHmp
I've tried to include as much documentation as is possible in a 15 minute time span, if you need help with something ask. |
|
|
| Report Abuse |
|
|
|
| 12 Jan 2013 08:16 PM |
No one is having any problems with this?
Oh, btw, should I make some prettifier code? As is the system is... ugly as all get out. |
|
|
| Report Abuse |
|
|
DannyCore
|
  |
| Joined: 25 Apr 2012 |
| Total Posts: 990 |
|
|
| 12 Jan 2013 08:18 PM |
that's real long did you do that all in one day? without getting lazy!?! |
|
|
| Report Abuse |
|
|
|
| 12 Jan 2013 08:19 PM |
| The original source file is only 325 lines long, most of what you're seeing is the final output of the MoonScript compiler. |
|
|
| Report Abuse |
|
|
|
| 12 Jan 2013 08:21 PM |
| I don't quite get the use for this. It's a more hierarchy-based regex matcher? |
|
|
| Report Abuse |
|
|
DannyCore
|
  |
| Joined: 25 Apr 2012 |
| Total Posts: 990 |
|
|
| 12 Jan 2013 08:23 PM |
oh, nice job I didn't even test it yet but by looking at it it seems legit |
|
|
| Report Abuse |
|
|
|
| 12 Jan 2013 08:24 PM |
Parser expression grammars were the major inspiration for this.
The system can be used in a variety of ways, checking conformance, generating ASTs, or collecting information via captures. All three of those are directly built in. |
|
|
| Report Abuse |
|
|
| |
|
mustyoshi
|
  |
 |
| Joined: 27 Dec 2007 |
| Total Posts: 41651 |
|
|
| 12 Jan 2013 09:37 PM |
Why not just write a regex engine?
~Monica |
|
|
| Report Abuse |
|
|
|
| 12 Jan 2013 09:40 PM |
| Because regex is stupid. :D |
|
|
| Report Abuse |
|
|
mustyoshi
|
  |
 |
| Joined: 27 Dec 2007 |
| Total Posts: 41651 |
|
|
| 12 Jan 2013 09:41 PM |
I like your attitude.
~Monica |
|
|
| Report Abuse |
|
|
|
| 12 Jan 2013 09:46 PM |
False. Regex is the best thing since sliced bread. Bonus points if you use the ? operator to crash servers. |
|
|
| Report Abuse |
|
|
|
| 12 Jan 2013 10:05 PM |
| My system can be made to completely parse Lua into a tree, why would I downgrade to regex? |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2013 12:48 AM |
| Why not just give us the MoonScript source code? |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Jan 2013 08:23 AM |
| Available on github as: Magisun/LRules-Parser |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2013 11:05 AM |
Should I add an extension library, or just incorporate the changes directly into the main script?
I'm adding stuff like overloaded constructors to various classes and helper rules... |
|
|
| Report Abuse |
|
|
|
| 15 Jan 2013 03:35 PM |
Implemented in the main source.
Anyone want to help with documentation? I'd like to think that my code uses clear enough names, but just in case... Anyway, it'd be greatly appreciated. |
|
|
| Report Abuse |
|
|
|
| 15 Jan 2013 07:02 PM |
Added rule skipping.
Time for documentation. |
|
|
| Report Abuse |
|
|
|
| 16 Jan 2013 05:44 AM |
Identified an error in rule skipping, redundant after check and naive matching.
I'll get documentation v1 up on the project wiki later today around the same time I correct the rule skipping system. |
|
|
| Report Abuse |
|
|