Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Why aren't perl regular expressions really regular expressions?

by Dumu (Monk)
on Apr 12, 2015 at 01:32 UTC ( [id://1123166]=note: print w/replies, xml ) Need Help??


in reply to Why aren't perl regular expressions really regular expressions?

Thanks again to all Monks who took the time to answer and add to the discussion on this fascinating question, as well as provide links to further information.

As it happens, I have just found another relevant resource, a link to which will, I hope, make a satisfying coda.

Celebrated computer scientist Prof. Niklaus Wirth of the Eidgenössische Technische Hochschule Zürich (Federal Technical University of Zürich) recently updated his book 'Compiler Construction', which is available for download from his ETH homepage. For some reason, the 2014 PDF edition is divided into two parts, though of course it can easily be joined up again using PDFtk.

In Chapter 3, Prof. Wirth states the following (after some previous discussion of Chomsky):

"regular languages [play] a significant role in the realm of programming languages ... the following, simple definition may be given:

A language is regular, if its syntax can be expressed by a single EBNF expression.

The requirement that a single equation suffices also implies that only terminal symbols occur in the expression. Such an expression is called a regular expression."

This quotation makes more sense in the context of the surrounding book, but I think it's basically saying the same as what Corion says above. EBNF stands, of course, for 'Extended Backus-Naur Form', which is expounded throughout the book - as it is Wirth's own extension of the older BNF.

With the help and guidance of the above Monks and this volume from Prof. Wirth, I hope more readily to grasp the difference between Perl-legitimate regexen and the apparently much more specific meaning of the term in compiler design.

  • Comment on Re: Why aren't perl regular expressions really regular expressions?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1123166]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-25 12:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found