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

Re: Now, to try again...

Thread Previous | Thread Next
David Grove
December 17, 2000 19:52
Re: Now, to try again...
Message ID:

Sam Tregar <> wrote:

 > On Sun, 17 Dec 2000, Dan Sugalski wrote:
 > > For my part, at least, I've been thinking of something either
 > > or very simple parameter setting/checking (like stuff in, say, your
 > > average .rc file with a little control flow thrown in) when it's
 > > brought up.  Occasionally things FORTHish, but only when I really
 > > desperately need sleep. :)
 > Sounds like Scheme and TCL to me.  Ok, it's a bit of stretch from .rc
 > TCL but not too far!
 > > It is sort of a language design issue, but in many ways it depends on
 > what
 > > sort of facilities we can provide with reasonable cost.
 > I really don't see why we can't provide hooks to be used by entirely
 > separate parsers.  To my mind it's *more* expensive to try to support
 > other syntax's in the main parser than it is to just call out to
 > external per-syntax parsers.  Sure, the person doing the parser for a
 > given language will have to write a new parser, but is there really
 > hope that we're going to relieve them of that task?
 > > Nope, not bytecode--a syntax tree. (Though it could go the whole
 > > route if it wants, I suppose) Going full bytecode's not necessary.
 > Good point.

char *foo = "Some rather large ASCIIZ\nstring that's longer than this";
char *i, *j;
for(i = foo; *i; i++)
  if(*i == 13)
    for(j = i+1; *j; j++)
      if((*j){j - i = *j}
    j-i = *j;

Ok, my C's rather rusty, but are we interested in parsing that? In being
able to? Is Perl going to provide API to access pointers through source
code? Pointers are an example, not a point. The point is, to accomplish
the goal the way it's being expressed would be to provide the ability to
do anything with perl internals that can be done in any other language
that has ever existed, and leave the flexibility to do everything that
every other language will ever do in the future.

The point is, again, do we want the languages, or just to be able to steal
this and that syntax if the desire arises?

So, we want people to use perl to take in Java source code and spit out
Java bytecode (that's been expressed as one among many desired output
formats). I thought Sun was handling that particular task... but ok.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About