Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sequences in Standard libraries #382

Merged
merged 4 commits into from
Mar 10, 2024
Merged

Conversation

ydah
Copy link
Member

@ydah ydah commented Mar 5, 2024

see: https://gitlab.inria.fr/fpottier/menhir/blob/master/src/standard.mly#L182-205

/*
 * program: preceded(opening, X)
 *
 * =>
 *
 * program: preceded_opening_X
 * preceded_opening_X: opening X
 */
%rule preceded(opening, X): opening X { $$ = $2; }
                          ;

/*
 * program: terminated(X, closing)
 *
 * =>
 *
 * program: terminated_X_closing
 * terminated_X_closing: X closing
 */
%rule terminated(X, closing): X closing { $$ = $1; }
                            ;

/*
 * program: delimited(opening, X, closing)
 *
 * =>
 *
 * program: delimited_opening_X_closing
 * delimited_opening_X_closing: opening X closing
 */
%rule delimited(opening, X, closing): opening X closing { $$ = $2; }
                                     ;

@yui-knk
Copy link
Collaborator

yui-knk commented Mar 10, 2024

Once %inline is supported, let's consider to change these rules to be %inline because they are defined as %inline in Menhir.

@yui-knk yui-knk merged commit e09e1ea into ruby:master Mar 10, 2024
16 checks passed
@ydah ydah deleted the add-sequences branch March 10, 2024 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants