Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Writing a Programming Language in Perl

by programmer99 (Novice)
on Oct 25, 2011 at 20:36 UTC ( #933696=note: print w/ replies, xml ) Need Help??


in reply to Re: Writing a Programming Language in Perl
in thread Writing a Programming Language in Perl

Ok, I have a few questions (if you don't mind). What do you mean by grammar? How will Marpa help me? Thanks.


Comment on Re^2: Writing a Programming Language in Perl
Re^3: Writing a Programming Language in Perl
by Your Mother (Canon) on Oct 25, 2011 at 21:20 UTC

    As I say, tuits in the round are the issue and without the time to cook up some working example I'd just be glossing the various documentation and BNF/ParseRec stuffage. I think a simple example can be cooked up but it's also not entirely trivial or my forte (hint, hint to others who might have something to show). This is quite interesting and I've been waiting to try some Marpa though. If I can grab an hour tonight I'll revisit this otherwise, the weekend, otherwise... uh, what were we talking about?

Re^3: Writing a Programming Language in Perl
by ikegami (Pope) on Oct 25, 2011 at 21:54 UTC

    The grammar of a language defines its syntax. Parsers (e.g. Marpa) take a sequence of bytes, characters or tokens, check if it conforms to the grammar, and assigns meaning to the components of the sequence as per the grammar.

    For example, the job of the parser is to receive "a+b*c" and return "a multiplication of ( an addition of ( identifier a ) and (identifier b ) ) and ( identifier c )".

      I am extremely greatful of the info that has been givenfrom everyone, really I am. But how does Marpa help me create a language/compiler in Perl?
        You need to be able to parse the code before you can compile or execute it. It helps you by creating the parser for you.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://933696]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2014-09-17 08:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (66 votes), past polls