Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Modules to reduce syntax?

by ikegami (Patriarch)
on Dec 22, 2021 at 20:04 UTC ( #11139843=note: print w/replies, xml ) Need Help??


in reply to Modules to reduce syntax?

I saw semi::semicolons, so I figured the rest of the language could be changed some how as well?

Semi::Semicolons take a non-Perl program, translates it to Perl, then runs that. Feel free to create your own programming language and translator just like Semi::Semicolons did. Then, all you need is this:

package MyLang; use Filter::Simple; sub translate { my $mylang_code = shift; ... return $perl_code; } FILTER { $_ = translate($_) } 1

Note that ref[foo] already means something in Perl. (It means the same thing as ref( [ foo() ] ).) So you're new language is going to have to change that too.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2022-08-18 22:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?