starting vWG fun

Jose E. Marchesi jemarch@gnu.org
Mon Mar 10 20:25:44 GMT 2025


Very nice.

> Just this evening I got my 1st Algol68 program parsed by the Fisher parser,
> with a restricted grammar for now, where the only program tested was
> BEGIN SKIP END
>
> The fun comes from the handling of pragments before the SKIP token.
> The grammar test_pragment.vwg parses eg.
> ( CO 0 a CO PRAGMAT 0 PRAGMAT § a § SKIP )
>
> I used The § symbol instead of the cent symbol. 
>
> Here is the parse tree (output by ".pt" after successful parse)
>
> program*
> ..strongvoidnew_closedclause*
> ....skiptokenoption<briefpack>*
> ......briefbegintoken*
> ........"("
> ......skiptokenoption*
> ........skiptoken*
> ..........pragmentsequenceoption*
> ............pragmentsequence*
> ..............pragment*
> ................briefcommentsymbol*
> .................."CO"
> ................briefcommentitemsequenceoption*
> ..................briefcommentitemsequence*
> ....................briefcommentitem*
> ......................characterglyph*program*
> ..strongvoidnew_closedclause*
> ....skiptokenoption<briefpack>*
> ......briefbegintoken*
> ........"("
> ......skiptokenoption*
> ........skiptoken*
> ..........pragmentsequenceoption*
> ............pragmentsequence*
> ..............pragment*
> ................briefcommentsymbol*
> .................."CO"
> ................briefcommentitemsequenceoption*
> ..................briefcommentitemsequence*
> ....................briefcommentitem*
> ......................characterglyph*
> ........................digitzerosymbol*
> .........................."0"
> ........................boldpragmatitemsequence*
> ....................boldpragmatsymbol*
> ......................"PRAGMAT"
> ..................pragmentsequenceoption*
> ....................pragmentsequence*
> ......................pragment*
> ........................styleibcommentsymbol*
> .........................."§"
> ........................styleibcommentitemsequenceoption*
> ..........................styleibcommentitemsequence*
> ............................styleibcommentitem*
> ..............................characterglyph*
> ................................letterasymbol*
> .................................."a"
> ............................styleibcommentitemsequence*
> ........................styleibcommentsymbol*
> .........................."§"
> ......................pragmentsequenceoption*
> ..........skipsymbol*
> ............"SKIP"
> ......briefendtoken*
> ........")"


More information about the Algol68 mailing list