Skip to content
0:00 / 0:00

#perl6#raku#grammars

Perl 6 as a new tool for language compilers

Andrey Shitov

191 subscribers • 2 videos on Hallway

YouTube
  • Recommended by 2 people: 1 on Lobsters and 1 in engineering communities.
  • Presented by Andrey Shitov

Intermediate. Assumes working knowledge.

2.9K views7 years ago2 recommendations

Programming languagesSystems programmingCompilers and interpretersLanguage design and type systems

Andrey Shitov demonstrates how to use Perl 6 grammars to build an interpreter for a programming language without separate lexing and parsing phases.

3 February 2019 | FOSDEM 2019 | Brussels fosdem.org/2019/schedule/event/perl6newtool/ Using Perl 6 grammars to design and implement a programming language Perl 6 grammars are a great way to describe the grammar and implement an interpreter or a compiler of DSL or a programming language. In this talk, I will demonstrate how you can do it. During the talk, we will create an interpreter for a tiny programming language. The engine behind the implementation will be the so-called Grammars that are available in today's Perl 6. We will create the full language specification and describe all the actions it needs to do to execute the program. The great part is that you no longer need to split your language implementation in traditional phases: lexer, parser, etc.. Neither you need a compiler of compilers to process the formal grammar rules and emit the lexer/parse code that you will later use in your compiler. All you need is just to write some Perl 6 code. You even don't need to be a specialist in compilers or learn numerous tools like bizon etc. to create your own language in a few hours.

Why it's here

2 people recommend this

u/whereistimboin r/ProgrammingLanguages • Recommends

Perl 6 as a new tool for language compilers - YouTube

mempkoon Lobsters • Recommends

Perl 6 as a new tool for language compilers

u/lajfain r/ProgrammingLanguages • Mentions

On “Which language to write a compiler in?”

I haven't done it myself, but this talk makes a case for writing it in Perl: [video