Skip to content

Commit

Permalink
accepts most existing code; need to let-bind actor refs
Browse files Browse the repository at this point in the history
  • Loading branch information
crusso committed Nov 21, 2024
1 parent c7731f3 commit 8b941e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/md/examples/grammar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,10 @@
'<>>='
'@='


<ob_actor> ::=
<exp_obj>
'(' 'actor' <exp_plain> (':' <typ>)? ')'
'actor' <exp_plain>

<exp_obj> ::=
Expand Down
10 changes: 9 additions & 1 deletion src/mo_frontend/parser.mly
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

%{
open Mo_def
open Mo_types
Expand Down Expand Up @@ -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 }

Expand Down

0 comments on commit 8b941e2

Please sign in to comment.