diff --git a/doc/md/examples/grammar.txt b/doc/md/examples/grammar.txt index f362f75a646..40c6861c72a 100644 --- a/doc/md/examples/grammar.txt +++ b/doc/md/examples/grammar.txt @@ -153,8 +153,10 @@ '<>>=' '@=' + ::= + '(' 'actor' (':' )? ')' 'actor' ::= diff --git a/src/mo_frontend/parser.mly b/src/mo_frontend/parser.mly index a8343e146d5..09d0720337d 100644 --- a/src/mo_frontend/parser.mly +++ b/src/mo_frontend/parser.mly @@ -1,3 +1,4 @@ + %{ open Mo_def open Mo_types @@ -578,13 +579,20 @@ lit : | CATASSIGN { CatOp } -bl : DISALLOWED { PrimE("dummy") @? at $sloc } +bl :// DISALLOWED { PrimE("dummy") @? at $sloc } + | LPAR ACTOR e=exp_plain t=annot_opt RPAR + { annot_exp (ActorUrlE e @? at $sloc) t } + | ACTOR e=exp_plain + { ActorUrlE e @? at $sloc } +(* { ActorUrlE e @? at $sloc } *) %public ob : | e=exp_obj { e } %public ob_actor : | e=exp_obj { e } + | LPAR ACTOR e=exp_plain t=annot_opt RPAR + { annot_exp (ActorUrlE e @? at $sloc) t } | ACTOR e=exp_plain { ActorUrlE e @? at $sloc }