Article View: alt.sources.wanted
Article #1069wanted: WSN to YACC converter
From: Anita Eijs
Date: Wed, 07 Feb 1990 16:11
Date: Wed, 07 Feb 1990 16:11
47 lines
1792 bytes
1792 bytes
I am looking for a program that converts WSN (Wirth Syntax Notation)
into (LEX and) YACC-source.
Some WSN-examples, which should be converted to yacc-sentences, are :
WSN YACC
=== =====
stmt-list = stmt { stmt } . stmt_list:
stmt
| stmt_list stmt ;
par-list = { par } . par_list:
/* empty */
| par_list par ;
sign = [ plus | minus ] . sign: /* empty */
| plus
| minus ;
boolean = ( true | false ) . boolean:
true
| false ;
compound-stmt = compound_stmt:
begin { stmt } end ';'. begin stmt_list_0 end semi ;
stmt_list_0: /* empty */
| stmt_list_0 stmt ;
Some WSN-examples, which should be converted to lex-sentences, are :
WSN LEX
=== ===
greater = '>' . ">" return(GREATER);
if = 'if' . "if" return(IF);
where GREATER and IF are defines.
It also should convert complex WSN-sentences like :
function-call = ( built-in-function | defined-function )
[ '(' parameter { ',' parameter } ')' ] ';' .
Please let me know by e-mail.
Thanks in advance.
--
Anita Eijs : TNO - IBBC USENET : anita@tnoibbc
: PO-box 49 UUCP : ..!hp4nl!tnoibbc!anita
: 2600 AA Delft DOMAIN : anita@tnoibbc.ibbc.tno.nl
: the Netherlands FAX : +31 15 620304
Technical Details
Message-ID:
<1390@tnoibbc.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!geac!torsqnt!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!hp4nl!tnoibbc!anitaShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!geac!torsqnt!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!hp4nl!tnoibbc!anita From: anita@tnoibbc.UUCP (Anita Eijs) Newsgroups: alt.sources.wanted,comp.lang.c,comp.sources.wanted,comp.unix.questions Subject: wanted: WSN to YACC converter Keywords: WSN, Wirth Syntax Notation, YACC, LEX, convert Message-ID: <1390@tnoibbc.UUCP> Date: 7 Feb 90 16:11:00 GMT Lines: 47