Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- < Program > → e | < TopStatements >
- < TopStatements > → < TopStatement > | < TopStatement > < TopStatements >
- < TopStatement > → < Statement > | < FunctionDefinition >
- < FunctionDefinition > → function IDENTIFIER < FormalParametersAndBody >
- < FormalParametersAndBody > → ( FormalParameters ) { TopStatements }
- < FormalParameters > → < FormalParameter > | < FormalParameter >
- < FormalParameters >
- < FormalParameter > → IDENTIFIER
- < VariableDefinition > → var < VariableDeclarationList >
- < VariableDeclarationList > → < VariableDeclaration > |
- < VariableDeclaration > | < VariableDeclarationList >
- < VariableDeclaration > → IDENTIFIER < AssignmentExpression >
- < Statement > → < Expression > ; | < IfStatement > | < DoStatement >
- < IfStatement > → if < ParenthesizedExpression > < Statement > |
- if < ParenthesizedExpression > < Statement > else < Statement >
- < DoStatement > → do < Statement > while < ParenthesizedExpression >
- < ParenthesizedExpression > → ( < Expression > )
- < Expression > → < AssignmentExpression > |
- < AssignmentExpression > < Expression >
- < AssignmentExpression > → < PrimaryExpression > = < AssignmentExpression >
- < PrimaryExpression > → NUMBER | STRING | IDENTIFIER
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement