Tcl Library Source Code

2_fun_arithmetic at [7e7f01191f]
Login

File modules/pt/tests/data/ok/peg_peg-templated/2_fun_arithmetic artifact 3b340edf06 part of check-in 7e7f01191f


# -*- text -*-
# Parsing Expression Grammar 'TEMPLATE'.
# Generated for unknown, from file 'TEST'

PEG TEMPLATE (Expression)

 AddOp      <- '-' / '+' ;
 Digit      <- '0' / '1' / '2' / '3' / '4' / '5' / '6' / '7' / '8' / '9' ;
 Expression <- Function / '(' Expression ')' / Factor (MulOp Factor)* ;
 Factor     <- Term (AddOp Term)* ;
 Function   <- Sinus ;
 MulOp      <- '*' / '/' ;
 Number     <- Sign? Digit+ ;
 Sign       <- '-' / '+' ;
 Sinus      <- 's' 'i' 'n' '(' Expression ')' ;
 Term       <- Number ;

END;

#
#