How make grammar case sensitive?

171 views
Skip to first unread message

Anders Eriksson

unread,
Aug 11, 2015, 7:23:35 PM8/11/15
to GOLD Parsing System
I'm trying to make my grammar case sensitive. I have used "case sensitive"=True, but it still doesn't work

I have this grammar, see below, and the problem is in this line:
<type> ::=  | 'M' | 'm'

I get Warning: line 43 Duplicate production
The production 'type' was redefined.

What have I done wrong?
// Anders

!============================================================
"Name"     = 'Chord Tracks'
"Author"   = 'Anders Eriksson'
"Version"  = '1.0'
"About"    = 'The chord track in a lead sheet.'

"Case Sensitive" = True
"Start Symbol" = <Program>

! -------------------------------------------------
! Character Sets
! -------------------------------------------------
{names} = [ABCDEFG]

! -------------------------------------------------
! Terminals
! -------------------------------------------------


Bar = '|'
    
Slash = '/'
      
ChordName = {names}
     
! -------------------------------------------------
! Rules
! -------------------------------------------------

! The grammar starts below
<Program> ::= <Tracks>
           
<Tracks> ::= <Track> <Tracks>
          | <Track>
          
<Track> ::= <Chord> | Bar | Slash
         
<Chord> ::= 'NC' | ChordName <Accedental> <Modifier>
         
<Accedental> ::= '#' | 'b' | 
 
<Modifier> ::= <type> <spec>
            
<type> ::=  | 'M' | 'm'
      
<spec> ::=  | '7' | '9' | '11' | '13'
                      

!============================================================

Estuardo Lopez

unread,
Aug 12, 2015, 10:52:41 AM8/12/15
to gold-pars...@googlegroups.com
try it:

{ems} = [Mm]

<type> ::=  ems

--
You received this message because you are subscribed to the Google Groups "GOLD Parsing System" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gold-parsing-sy...@googlegroups.com.
To post to this group, send email to gold-pars...@googlegroups.com.
Visit this group at http://groups.google.com/group/gold-parsing-system.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages