Answer the question
In order to leave comments, you need to log in
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question