develooper Front page | perl.perl6.internals.api.parser | Postings from November 2000

A naive opinion

Thread Next
From:
raptor
Date:
November 22, 2000 05:42
Subject:
A naive opinion
Message ID:
004901c05499$c9689e20$198605d4@unacs
hi,

I don't know very much about internals or about how the parser works in
reality but something like this can be helpfull I think !! What I have in
mind ? Micro-perl-parser may be this is external interface (written in
perl).


rule:do {
   /do/ and "{" call(token) and "}" and action
 }

rule:token {
 /\S+/ action
}


i.e we are describing the parser in a way similar to the real PARSER like
yacc but this is in reality perl-code.
Very limited perl the things that need to be implemented are ALL LOGICAL
operators plus  Following subs - call and rule!! and may be return!! and
braces for precedence.
The action must be something like addopcode, removeopcede ... etc...
I repeat !! I can figure out about the more complex structures but think it
will work ?!!
Also state information need to be saved too...
=====
iVAN
raptor@unacs.bg
=====






Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About