Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^4: Writing a Programming Language in Perl

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

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

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?
  • Comment on Re^4: Writing a Programming Language in Perl

Replies are listed 'Best First'.
Re^5: Writing a Programming Language in Perl
by ikegami (Pope) on Oct 25, 2011 at 22:32 UTC
    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?

        A compiler (or interpreter) has a few parts.

        A parser converts a file full of source code into a data structure.

        An interpreter traverses that data structure and executes the appropriate commands for each significant node in the structure.

        A compiler transforms that data structure and emits something else. Perhaps this other is object code for a specific processor or perhaps it's binary code for a virtual machine or perhaps it's source code for another language entirely.

        If you look at compiling and implementing languages this way, you already know the general technique. (everything is a compiler).

        Improve your skills with Modern Perl: the free book.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://933722]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2018-01-20 14:21 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (226 votes). Check out past polls.