Advertisement
Void-voiD

Untitled

Jan 12th, 2021
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. < Program > → e | < TopStatements >
  2. < TopStatements > → < TopStatement > | < TopStatement > < TopStatements >
  3. < TopStatement > → < Statement > | < FunctionDefinition >
  4. < FunctionDefinition > → function IDENTIFIER < FormalParametersAndBody >
  5. < FormalParametersAndBody > → ( FormalParameters ) { TopStatements }
  6. < FormalParameters > → < FormalParameter > | < FormalParameter >
  7. < FormalParameters >
  8. < FormalParameter > → IDENTIFIER
  9. < VariableDefinition > → var < VariableDeclarationList >
  10. < VariableDeclarationList > → < VariableDeclaration > |
  11. < VariableDeclaration > | < VariableDeclarationList >
  12. < VariableDeclaration > → IDENTIFIER < AssignmentExpression >
  13. < Statement > → < Expression > ; | < IfStatement > | < DoStatement >
  14. < IfStatement > → if < ParenthesizedExpression > < Statement > |
  15. if < ParenthesizedExpression > < Statement > else < Statement >
  16. < DoStatement > → do < Statement > while < ParenthesizedExpression >
  17. < ParenthesizedExpression > → ( < Expression > )
  18. < Expression > → < AssignmentExpression > |
  19. < AssignmentExpression > < Expression >
  20. < AssignmentExpression > → < PrimaryExpression > = < AssignmentExpression >
  21. < PrimaryExpression > → NUMBER | STRING | IDENTIFIER
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement