Bug 5412 - fhpd prints antlr error messages; have wrong column
Summary: fhpd prints antlr error messages; have wrong column
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Andrew Cagney
URL:
Keywords:
Depends on:
Blocks: 5421
  Show dependency treegraph
 
Reported: 2007-11-27 19:43 UTC by Andrew Cagney
Modified: 2007-12-12 03:50 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2007-11-27 19:43:59 UTC
For instance
  print foo->
gives the error as being at column 4.
Comment 1 Andrew Cagney 2007-12-12 03:50:42 UTC
    Improve expression error messages.

    frysk-core/frysk/expr/ChangeLog
    2007-12-11  Andrew Cagney  <cagney@redhat.com>

        * TestArithmetics.java (checkErrorExpr(String,String)): New.
        (testEndOfFileError()): New.
        (testExpressionError()): New.
        (checkVariableExpr(String expr, long value)): New.
        (testMember()): New.
        (expr(String)): Delete.
        (checkScratchExpr(String,long)): Replace checkExpr(long,String).
        * SyntaxException.java: New.
        * TestVariables.java: Delete; merge into TestArithmetics.java.
        * ExpressionFactory.java (parse(ExprSymTab,String)): Do not append
        ETX character; handle antlr exceptions.
        (complete(ExprSymTab,String,int,List)): Ditto.
        * CExpr.g: Terminate the expression with EOF, not ETX.

(fhpd) print &

Error: incomplete expression
(fhpd) print 1...2

Error: unexpected input: expecting '.', found '2'
(fhpd) print 1 . . 2

Error: invalid expression at: . 2