Tuesday, April 5, 2011

Reia: Now with a PEG parser

I haven't blogged about Reia in so long. Mea culpa! It's about this time that people start to think "I haven't heard about Reia in awhile. It must be dead." No, Reia is very much alive my friends, and making some pretty interesting progress... I hope to be able to announce some important new features around Reia's 3rd birthday. Stay tuned for that, but first a preview of things to come...

An experimental branch of Reia is now available which uses Neotoma to generate its parser thanks to some pretty impressive contributions by Graeme Defty. Neotoma is a Parsing Expression Grammar (PEG) based parser generator for Erlang, inspired by Packrat. Neotoma's author Sean Cribbs has also released Neotoma 1.5 with contributions by Graeme Defty which uses Erlang binaries internally and is substantially faster than the previous version.

Why does a PEG matter? PEGs make short work of problems that are extremely complex to handle when you attempt to subdivide the problem of parsing into separate scanning and parsing steps, such as how a traditional lex/yacc (or in Reia's case, leex/yecc) parser would operate. If you've ever attempted to look at the source code of the Ruby parser, you'll find some strange and confusing feedback between the lexer and the parser.

What's this for? Well the foremost reason is: interpolated strings. Ruby allows you to embed arbitrary Ruby code inside of any string using the #{...} syntax. This is a really great feature and one I managed to half-assed implement in Reia because I strongly believe in its awesomeness. However, Reia's implementation is a bit brittle and has a lot of implementations. Just recently I switched to the latest greatest version of leex which ships with the Erlang runtime and had to make some rather arcane changes to some code that uses leex internals, just to continue to support a partially functioning string interpolation mechanism.

Now, toss in some more fun complexities: the awesome /.../ regex literal syntax. We all love it, but why doesn't every language have it? What you may not realize is that this syntax is ambiguous in certain cases with the / and /= operators like it is in other languages like JavaScript. Now, for added fun, toss in the fact that regular expressions can interpolate just like strings, and you're beginning to see the makings of a gramatical nightmare.

All of these things are easy with a PEG. PEGs blend tokenization with parsing and allow comprehension of a much wider range of languages than is possible without pulling your hair out using lex/yacc-like tools, and much more than that, it's a very natural process with PEGs. PEGs are also by nature right-recursive, something that works quite well in immutable state languages like Erlang that have to build their syntax trees from right-to-left due to the nature of immutable singly linked lists. These lists only let you append elements on the left.

This sounds well and good, but unfortunately I have some bad news. Even after a few rounds of performance tuning, using an experimental branch of Neotoma that uses binaries internally instead of lists, the PEG parser is still about an order of magnitude slower than the leex/yecc version. Talking to Neotoma's author Sean Cribbs, it sounds like Neotoma might be doing an excessive amount of unnecessary copying internally. If PEGs pique your interest and you know a bit of Erlang you might take a peek at Neotoma and see if you can find some potential performance optimizations.

I would still like to merge the peg branch of Reia, and the PEG grammar fixes a lot of quirks in the present yecc grammar, but I'm still holding out until the performance is improved to closer to the leex/yecc speeds.


phil pirj said...

Congradulations on that. Huge respect to Graeme.
Reia is still my point of interest, and I have some experience with Neotoma as well. Hope to have some time to play with it this spring.

Aliya said...

Surveillancekart | CCTV System
Pestveda | Pest Control
Termite control
cctv installation services
best home security camera system

emma said...

cctv camera dealers in delhi
cp plus cctv camera online
hikvision camera online
cctv camera installation services in delhi
cctv camera installation services in gurugram
cctv camera installation services in gurgaon

shabnam praveen said...

Call girls in Kolkata
Call girls in Chandigarh
Call girls in Chandigarh
Call girls in Gurgaon
Call girls in Chandigarh
Call girls in Chandigarh

shabnam praveen said...

Call girls in Lucknow
Call girls in Guwahati
Call girls in Mumbai
Call girls in Jaipur
Call girls in Jaipur
Call girls in Jaipur
Call girls in Bangalore

call Girl said...

Call girls in Gurgaon
Call girls in Lucknow
Call girls in Guwahati

Call girl in Gurgaon
Call girl in Lucknow
Call girl in Guwahati
Bangalore call girls

Gurgaon call girls
Lucknow call girls
Guwahati call girls
Bangalore call girls

Gurgaon call girl
Lucknow call girl
Guwahati call girl
Bangalore call girl

Escorts in Gurgaon
Escorts in Lucknow
Escorts in Guwahati
Escorts in Bangalore

Escort services in Gurgaon
Escort services in Lucknow
Escort services in Guwahati
Escort services in Bangalore

Escort service in Gurgaon
Escort service in Lucknow
Escort service in Guwahati
Escort service in Bangalore

Gurgaon escorts
Lucknow escorts
Guwahati escorts
Bangalore escorts

Naincy said...

This is so much amazing .so,you can also visite my links.
call girls in kolkata
russian escorts in kolkata
kolkata call girls
call girls kolkata
escorts in kolkata
kolkata escort
housewife escorts in kolkata
college call girls in kolkata
call girls in park street
escorts in park street

call girls in gurgaon
call girl in gurgaon
gurgaon call girls
escorts in gurgaon
gurgaon escorts
gurgaon escort
Escort services in Gurgaon
Escort service in Gurgaon
russian escorts in gurgaon
housewife escorts in gurgaon
college call girls in gurgaon

Call girls in Noida
Call girl in Noida
Escorts in Noida
Escort services in Noida
Escort service in Noida
Noida Escorts
Noida Escort
Noida Call girls
Noida Call girl

call Girl said...

Gurgaon escorts
Lucknow escorts
Guwahati escorts
Bangalore escorts
call girls in bangalore

Gurgaon escort
Lucknow escort
Guwahati escort
Bangalore escort

Faridabad call girls
Faridabad call girl
Faridabad escorts
Faridabad escort
Escort services in Faridabad

Escort services in Faridabad
Call girls in Faridabad
Call girl in Faridabad
Faridabad escort services
Faridabad escort service

Escorts in Faridabad
Escorts in Faridabad
Escorts in Faridabad
Escorts in Faridabad

Escort in Faridabad
Escort in Faridabad
Escort in Faridabad
Escort in Faridabad

Escort services in Faridabad
Escort services in Faridabad
Escort services in Faridabad
Escort services in Faridabad

Escort service in Faridabad
Escort service in Faridabad
Escort service in Faridabad
Escort service in Faridabad

siska said...

Togel Sydney
Togel Singapore
Togel Hongkong
Prediksi Togel
Buku Mimpi
Angka Jitu Togel

anosh said...

شركة كشف تسربات المياة ببريدة
شركة مكافحة حشرات ببريدة
شركة مكافحة النمل الابيض ببريدة
شركة رش مبيدات حشرية ببريدة
شركة تنظيف منازل ببريدة
شركة تنظيف مجالس ببريدة
شركة تنظيف كنب ببريدة
شركة تنظيف فلل ببريدة
شركة تنظيف شقق ببريدة
شركة تنظيف ببريدة

anosh said...

شركة كشف تسربات المياة بعنيزة
شركة مكافحة حشرات بعنيزة
شركة مكافحة النمل الابيض بعنيزة
شركة رش مبيدات حشرية بعنيزة
شركة تنظيف منازل بعنيزة
شركة تنظيف مجالس بعنيزة
شركة تنظيف كنب بعنيزة
شركة تنظيف فلل بعنيزة
شركة تنظيف شقق بعنيزة
شركة تنظيف بعنيزة

bola88 said...

bandar judi
bandar togel
agen togel88

Lisa said...

Hello my loved one! I want to say that this post is awesome, nice written and include almost all important information. I would like to peer more posts like this. I’ll right away grab your rss feed as I situs togel terpercaya can’t to find your email subscription hyperlink or e-newsletter service. Do you’ve any? Kindly allow me recognise so that I may subscribe.Thanks.


Nonton Film Bokep

bahadur kaun said...

Buy your products online on Treasurebox store. Treasurebox provide you all the outdoor items household items which you will be easily buy on a single click in Newzealand. All the outdoor furniture nz products available at low prices with home delievery.

sitampan said...

agen togel
paito singapore
result togel
judi togel terpercaya
bandar sgp

dadyar said...

دستور تخلیه زمانی مطرح می شود که به واسطه قراردادی بین اشخاص در خصوص ملک، حق استفاده از ملک به طرف دیگر داده می شود (منظور همان قرارداد موجر و مستاجر است) اما پس از سر رسید تاریخ انقضاء قرارداد، مستاجر از تحویل ملک امتناء می کند.
در این مواقع موجر می تواند با ارائه دادخواست دستور تخلیه اقدام به بازپس گیری ملک تصرف شده فرماید. وکلا در این مواقع می توانند کمک شایانی به موجرین کنند تا هر چه سریعتر نه تنها حکم نخلیه صادر شود بلکه مراحل تخلیه نیز هر چه سریعتر طی شود. در صورت داشتن هرگونه سوال و یا نیاز به مشاوره می توانید از مشاوره رایگان انلاین و تلفنی گروه وکلای مستر دادیار استفاده نمایید.
دستور تخلیه فوری
همانطور که گفته شد در صورتی که تاریخ انتقضاء قرارداد فرا رسیده باشد. با ارائه دادخواست، دستور فوری تخلیه صادر می گردد. اما اگر به موجب شرط و یا مسائل دیگری صاحب ملک درخواست تخلیه ملک را داشته باشد، پس از بررسی های لازم و به حق بودن درخواست دستور صادر می گردد.
البته برای این امر شرایطی دیگری نیز لازم است از جمله:
قرارداد در دفتر اسناد رسمی تنظیم شده باشد و یا دو شاهد آن را امضا کرده باشند
مستاجر از پرداخت سه ماه اجاره خانه امنتاع کرده باشد.
ملک مورد اجاره را برای امر نا مشروع مورد استفاده قرار داده باشد و….
تفاوت خلع ید و دستور تخلیه
همان طور که در ابتدای بحث به آن پرداختیم، دادخواست تخلیه زمانی مطرح می گردد که قراردادی مابین طرفین وجود داشته باشد و اکنون به موجب سر رسید تاریخ انقضا و یا مواردی که به موجر حق باز پس گیری ملک را می دهد به وجود آید. اما در پرونده های خلع ید چنین نیست یعنی قرار دادی وجود ندارد تا بر مبنای آن دادخواستی تنظیم گردد. یعنی شخص مال غیر منقولی را به تصرف کرده است که در این صورت باید دادخواستی برای خلع ید تنظیم گردد.
شرایط طرح دستور تخلیه
در ابتدا به برخی از شرایط طرح دادخواست اشاره شد، که در این بخش به صورت کاملتری بیان خواهند شد.
مشخص بودن زمان اجاره
تنظیم اجاره نامه در دو نسخه
امضا شدن اجاره نامه توسط دو شاهد
مشخص بودن تاریخ انقضا قرارداد و به انقضا رسیدن قرارداد
در صورت فرا نرسیدن تاریخ انقضای، باید حداقل سه ماه مستاجر از پرداخت اجاره بها امتناء کرده باشد
استفاده نامشروع از ملک توسط مستاجر
نقض شرط عدم عدم انتقال به غیر توسط مستاجر
در صورت مطرح بودن سند رسمی در مورد اجاره، باید دادخواست برای گرفتن حکم تخلیه اقدام کرد و نه دستور تخلیه که به نسبت مدت زمان بیشتر طول خواهد کشید تا پرونده به نتیجه نهایی برسد.
مرجع صالح رسیدگی به دادخواست دستور تخلیه
در اماکن و املاکی که دارای سرقفلی هستند مرجع صالح رسیدگی دادگاه می باشد. اما در املاکی که فاقد سرقفلی هستند، نزدیکترین شورای حل اختلاف نزدیک ملک مرجع رسیدگی به این نوع شکایات می باشد.
به این موضوع با اهمیت توجه داشته باشید که هیچگاه مشورت با افراد با تجربه و کار بلد باعث پشیمانی نمی شود. پس حتما سعی کنید حتی در صورت نسپردن پرونده به وکیل، حتما به مشورت با آنها بپردازید. چرا که اشتباه در پرونده های حقوقی می تواند رای دادگاه را برگرداند و حق شما ضایع گردد.
هزینه دادرسی دستور تخلیه
دستورتخلیه از ناحیه صاحب خانه از جمله دعاوی غیر مالی محسوب می شود و هزینه دادرسی آن مساوی است با هزینه دادرسی دعاوی غیر مالی.
چگونگی اجرای دستور تخلیه
پس از صادر شدن دستور جهت تخلیه ملک به مستاجر ابلاغ می گردد. در صورتی که مستاجر از دستور پیروی نکن، ابلاغیه ای به کلانتری محل فرستاده می شود تا مامورین کلانتری نسبت به اجرای دستور و باز پس گیری ملک اقدام کنند.

sitampan said...

Agen http://pasarqq1.vip adalah situs terbaik ynag sama seperti dewaqq namun ada juga mejaqq yang berperan sama seperti hokiqq yang menyediakan http://interqq.site dan asik qq yang memiliki permainan yang sama. Agen http://wedeqq1.vip juga situs terbaik dan juga menyediakan tabel paito sd

TOGEL said...

paito sydney
paito warna sydney
paito sgp
paito warna sgp
paito hk
paito harian hongkong

pemain togel said...


webspace said...

We are Webspace Inc. organization working as the Best Digital Marketing Company in USA and we give many services to our client that is website designing, website development, Search Engine Optimization, E-commerce web Designing, Software Development, Google Adword and Mobile Application.
Web Development company in Los Angeles
web design New York
web development New York
online marketing New York
ecommerce web development New York
internet marketing New York
SEO company New York
seo company USA
Web development company
Web development company California
Web development company Los angeles
Professional Web Design Services USA
Website Design Comapny
Web Design Company
webiste design services
Web Development Company in USA
Web Development Services in USA
website development company in usa
Ecommerce Website Development Company in USA
Ecommerce Website Development Services
custom ecommerce development
Ecommerce Website Development Company In Usa
CMS Web Design Services USACMS Website development company In Usa
Digital Marketing compnay in Usa
Online Marketing Services
Digital Marketing Company Usa
Seo Comapny In usa
Professional Software Development Company USA
software development company
custom software development company
custom software development In Usa
App Development Services USA
Mobile App development Company
Mobile Application Development Services

H J said...


Puremelda said...

One unique characteristic of the firm's Custom Research Paper Services and College Paper Writing Services is that they offer the best market rates and actual research on all their Custom College Paper Writing Services.

Amber Collins said...

Hi was just seeing if you minded a comment. i like your website and the them you picked is super. I will be back.


TheDigiExperts said...

Thedigiexperts is one of the Best Top 10 Digital Marketing Institute in Delhi and has the best-trained teachers with over 10 years of experience. Provide the best teaching with live practice in all fields such as google analytics tutorial at an affordable price.

salma said...

غسيل خزانات بمكة غسيل خزانات بمكة
غسيل خزانات بجدة غسيل خزانات بجدة
غسيل خزانات بالدمام غسيل خزانات بالدمام

Juliana Kho said...

idn poker apk iphone
Situs Poker Terbaik
situs poker terbaik idn play
situs idn poker terbaik
situs idn poker terpercaya

sandeepaleti36 said...

enable dark mode on snapchat
snapchat dark mode
dark mode for snapchat
thanks for sharing great information.

Unknown said...



Bocoran togel

Situs bandar togel

data hk

Info Judi




customized gifts for him said...

baby shark pillow case
baby yoda pillow case
burlap sofa pillow

OGEN Infosystem (P) Limited said...

Keep it up for more informative blogs, thanks for sharing with us. Visit OGEN Infosystem for responsive website design at affordable price by well-experienced designers and developers.
Website Designing Company in Delhi

niramay said...

live net tv

Sinelogix said...

Excellent information with unique content and it is very useful to know about the information based on blogs.

Laravel developer in USA | Shopify developer in USA | website agency in USA |cheap website developer in USA | professional website developer in USA | e-store developer in California | ecommerce website designer in California

bandarq228 said...

informasi bagi anda yang ingin menghasilkan uang dengan cara mudah hanya dengan menggunakan gadget anda, coba mainkan pkv games dan hasilkan uang untuk membantu ekonomi anda di tengah pandemi ini
kunjungi dan daftarkan diri anda untuk mendapatkan bonusnya hanya di

Fun said...

You can even explore here all beautiful areas and make your trip unforgettable with Goa escorts services .
find out best Goa Call Girls Services.

Lucknow Escorts Services or Lucknow Call Girls Services

Darren Demers said...

This sounds well and good, but unfortunately I have some bad news. Even after a few rounds of performance tuning, using an experimental branch of Neotoma that uses binaries internally instead of lists, unstitched lawn suits , unstitched lawn suits the PEG parser is still about an order of magnitude slower than the leex/yecc version. Talking to Neotoma's author Sean Cribbs, it sounds like Neotoma might be doing an excessive amount of unnecessary copying internally. If PEGs pique your interest and you know a bit of Erlang you might take a peek at Neotoma and see if you can find some potential performance optimizations.

Michael Smith said...

In any case, I should get a kick out of the occasion to thank you for the free lunch I had. If you have some problem with HP Printer Error Code Oxc4eb827f click the link.

APK said...

Everyone should follow these rules. GBWhatsapp 2021

Anjali Singh said...
This comment has been removed by the author.
Anjali Singh said...

We have the large collection of hot escort services who can provide you best services and cause you to relax and happy as per your demand. Contact us for escorts in Lucknow or call girls in Lucknow.
We also serve service in different city/location like escorts in Goa or call girls in Goa.
call now!

unkown said...

独播库,线上看,免费在线观看,电影,电视剧,动漫,视频网站,高清视频,Series,Movie,TV Shows,Online Free Watch, 独播库.

Update Technology said...

They are an incredible alternative for strength preparing exercises on account of the test they give your muscles, which is not the same as utilizing loads.
home use resistance bands

Aerocity Service said...

Paharganj Escorts
Dwarka Escorts
Russian Escorts Noida
Russian Escorts Delhi
Karol Bagh escorts
Delhi Escorts Service
Escorts in Delhi
Call girls in Delhi
Delhi escort
Aerocity Escorts

Mixy Time said...

NT.Wallet - Recharge your UAE & International Mobile, Utility, Entertainment, Gaming, and Transportation services. You can pay your bills instantly wherever you are, whenever you want. Download NT.Wallet App to enjoy the best International payment system on your Smartphone!

R1se Hluoluo said...

Usus besar atau kolon mempunyai panjang ± 1 mtr. dan terdiri dari kolon ascendens, kolon transversum, dan kolon descendens. Antara intestinum tenue (usus lembut) dan intestinum crassum (usus besar) ada sekum (usus buntet). Pada ujung sekum ada benjolan kecil yang disebutkan appendiks (umbai cacing) yang berisi massa sel darah putih yang berperanan dalam kekebalan. Makanan yang tidak diolah diusus lembut, misalkan selulosa bersama-sama dengan lendir akan ke arah keusus, besar jadi fases. https://kesehatantubuh.org/ Dalam usus besar ada bakteri escherichia coli. Bakteri ini menolong dalam proses pembusukan tersisa makanan. Bakteri e.coli hasilkan vitamin K. Vitamin K berperanan penting dalam proses pembekuan darah.

opbestcom said...

This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion.
From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here keep up the good work

Try to check my blog: 풀싸롱


Arnold DK said...

Nice article, it is Very informative post! There is a lot of information. good eye of reia. Thanks for sharing these information with all of us. whatsapp mod

Legend said...

To give you an accurate building work estimate and design the best Builder south east London & building contractor in south London
service based on your budget and requirements, we need to organise a survey first. Please use our online booking form to schedule an appointment.

Legend said...

The DIY guy is most concerned over actual price.We’ve found some pro machines, and a few for Best mig welder under $500 supports our readers with industry knowledge & research. You support us through our carefully chosen products with links that may earn us a commission. Best mig welder under $1000

Legend said...

For Heathrow airport transfers, trust our chauffeurs in London and Heathrow chauffeurs to provide you with a reliable transport to Heathrow and a chauffeur service at great fixed.

Legend said...

Attempting to remove a stain may damage your clothes. Using Dry cleaners Norwich harsh chemicals and cleaning pads may even cause the stain to spread. Over the past five decades, we have dealt with all types of stains on a wide variety Rug cleaning Norwich of fabrics. From wine stains on gowns to dirt stains on pants, our staff knows the best methods for removing different stains. Along with getting rid of stubborn stains, our cleaning process can remove lingering odours.

Legend said...

With the Zion and Zion DLX, Best crossbow under $500 can take to the woods, hunt from the ground, or target game from elevated positions. Regardless, Best crossbow under $1000 make it happen anywhere with great accuracy, efficiency and speed.

Legend said...

Whether you need a taxi to Heathrow airport, Heathrow taxi and Heathrow executive taxi or transport from Heathrow to London. London Heathrow Taxi LHT has you covered. We offer our first class services to all customers no matter if you’re travelling for business or leisure.

Unknown said...

There are also articles on these topics on my blog and I hope you visit once and have a deep discussion! 메이저놀이터

Tom said...

This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. Laundry Service Norwich

Kaylee Brown said...

One of the most difficult departments to graduate from is economics. There are several terminologies, formulae, equations, and software to consider. As a result, students use our professional experts for online economics assignment assistance. On our platform, we have a healthy volume of economics experts flow. We provide economics assignment help, homework help, assignment writing with necessary calculations, case study etc.

Fore Security said...

There are many different types of burglar alarm systems available on the market today. Commercial burglar alarm systems are designed to protect businesses from break-ins and theft. commercial burglar alarm systems

Divya M said...

Can truly relate and retain this outstanding post. Very well written. Read about dotnet training online from Maria Academy.

William Woodruff said...

Many people look at rats with disgust but they should understand that rats are the main source of balance in our ecosystem. I not only provide Coursework Writing Services to students, but I have knowledge about every living thing which is necessary for our survival.

Aaasdsd said...

Watch Serie turche sub ita daily on our website.We are sharing the latest updates of serie turche eu sub ita which you can watch freely,