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

Expression grammar #3

Closed
hadronized opened this issue Jul 10, 2017 · 0 comments
Closed

Expression grammar #3

hadronized opened this issue Jul 10, 2017 · 0 comments

Comments

@hadronized
Copy link
Owner

hadronized commented Jul 10, 2017

Expr <- AssExpr | Expr , AssExpr
AssExpr <- CondExpr | UnaExpr AssOp AssExpr
CondExpr <- LOrExpr | LOrExpr ? Expr : AssExpr
LOrExpr <- LXorExpr | LOrExpr \|\| LXorExpr
LXorExpr <- LAndExpr | LXorExpr ^^ LAndExpr
LAndExpr <- IOrExr | LAndExpr && IOrExpr
IOrExpr <- EOrExpr | IOrExpr \| EOrExpr
EOrExpr <- AndExpr | EOrExpr ^ AndExpr
AndExpr <- EqExpr | AndExpr & EqExpr
EqExpr <- RelExpr | EqExpr == RelExpr | EqExpr != RelExpr
RelExpr <- ShiftExpr | RelExpr < ShiftExpr | RelExpr > ShiftExpr | RelExpr ≤ ShiftExpr | RelExpr ≥ ShiftExpr
ShiftExpr <- AddExpr | ShiftExpr << AddExpr | ShiftExpr >> AddExpr
AddExpr <- MultExpr | AddExpr + MultExpr | AddExpr - MultExpr
MultExpr <- UnaExpr | MultExpr * UnaExpr | MultExpr / UnaExpr | MultExpr % UnaExpr
UnaExpr <- PostExpr UnaOp
PostExpr <- PrimExpr | PostExpr [ IntExpr ] | FunCall | PostExpr . FieldSel | PostExpr ++ | PostExpr --
PrimExpr <- IDENTIFIER | INTCONST | UINTCONST | FLOATCONST | BOOLCONST | DOUBLECONST | ( Expr )

// and FunCall has a FunIdentifier, which has a PostExpr in it…
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

No branches or pull requests

1 participant