Re: Looking for Perl Grammar



Khamis Abuelkomboz wrote:

> Hi
>
> I'm writing a Perl parser and I'm looking for a pure perl grammar. the
> documentation from perl is not a pure grammar, it's more a documentation
> of the perl language.

I have no idea what a pure grammar is.

> thanks in advance

Its generally agreed there isn't one and I doubt there is even a context
free grammar for Perl. There are lots of thorny issues like regular
expressions, arbitrary delimiters (how do you write a rule for m#...# or m|
| ), constructs what change the grammar itself eg use subs.

Have a look thru the Chomsky hierarchy to get your terms right.
http://en.wikipedia.org/wiki/Chomsky_hierarchy

gtoomey
.



Relevant Pages

  • Re: send text from word doc to .txt file
    ... i want to perform a spell and grammar check in a minority language on the ... text in ms word.the checker is in perl and is used at the command line - dos ... formatting - extra white spaces. ... >> Is there a way to select all of the text on an open word document ...
    (microsoft.public.word.vba.general)
  • Re: send text from word doc to .txt file
    ... i want to perform a spell and grammar check in a minority language on the ... text in ms word.the checker is in perl and is used at the command line - dos ... formatting - extra white spaces. ... >> Is there a way to select all of the text on an open word document ...
    (microsoft.public.word.vba.general)
  • Re: perl 5 grammar
    ... Mike> I maintain the syntax highlighter for code.google.com and perl support ... Mike> is rather lacking. ... Mike> simple lexical grammar for perl 5 that will allow me to at least ... even likely in someone's production code. ...
    (comp.lang.perl.misc)
  • Re: Looking for Perl Grammar
    ... And if the program has 'use Module;', to determine which user-defined functions take arguments and which do not requires actually parsing the Module. ... However I'm really not writing grammar for perl, but use similar way, how perl parse itself. ... my parsing gools is reporting functions, ...
    (comp.lang.perl.misc)
  • Re: [QUIZ] Parsing JSON (#155)
    ... at my rubyforge grammar package if you want something really clean and pure: ... a Ruby DSL. ... That's what I mean by clean and pure anyhow. ... Not pure Ruby, ...
    (comp.lang.ruby)