#24 Bugs in our parser

closed-fixed
None
3
2003-04-12
2003-03-16
Hudson Reis
No

Hi,

There was the errors which I found in our parser:

Thanks
Hudson

* Bug 1.
The parser don't show errors in compilation time when I
write the crt status clause wrongly. In execution, the
function keys don't work.

ex:

environment division.
configuration section.
special-names.
*> crt status is Tecla.
crt-status is Tecla.

data division.
working-storage section.
77 Tecla pic 9(004) value
zeros.

Example programs: parserverbs03.cob

* Bug 2.
The parser don't validating correctly the variable
names. It have leaving pass an cedilla(ç) before any
verbs, as the ACCEPT and DISPLAY verbs.
ex:

procedure division.
display "type a valor:" line 11 position 10
accept Field çline 11 çposition 24 auto
secure
stop run.

Example programs: parserverbs00.cob

* Bug 3.
The parser isn't validating correctly the declared
sentences.
The parser don't show errors if used the IF verb and I
insert the condition and the value of condition
together.

procedure division.
perform until ws-Exit-True
display "type a valor:" line 11
position 10
accept Field çline 11 çposition 24
auto update
if Field equal"A" *> Notice that
the string equal"A"
*> is without spaces
set ws-Exit-True to true
end-if
end-perform
stop run.

Example programs: parserverbs01.cob

* Bug 4.
The Parser isn't requiring the necessary pontuation in
any clauses, as before of a declaration of a label and
in the AUTHOR clause.
In case of AUTHOR clause, sometimes this error cannot
be viewed if the environment division is declared, but
just in case isn´t declared, the errors are showed in
wrong lines, difficulting the error compreention by
user.

identification division.
program-id. parserverbs04.
author. Hudson Reis (Note que năo tem o ponto
final)

environment division. (Note que năo tem toda a
environment totalmente declarada).

data division.
working-storage section.
77 Var pic 9(001) value zeros.

Programas exemplo: parserverbs04.cob, parserverbs05.cob

* Bug 5.
The parser isn't validating the correct sintax in to
declare the STOP RUN verb.
O parser năo está validando a sintaxe correta ao se
declarar o
verbo stop run.

procedure division.
stop-run.

Programas exemplo: parserverbs06.cob,

Discussion

  • Hudson Reis
    Hudson Reis
    2003-03-16

    parser example bugs

     
    Attachments
  • Bernard Giroud
    Bernard Giroud
    2003-03-26

    Logged In: YES
    user_id=1011

    Bug no 3: this is not a bug; the " is a normal delimiter and
    consequently terminates the token EQUAL.
    Bug no 4: this is not a bug; the complete line is comment.
    Bug no 5: partial bug; when written like that stop-run is the
    only paragraph of the program, and is a valid para name. The
    bug actually lies in the fact that an empty program should
    compile and run OK.

     
  • Bernard Giroud
    Bernard Giroud
    2003-03-26

    • priority: 5 --> 3
    • assigned_to: nobody --> bgiroud
     
  • Bernard Giroud
    Bernard Giroud
    2003-04-12

    • status: open --> closed-fixed
     
  • Bernard Giroud
    Bernard Giroud
    2003-04-12

    Logged In: YES
    user_id=1011

    Bug no 1, 2 and 5 fixed.