From d2a3f2cedd7c00d0933222aed9c06b3149aa4db4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?=
Today we will only focus on compiling the following code:
Rules consist of a regular expression followed by Erlang code. The
latter must return a token representation or the atom skip_token
.
TokenLine
variable contains the line number.
View the complete file.We obtain the following result from the lexer:
mod
expression which defines a module. And that’s it! We end up with the
following grammar:We obtain the following result from the parser:
We obtain the following pretty-printed Core Erlang generated code: