[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lojban] Re: Lojban interpreter
I've got a work-in-progress page on Lojban's grammar here:
http://www.lojban.org/tiki/Grammar
It links to the page specifically about the PEG implementation of
that grammar:
http://www.lojban.org/tiki/PEG
Which you can from there find one (of a couple floating around)
grammar files (shameless self-promotion here, this is my own
working copy of the PEG grammar):
http://www.lojban.org/tiki/jbogentufa%27i
the sumti-6 rule in part describes parsing LA clauses. It is these
lines in gerna.peg:
...
/ LA-clause free* relative-clauses? CMENE-clause+ free*
/ ( LA-clause / LE-clause ) free* sumti-tail KU-clause? free*
...
Which of course references several other lines. In some sense,
though, asking how to parse LA is the wrong question. There isn't
a need to parse LA in isolation from Lojban's grammar, you parse
LA incidentally to parsing Lojbanic text.
Be well,
-Alan
On Fri, Jun 24, 2011 at 01:51:45PM -0700, mirhagk wrote:
> I do very much appreciate your help, and I actually have heard of, and
> read part of the Dragon book before.
>
> I know how to parse sort of, and I just don't know how to parse lojban
> specifically. For instance how is la parsed specifically.
>
> On Jun 24, 12:40 pm, ".alyn.post." <alyn.p...@lodockikumazvati.org>
> wrote:
> > You might really enjoy reading the "Dragon Book," formally called
> > "Principles of Compiler Design." It is the classic textbook on
> > compiler design.
> >
> > In the last several years, it has unfortunately become a little
> > dated, but understanding the material there is necessary for reading
> > any of the recently published papers on the subject, and I'm not
> > aware of a book that is a candidate to replace this one. There
> > way well be, I haven't surveyed the field.
> >
> > If formal coverage of the subject is not to your taste, there exist
> > now a variety of short books and articles on compiler design, many
> > more than used to be available. I'm sure you'll be able to find
> > something helpful that discussed the topic in a way you find useful.
> >
> > Please take my e-mails in the spirit of providing guideposts, rather
> > that dictums. I hope in my suggestions that you will have an easier
> > time accomplishing your goals, but my suggestions may not be the
> > journey you want to take. If your "Lojban parsing is terrible" fix
> > it when it bugs you, not when it bugs the armchair generals.
> >
> > For C#, you have some really nice parsing options, the most popular
> > being IronMeta. It may provide most of the skeleton you need, and
> > you can focus on the Lojbanic pieces of your problem. That project
> > is also well documented, in that you might be able to go from no
> > parsing experience to getting stuff working and learn as you go.
> >
> > .i a'o do selpu'a lo nu finti lo do vi samtci
> > .i mu'o mi'e .alyn.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Jun 24, 2011 at 09:16:15AM -0700, mirhagk wrote:
> > > K I know that I'm parsing it terribly, that's the thing I want to
> > > change. And basically I want to create a program where you can talk to
> > > a computer and it will execute those commands, but in plain english
> > > (rather plain lojban). With english it's entirely impossible because
> > > of the millions of ambiguities but lojban clears most of those up, and
> > > serves as the perfect language for this task.
> >
> > > And if your asking why, I'll give you a 3 part answer:
> > > 1. To prove to people how powerful lojban can be in conversing and
> > > interfacing with a computer
> > > 2. To further my understanding of interpreters/compilers
> > > 3. To develop the absolute simplest programming language.
> >
> > > So what help I would love from you guys is on how to properly parse
> > > the language, because I know I'm doing it wrong, I don't mean to, I
> > > just don't know the right way. And yes this project will be open
> > > source, and I will convert it to C++ eventually, but C# is a much
> > > simpler language for the task right now.
> >
> > > --
> > > You received this message because you are subscribed to the Google Groups "lojban" group.
> > > To post to this group, send email to lojban@googlegroups.com.
> > > To unsubscribe from this group, send email to lojban+unsubscribe@googlegroups.com.
> > > For more options, visit this group athttp://groups.google.com/group/lojban?hl=en.
> >
> > --
> > .i ma'a lo bradi ku penmi gi'e du
>
> --
> You received this message because you are subscribed to the Google Groups "lojban" group.
> To post to this group, send email to lojban@googlegroups.com.
> To unsubscribe from this group, send email to lojban+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/lojban?hl=en.
>
--
.i ma'a lo bradi ku penmi gi'e du
--
You received this message because you are subscribed to the Google Groups "lojban" group.
To post to this group, send email to lojban@googlegroups.com.
To unsubscribe from this group, send email to lojban+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/lojban?hl=en.