K
K
koi com2015-05-25 23:21:24
Programming languages
koi com, 2015-05-25 23:21:24

Is there a programming language translator with a similar syntax?

There is grammar. I want to find a compiler (JP ---> assembler) with the most similar syntax. Maybe someone knows the sources.
The language is called ASPLE-4
-------GRAMMAR------------------------------------- --------------
::= <program>
<program> ::= BEGIN <last. statements> END
<last. operators> ::= <operator>
<seq. operators> ::= <operator> ; <last operators>
<operator> ::= <assignment operator>
<operator> ::= <loop operator>
<operator> ::= <conditional operator>
<operator> ::= <exchange operator>
<assignment operator> : := <identifier> := <expression>
<conditional operator> ::= IF <comparison> THEN <last operators> ELSE <last. operators> FI
<loop statement> ::= WHILE <expression> DO <seq. statements> END
<exchange operator> ::= INPUT <ident list>
<exchange operator> ::= OUTPUT <expression>
<ident list> ::= <ident>
<ident list> ::= <ident. > , <identifier list>
<expression> ::= <factor>
<expression> ::= <expression> + <factor>
<expression> ::= <expression> - <factor>
<factor> ::= <primary >
<factor> ::= <factor> * <primary>
<primary> ::= <ident.>
<primary> ::= <constant>
<primary> ::= ( <expression> )
<primary> ::= ( <comparison>
<comparison> ::= <expression> <> <expression>
<constant> ::= <logical constant>
<constant> ::= <number>
<logical constant> ::= TRUE
<logical constant> ::= FALSE
<number> ::= <number>
<number> ::= <number> <number>
<number> ::= 0
<number> ::= 1
<number> ::= 2
<number > ::= 3
<digit> ::= 4
<digit> ::= 5
<digit> ::= 6
<digit> ::= 7
<digit> ::= 8
<digit> ::= 9
<ident. > ::= <letter>
<ident.> ::= <ident.> , <letter>
<letter> ::= H
<letter> ::

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Burov, 2015-05-25
@BuriK666

Pascal

J
jackroll, 2015-05-26
@jackroll

en.wikipedia.org/wiki/List_of_Hello_world_program_...
www.roesler-ac.de/wolfram/hello.htm
c2.com/cgi/wiki?HelloWorldInManyProgrammingLanguages

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question