#45 Parser problem in special-names section

closed
nobody
None
5
2009-03-29
2006-06-22
Anonymous
No

Missing final '.' error
...
...
CONFIGURATION SECTION.
SPECIAL-NAMES.
decimal-point is comma
* INPUT-OUTPUT SECTION.
* FILE-CONTROL.
...
...

*
*htcobol debugging output
*
htcobol -c -P -I../copybooks -I. teste.cob
SCAN( 0):NEW FILE/LINE : teste.cob,0
SCAN( 1): <reserved>: IDENTIFICATION
SCAN( 1): <reserved>: DIVISION
SCAN( 2):<PERIOD_TOK>:
SCAN( 2): <reserved>: PROGRAM-ID
SCAN( 2):<PERIOD_TOK>:
SCAN( 2):-> IDENT_ST
SCAN( 2): <IDSTRING>: TEST00
SCAN( 2):-> INITIAL
SCAN( 3):<PERIOD_TOK>:
SCAN( 3): <reserved>: ENVIRONMENT
SCAN( 3): <reserved>: DIVISION
SCAN( 5):<PERIOD_TOK>:
SCAN( 5):-> ENVIR_ST
SCAN( 5): <reserved>: CONFIGURATION
SCAN( 5): <reserved>: SECTION
SCAN( 6):<PERIOD_TOK>:
SCAN( 6): <reserved>: SPECIAL-NAMES
SCAN( 7):<PERIOD_TOK>:
SCAN( 7): <reserved>: decimal-point
SCAN( 7): <reserved>: is
SCAN( 7): <reserved>: comma
SCAN( 11): <reserved>: DATA

and the program never returns...

Discussion

  • Nobody/Anonymous

    Logged In: NO

    This looks like a Bison (GNU YACC) problem.

    If TC was compiled using Bison, it will hang under certain
    grammar rules.

    I'm not sure if this a bug with Bison, or a TC grammar problem.

    If you compile TC using Berkeley's YACC (BYACC version
    1.93), then the TC compiler will not hang.

    htcobol -c -P t60622.cob
    t60622.cob: 11: error: syntax error, on or before 'DATA'
    t60622.cob: 11: error: invalid format in SPECIAL-NAMES
    clause, on or before 'DATA'
    make: *** [t60622.o] Error 12

     
  • David Essex

    David Essex - 2009-03-29
    • status: open --> closed
     

Log in to post a comment.