Re: Error Handling [Was: Wishlis
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: Re: Error Handling [Was: Wishlis
- From: Ori Bernstein <ori@xxxxxxxxxxxxxx>
- Date: Sat, 4 Jul 2015 22:10:20 -0700
- To: Ryan Gonzalez <rymg19@xxxxxxxxx>
- Cc: myrddin-dev@xxxxxxxxxxxxxx
On Sat, 04 Jul 2015 20:38:55 -0500, Ryan Gonzalez <rymg19@xxxxxxxxx> wrote:
>
>
> On July 4, 2015 8:15:16 PM CDT, Ori Bernstein <ori@xxxxxxxxxxxxxx> wrote:
> >Hm. So, are you interested in taking a crack at error handling?
>
>
> Maybe. I tend to get lost in C once the program gets beyond 100 lines!
I don't mind trying to document the internals a bit better. The general
structure is kind of a mess at the moment, especially the code gen. The
general flow, though, is here, although it's a tad out of date, and could
use some expansion:
http://git.eigenstate.org/ori/mc.git/tree/doc/compiler.txt
If there's something there that's hard to follow, let me know; Docs in
general can definitely use more work, though.
>
> I think this is my issue. Whenever I work on a compiler, I have a tendency
> to either stay at 2 forever or jump straight to 4. :)
As I said, back and forth is expected. A bit of each -- think, tweak, and code
aren't entirely separate phases, and code is easy to edit after the fact.
> >For reference, what I'm currently focused on:
> >
> > - Parser generation
> > - Self hosting (And with that, a C ABI)
>
> IMO, I'd leave self hosting for a little later on. Not that it's bad, but
> I've heard that it can be trouble because every potentially breaking change
> requires going through the entire compiler and fixing everything. Not fun!
>
> As for parser generation, when Myrddin self-hosts, are you going to tweak
> YACC (byacc's source is very readable) to output Myrddin code, or are you
> going to hand-write the parser?
Was planning on writing a parser generator that does something like IELR,
although as a backup, I was considering hacking up http://c9x.me/lalr/
I haven't put up the code/input format for review yet; I'm still sketching
and experimenting. expect that in the next week or two.
http://people.cs.clemson.edu/~malloy/publications/papers/sac08/paper.pdf
>
> I don't let Haskell lets you do that, either.
Interesting.
--
Ori Bernstein
| Wishlist. | Ori Bernstein <ori@xxxxxxxxxxxxxx> |
| Re: Wishlist. | Ryan Gonzalez <rymg19@xxxxxxxxx> |
| Re: Wishlist. | Ori Bernstein <ori@xxxxxxxxxxxxxx> |
| Re: Wishlist. | Ryan Gonzalez <rymg19@xxxxxxxxx> |
| Re: Error Handling [Was: Wishlis | Ori Bernstein <ori@xxxxxxxxxxxxxx> |
| Re: Error Handling [Was: Wishlis | Ryan Gonzalez <rymg19@xxxxxxxxx> |
- Prev by Date: Re: Error Handling [Was: Wishlis
- Previous by thread: Re: Error Handling [Was: Wishlis
- Index(es):