Content validation depending on file extension [message #1861783] |
Fri, 03 November 2023 14:10 |
jo ber Messages: 94 Registered: August 2018 |
Member |
|
|
Hi
I would like to have only one grammar supporting multiple file extensions say '.it', '.fr' and '.de' with the following grammar:
HelloModel:
greetings+=Greeting*;
Greeting:
ItalianGreeting | GermanGreeting | FrenchGreeting;
ItalianGreeting:
'Buon' 'giorno' name=ID '!';
GermanGreeting:
'Guten' 'Tag' name=ID '!';
FrenchGreeting:
'Bonjour' name=ID '!';
The files with the extension '.it' supports only content with instances of 'ItalianGreeting', etc... How can I relate file extension, the validators and the content being saved in the resource?
Thank you and kind regards,
[Updated on: Fri, 03 November 2023 14:10] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02728 seconds