Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^3: Writing a Programming Language in Perl

by ikegami (Pope)
on Oct 25, 2011 at 21:54 UTC ( #933713=note: print w/replies, xml ) Need Help??

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

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 )".

  • Comment on Re^3: Writing a Programming Language in Perl

Replies are listed 'Best First'.
Re^4: Writing a Programming Language in Perl
by programmer99 (Novice) on Oct 25, 2011 at 22:30 UTC
    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.
        So the parsed code goes through a compiler? And then it is executed?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://933713]
[marto]: Beware the one liner :p
[Discipulus]: no, they are my crossword/sudoku like entertainment
Discipulus grins
[marto]: Even with shell command recall I find it less time consuming to do such things in a file.
[marto]: I very seldom use one liners for anything which isn't utterly trivial

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2017-09-22 08:30 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (260 votes). Check out past polls.