When using this grammar with the builder & the engine, few of the reductions go missing in the tree with the engine parser. Could you please take a look at it. I'm using goldparser for the first time, so please let me know if there is something wrong in my grammar implementation or engine usage.
The grammar is for EDDL(Electronic device description language). The grammar implementation is as seen below.
"Name" = 'EDDL grammar'
"Author" = 'Ashwin Jason Fernandes'
"Version" = 'The version of the grammar and/or language'
"About" = 'A short description of the grammar'
Hi @ridencww ,
When using this grammar with the builder & the engine, few of the reductions go missing in the tree with the engine parser. Could you please take a look at it. I'm using goldparser for the first time, so please let me know if there is something wrong in my grammar implementation or engine usage.
MANUFACTURER 252, DEVICE_TYPE 1, DEVICE_REVISION 1, DD_REVISION 1, MANUFACTURER_EXT "xyz"
BLOCK DeviceBlock { TYPE PHYSICAL; NUMBER 1; }
The grammar is for EDDL(Electronic device description language). The grammar implementation is as seen below.
"Name" = 'EDDL grammar' "Author" = 'Ashwin Jason Fernandes' "Version" = 'The version of the grammar and/or language' "About" = 'A short description of the grammar'
"Case Sensitive" = True "Start Symbol" =
{Hex Digit} = {Digit} + [abcdefABCDEF] {Oct Digit} = [01234567]
{String Ch} = {Printable} - ["]
{Id Head} = {Letter} + [_] {Id Tail} = {Id Head} + {Digit}
DecLiteral = [123456789]{digit}*
HexLiteral = 0X | 0x{Hex Digit}+ OctLiteral = 0{Oct Digit} FloatLiteral = {Digit}'.'{Digit}+
Id = {Id Head}{Id Tail}*
! =================================================================== ! Comments ! ===================================================================
Comment Start = '/' Comment End = '/' Comment Line = '//'
! ------------------------------------------------- ! Character Sets ! -------------------------------------------------
{String Chars} = {Printable} + {HT} - ["]
! ------------------------------------------------- ! Terminals ! -------------------------------------------------
!Identifier = {Letter}{AlphaNumeric} StringLiteral = '"' {String Chars}\ '"'
! ------------------------------------------------- ! Constants / Literals ! -------------------------------------------------
|
|
! ===================================================================
! Type Declaration
! ===================================================================
! ===================================================================
! Block Declaration
! ===================================================================
::= BLOCK Id '{' '}'
::= TYPE ';'
| NUMBER';'
|
::= PHYSICAL
| TRANSDUCER
| FUNCTION
! ===================================================================
! Variable Declaration
! ===================================================================
::= VARIABLE Id '{' '}'
::=
|
|