Results 1 to 2 of 2
  1. #1
    chmaykil is offline Member
    Join Date
    Jun 2014
    Rep Power

    Default Javacc Token in grammar file

    I have something like that ( USERUNITS 0.001; PHYSUNITS 9.999999999999999E-10; ) and I'm developping a parser with Javacc so How can I define a FLOAT_POINT in javacc (.jj token) ?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Voorschoten, the Netherlands
    Blog Entries
    Rep Power

    Default Re: Javacc Token in grammar file

    You have to define a rule for the lexer by that name (scanning floating point numbers is a job for the lexical analyzer; not the parser). Also, read the manual for JavaCC.

    kind regards,

    Build a wall around Donald Trump; I'll pay for it.

Similar Threads

  1. javacc : Retrieve the grammar file (.jj)
    By chmaykil in forum Advanced Java
    Replies: 1
    Last Post: 06-04-2014, 12:50 AM
  2. Replies: 2
    Last Post: 05-17-2014, 09:37 PM
  3. BNF Grammar and reading from a txt file
    By mr_zebes in forum New To Java
    Replies: 2
    Last Post: 03-21-2014, 08:16 AM
  4. Replies: 0
    Last Post: 12-09-2011, 11:28 PM
  5. Replies: 2
    Last Post: 11-21-2011, 12:09 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts