BUDGET: 4500-6000
APPLY ONLY IF YOU HAVE MADE ANY COMPILER BEFORE USING JAVA IN NET BEANS
The following is a LALR grammar for a PL/SQL scripting programming language. This is a short description of the language. Everything which is not described here is the same as high level programming language.
- Comments:
-- Single line comment
/* */ Multiple line comment
- Single line comments may appear anywhere, and the scanner ignores the rest of the line.
- User identifiers are in lower case only.
- Reserved words are in uppercase only.
- All identifiers must be declared.
- No identifiers can have multiple definitions.
- Types of identifiers must be matched.
- Blanks, tabs, and ends of line serve as token separators. (They may not appear
within tokens).
- Identifiers are strings of letters, digits, $, #, and underscores starting with a letter.
- Maximum size of an identifier is 30 characters.
- Data types are: BOOLEAN, NUMBER, SMALLINT,
POSITIVE, CHAR, VARCHAR2.
- Data casting is permitted.
- String, 'VARCHAR2' is in a single quotation mark (' ') with the size declared. VARCHAR2 may Not be declareed without size.
- Numbers must be declared with a size. That is the number of digits.
- Single character CHAR, is in single quotation mark (' ').
- Blocks are started with BEGIN and ends with END
- Outputs are: DBMS_OUTPUT.PUT_LINE (id) --writes id and eoln
[login to view URL] (id) --writes id
DBMS_OUTPUT.NEW_LINE --writes eoln
- For input use: & id
- Program ends with a \
- Every statement terminates with a semicolon.
- Bold characters/words are terminal symbol.