Thursday, June 9, 2022
HomeWordPress DevelopmentThe way in which to learn Perl core supply codes

The way in which to learn Perl core supply codes


I clarify the best way to learn Perl core supply codes. Perl 5.36.0 is used on this description.

That is initially The way in which to learn Perl core supply codes | Perl ABC



The place is predominant perform?

predominant perform is the entry level of perl command.

It’s written in perlmain.c, however Perl has no C supply code that identify is perlmain.c.

perlmain.c is generated by Makefile.SH utilizing ExtUtils::Miniperl.



The place is processing perl command line arguments?

Processing perl command line arguments are began from perl_parse perform.

perl_parse is outlined in perl.c.

Go ahead to parse_body perform.

parse_body is outlined in perl.c

You’ll be able to see the processing logic of command line arguments.



The place is tokenizer?

Subsequent is the tokenizer. The components of Perl syntax are transformed to tokens.

Tokenizing is began from lex_start perform.

lex_start is outlined in toke.c.



The place is parser?

Subsequent is the parser. The parser converts tokens to AST(abstruct syntax tree).

Parsing is began from yyparse perform.

yyparse is outlined in perly.c.

perly.c is generated from perly.y utilizing bison.



The place is Perl information construction?

The kind of the scalar worth SV and its features are outlined in sv.h and sv.c.

The kind of the array AV and its features are outlined in av.h and av.c.

The kind of the hash HV and its features are outlined in hv.h and hv.c.



The place does Perl run?

After AST is optimized, Perl run from perl_run perform.

perl_run is outlined in perl.c.

Go ahead to run_body perform.

run_body is outlined in perl.c.

Go ahead to CALLRUNOPS.

CALLRUNOPS is outlined as PL_runops in perl.h

Moreover, macros are outlined as follows.

perl.h:#outline CALLRUNOPS  PL_runops
embedvar.h:#outline PL_runops            (vTHX->Irunops)
intrpvar.h:PERLVARI(I, runops,  runops_proc_t, RUNOPS_DEFAULT)
perl.h:# outline RUNOPS_DEFAULT Perl_runops_standard

Go ahead to Perl_runops_standard perform.

Perl_runops_standard is outlined in run.c.

The member op_ppaddr of OP construction is known as.

op_ppaddr is a perform pointer to perlform an operation.



The place are operators outlined?

Operators are outlined within the following sources.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments