# ProfessorJ Beginner Language

- PROGRAM
  - IMPORT ... DEF ...
- IMPORT
  - `import` QUALIFIED_NAME ;
  - `import` QUALIFIED_NAME .*;
- DEF
  - CLASS-DEF
  - INTERFACE-DEF
- CLASS-DEF
  - `class` NAME { MEMBER MEMBER ... }
  - `class` NAME `implements` NAME { MEMBER MEMBER ... }
- INTERFACE-DEF
  - `interface` NAME { METHOD-DEC ... }
- MEMBER
  - CONSTRUCTOR
  - METHOD
  - FIELD
- CONSTRUCTOR
  - NAME (TYPE NAME, ...) { ASSIGNMENT ...}
- METHOD
  - TYPE NAME (TYPE NAME, ...) { STATEMENT }
- FIELD
  - TYPE NAME;
- METHOD-DEC
  - TYPE NAME (TYPE NAME, ...);
- ASSIGNMENT
  - `this.`NAME `=` EXPRESSION;
- STATEMENT
  - `if` (EXPRESSION) STATEMENT `else` STATEMENT
  - `return` EXPRESSION;
- EXPRESSION
  - EXPRESSION OP EXPRESSION
  - `-`EXPRESSION
  - EXPRESSION `&&` EXPRESSION
  - EXPRESSION `||` EXPRESSION
  - `!`EXPRESSION
  - `this`
  - EXPRESSION`.`NAME( EXPRESSION ...)
  - EXPRESSION`.`NAME
  - `new` NAME( EXPRESSION ...)
  - (EXPRESSION)
  - NAME
  - NUMBER
  - CHARACTER
  - `true`
  - `false`
  - STRING
  - `check` EXPRESSION `expect` EXPRESSION
  - `check` EXPRESSION `expect` EXPRESSION `within` EXPRESSION
- QUALIFIED-NAME
  - NAME`.` ...NAME
- NAME
  - a sequence of keyboard characters not including certain characters and not forbidden to use as a name
- TYPE
  - prim-type
  - NAME
- OP
  - `+, -, *, /`
  - `<, <=, ==, >, >=`