Open peterremote1980 opened 6 years ago
Hi,
the place for support is the google discussion group. Please close this.
Eric
Le 9 avr. 2018 à 01:54, 火雲邪神 notifications@github.com a écrit :
Hi all
I am using antlr4 and i want to parse this:
(bits 64){ aaa }
IF i delete this line "code16_32 : 'aaa'" in my grammar, it can parse, why? It shouldn't jump into rule "code16_32". Please help !!!
My grammar is :
grammar Assembler; WS : [ \t]+ -> skip; NL : '\r'? '\n' -> skip; LINE_COMMENT : ';' ~[\r\n]*; INSTRUCTION : [a-z]+; IDENTIFIER : [a-zA-Z] [a-zA-Z0-9]+; SECTION_NAME : '.' IDENTIFIER; LABEL_POSTFIX : 'equ' ~[;]*; assemble : lines | EOF ; lines : line* ; line : bits64 ; comment : LINE_COMMENT ; code16_32_64 : 'DUMMY' ; code16 : 'DUMMY' ; code16_32 : 'aaa' # aaa | 'aad' # aad | 'aad' IMM8 # aad_imm8 | 'aam' # aam | 'aam' IMM8 # aam_imm8 | 'aas' # aas | 'adc' AL ',' IMM8 # adc_imm8 | 'adc' AX ',' IMM16 # adc_imm16 ; code32 : INSTRUCTION ; code32_64 : INSTRUCTION ; code64 : INSTRUCTION {System.err.println("fuck");} ; data : 'db' STRING ',' NUMBER ; bits64 : '(bits 64){' (code64 | code32_64 | code16_32_64)* comment? '}' ; Thanks From Peter — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <https://github.com/antlr/antlr4/issues/2272>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ADLYJJpyS0RzhRWOk7v1ZoqubGk7671Wks5tmk7egaJpZM4TLodw>.
Hi all
I am using antlr4 and i want to parse this:
IF i delete this line "code16_32 : 'aaa'" in my grammar, it can parse, why? It shouldn't jump into rule "code16_32". Please help !!!
My grammar is :
grammar Assembler;