Released lineage: Hindawi 15 August 2004. Same deliverable shape as Hindi गुरु/C, श्रेणी/C++, प्राथमिक/BASIC, यांत्रिक/ASM, शब्द/lex, व्याकरण/yacc, रोबोट/Logo.

Punjabi (Gurmukhi) · व्याकरण · yacc

Shaili names the host, never the spoken language. Punjabi (Gurmukhi) व्याकरण is still a yacc program.

Open in notebook Original notebook Workbench Keyword stack Romenagri lab

This language, other hosts: C · C++ · BASIC · Assembly · lex · yacc · Logo

1–10 · clauses

  1. This document is the standard of Punjabi (Gurmukhi) व्याकरण / yacc.
  2. This document is not a translation of an English-language ISO text.
  3. The keyword table in this file is normative.
  4. The compile path is Unicode, then ACII, then Romenagri (original algorithm), then the shaili lex, then the host.
  5. A program written to this standard may be viewed in any other published standard of the same shaili.
  6. Viewing does not change compilation identity.
  7. Identifiers are presented through a dictionary. Compilation uses the original identifiers.
  8. Gaps in the keyword table are listed. They are not filled from memory.
  9. Dialect files may add phonetic, word-choice, or syntax rows. They do not replace this table until accepted.
  10. Corrections are submitted as CSV in deposits/csv and deposits/standards.

Keyword table (normative)

10 rows. Hindi C bar is 29 unique-C keys. Other hosts use the 2004 retrieved lex where it exists. Romenagri is the original Unicode → ACII → Romenagri algorithm, not ISO 15919.

nativeRomenagrihost
more details.more details.yylex
ਵ੍ਯਾਕ_ਤ੍ਰੁਟਿwyaaka__trutiyyerror
\'("\\'"\'("\\'"yylex
\"("\\""\"("\\""yylex
ਸ਼_ਪਂਕ੍ਤਿsha_pa_mk_tiyylineno
ਸ਼_ਬ_ਮਾਨsha_ba_maanayylval
ਸ਼_ਸ਼ਬ੍ਦsha_shab_dayylex
ਸ਼_ਮਾਲਾsha_maalaayytext
ਵ੍ਯਾਕwyaakayyparse
*/*/yylex

Demo program

Source file: ../demos/langs/punjabi_wyaaka.uhin. This is the program, not a souvenir line.

<ਸ਼ੈਲੀ ਵ੍ਯਾਕ>
%ਅਣੁ
#ਸਮਾਵੇਸ਼ <ਪ੍ਰਕਾਰ.ਸ>
#ਸਮਾਵੇਸ਼ <ਮਾਨਕਪਨ.ਸ>
#ਘੋषਣਾ ਵ੍ਯਾਕ_ਢੇਰ_ਪ੍ਰਕਾਰ ਦ੍ਵਿਗੁਨ
%ਪੂਰ੍ਣ
 
%ਮੋਹਰ ਅਂਕ
%ਬਾਁਏ '+' '-'
%ਬਾਁਏ '*' '/'
%ਬਾਁਏ '%'
%ਦਾਁਏ ਘਟਾ
 
%%
ਪਂਕ੍ਤਿ   : ਪਂਕ੍ਤਿ ਉਕ੍ਤਿ '\n'   { ਮ_ਲਿਖੋ("%g \n", $2); }
       | ਪਂਕ੍ਤਿ '\n'
       | /* ਐਪਸਿਲਨ */
       ;
ਉਕ੍ਤਿ   : ਉਕ੍ਤਿ '+' ਉਕ੍ਤਿ    { $$ = $1 + $3; }
       | ਉਕ੍ਤਿ '-' ਉਕ੍ਤਿ    { $$ = $1 - $3; }
       | ਉਕ੍ਤਿ '*' ਉਕ੍ਤਿ    { $$ = $1 * $3; }
       | ਉਕ੍ਤਿ '/' ਉਕ੍ਤਿ    { $$ = $1 / $3; }
       | ਉਕ੍ਤਿ '%' ਉਕ੍ਤਿ    { $$ = (int)$1 % (int)$3; }
       | '(' ਉਕ੍ਤਿ ')'     { $$ = $2; }
       | '-' ਉਕ੍ਤਿ %ਪ੍ਰਾਥਮਿਕਤਾ ਘਟਾ  { $$ = - $2; }
       | ਅਂਕ
       ;
%%
 
ਪੂਰ੍ਣਾਂਕ ਸ਼_ਸ਼ਬ੍ਦ()
ਅਣੁ
   ਪੂਰ੍ਣਾਂਕ ਚ;
   ਜਬਤਕ ( ( ਚ=ਅਕ੍षਰ_ਲੋ() ) == ' ' );
   ਅਗਰ ( (ਚ == '.') || (ਹੈ_ਅਂਕ(ਚ)) )
   ਅਣੁ
      ਅਕ੍षਰ_ਵਾਪਸ(ਚ, ਮਾਨਕ_ਨਿਵੇਸ਼);
      ਮ_ਪੂਛੋ("%lf", &ਸ਼_ਬ_ਮਾਨ);
      ਵਾਪਸ ਅਂਕ;
   ਪੂਰ੍ਣ
   ਵਾਪਸ ਚ;
ਪੂਰ੍ਣ
 
ਪੂਰ੍ਣਾਂਕ ਵ੍ਯਾਕ_ਤ੍ਰੁਟਿ()
ਅਣੁ
   ਵਾਪਸ 0;
ਪੂਰ੍ਣ
 
ਪੂਰ੍ਣਾਂਕ ਮੁਖ੍ਯ(ਪੂਰ੍ਣਾਂਕ ਤਸ, ਅਕ੍षਰ *ਤਵ[] )
ਅਣੁ
   ਮ_ਲਿਖੋ("हिंदवी कैल्क्यूलेटर\n");
   ਮ_ਲਿਖੋ("Copyright (C) 2003-2023 Abhishek Choudhary\n");
   ਮ_ਲਿਖੋ("GNU GPL V2 license. NO WARRANTY.\n");
   ਮ_ਲਿਖੋ("आप 0 से 9, +, -, *, / और () का प्रयोग कर सकते हैं।\n");
   ਵ੍ਯਾਕ();
   ਵਾਪਸ 0;
ਪੂਰ੍ਣ

Compile path

  1. Unicode source (this page).
  2. Flatten to the Devanagari hub (Brahmi). Perso-Arabic applies the language table first, then urdu_map, and is lossy.
  3. Original Romenagri: Unicode → ACII (unicode_hin) → Romenagri (acii_chrt / retrieved legacy/Romenagri/acii2rmn.lex). Binding: engine/romenagri-orig.js + canonical_basis.json.
  4. Shaili lex on that ASCII-7 kernel.
  5. Host yacc. The shaili pragma is removed. It is not a host token.

Host after compile

Shaili pragma stripped from host. Host is yacc.

%_a_nnu
#samaawaeesha 
#samaawaeesha 
#ghoaxa_nnaa yyparse_dhaeera_prakaara _dwiguna
%poor_nna
 
%moa_hara _a_mka
%baa_na_aee '+' '-'
%baa_na_aee '*' '/'
%baa_na_aee '%'
%_daa_na_aee ghataa
 
%%
pa_mk_ti   : pa_mk_ti _uk_ti '\n'   { ma_printf("%g \n", $2); }
       | pa_mk_ti '\n'
       | /* _aipasilana yylex
       ;
_uk_ti   : _uk_ti '+' _uk_ti    { $$ = $1 + $3; }
       | _uk_ti '-' _uk_ti    { $$ = $1 - $3; }
       | _uk_ti '*' _uk_ti    { $$ = $1 * $3; }
       | _uk_ti '/' _uk_ti    { $$ = $1 / $3; }
       | _uk_ti '%' _uk_ti    { $$ = (int)$1 % (int)$3; }
       | '(' _uk_ti ')'     { $$ = $2; }
       | '-' _uk_ti %praa_thamika_taa ghataa  { $$ = - $2; }
       | _a_mka
       ;
%%
 
poor_nnaa_mka yylex()
_a_nnu
   poor_nnaa_mka cha;
   jaba_taka ( ( cha=_akxara_loa() ) == ' ' );
   _agara ( (cha == '.') || (_hai__a_mka(cha)) )
   _a_nnu
      _akxara_return(cha, maanaka_niwaeesha);
      ma_poochhoa("%lf", &yylval);
      return _a_mka;
   poor_nna
   return cha;
poor_nna
 
poor_nnaa_mka yyerror()
_a_nnu
   return 0;
poor_nna
 
poor_nnaa_mka mukhya(poor_nnaa_mka _tasa, _akxara *_tawa[] )
_a_nnu
   ma_printf("हिंदवी कैल्क्यूलेटर\n");
   ma_printf("Copyright (C) 2003-2023 Abhishek Choudhary\n");
   ma_printf("GNU GPL V2 license. NO WARRANTY.\n");
   ma_printf("आप 0 से 9, +, -, *, / और () का प्रयोग कर सकते हैं।\n");
   yyparse();
   return 0;
poor_nna

Romenagri of this demo (ASCII-7 kernel)

%_a_nnu
#samaawaeesha 
#samaawaeesha 
#ghoaxa_nnaa wyaaka_dhaeera_prakaara _dwiguna
%poor_nna
 
%moa_hara _a_mka
%baa_na_aee '+' '-'
%baa_na_aee '*' '/'
%baa_na_aee '%'
%_daa_na_aee ghataa
 
%%
pa_mk_ti   : pa_mk_ti _uk_ti '\n'   { ma_printf("%g \n", $2); }
       | pa_mk_ti '\n'
       | /* _aipasilana */
       ;
_uk_ti   : _uk_ti '+' _uk_ti    { $$ = $1 + $3; }
       | _uk_ti '-' _uk_ti    { $$ = $1 - $3; }
       | _uk_ti '*' _uk_ti    { $$ = $1 * $3; }
       | _uk_ti '/' _uk_ti    { $$ = $1 / $3; }
       | _uk_ti '%' _uk_ti    { $$ = (int)$1 % (int)$3; }
       | '(' _uk_ti ')'     { $$ = $2; }
       | '-' _uk_ti %praa_thamika_taa ghataa  { $$ = - $2; }
       | _a_mka
       ;
%%
 
poor_nnaa_mka sha_shab_da()
_a_nnu
   poor_nnaa_mka cha;
   jaba_taka ( ( cha=_akxara_loa() ) == ' ' );
   _agara ( (cha == '.') || (_hai__a_mka(cha)) )
   _a_nnu
      _akxara_return(cha, maanaka_niwaeesha);
      ma_poochhoa("%lf", &sha_ba_maana);
      return _a_mka;
   poor_nna
   return cha;
poor_nna
 
poor_nnaa_mka wyaaka__truti()
_a_nnu
   return 0;
poor_nna
 
poor_nnaa_mka mukhya(poor_nnaa_mka _tasa, _akxara *_tawa[] )
_a_nnu
   ma_printf("हिंदवी कैल्क्यूलेटर\n");
   ma_printf("Copyright (C) 2003-2023 Abhishek Choudhary\n");
   ma_printf("GNU GPL V2 license. NO WARRANTY.\n");
   ma_printf("आप 0 से 9, +, -, *, / और () का प्रयोग कर सकते हैं।\n");
   wyaaka();
   return 0;
poor_nna

The seven hosts on every language

C · C++ · BASIC · Assembly · lex · yacc · Logo

Hindi 2004 bar

A complete stack is the Hindi 15 August 2004 deliverable: a shaili, a keyword table, a program that compiles, a host with the pragma gone, and the original Romenagri path. This page is that shape for Punjabi (Gurmukhi) yacc.

Original Colab chrome: nb.frozen.html. Retrieved 2004 tree: retrieved/legacy/Hindawi. Romenagri sources: retrieved/legacy/Romenagri.