procedure call name vs.association_list ambiguity

R

root

Consider the specification,

procedure_call ::= procedure_name [ ( parameter_association_list ) ]

association_list ::= association_element { , association_element }

name ::= simple_name |

indexed_name ::= prefix ( expression { , expression } )

How do you handle (1) in PROC1(1): as association list or as expression?
 
K

KJ

Consider the specification,

procedure_call ::= procedure_name [ ( parameter_association_list ) ]

association_list ::= association_element { , association_element }

name ::= simple_name |

indexed_name ::= prefix ( expression { , expression } )

How do you handle (1) in PROC1(1): as association list or as expression?

Assuming PROC1 is declared to be a procedure, then the expression 1 is used as the first association element in that procedure.

Kevin Jennings
 
V

valtih1978

Do you mean that they merge somehow? I have never heard about such
parsing technique. Normally, parser takes either name production or
association list route. It cannot end up in both expression (which is
name extension) and association element that follows it, at the same
time. Otherwise, everything is ok.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top