Hi,
I am wondering if it is already possible to generate language examples
from a given ANTLR grammar. I.e. in language theory we say that for a
given grammar /G/ the language that it defines is denoted by L(/G/).
An example for the very simple grammar /simpleLetters/
start : '"' LetterSequence '"';
LetterSequence : LETTER*;
LETTER : 'a'|'b'|'c';
the language it defines would be
L(/simpleLetters/) = { "", "a", "b", "c", "ab", "ac", "aa", "aaa",
"aab", "aac", "aba", "abb", "abc", ... }
I of course could try all strings of all combinations of unicode chars
of length /n/, but maybe there is a better way?
Best,
Paul
--
Paul Bouché
Voice: +49 30 590080-1284
Nokia Siemens Networks GmbH & Co. KG, An den Treptowers 1, 12435 Berlin, Germany
Sitz der Gesellschaft: München / Registered office: Munich
Registergericht: München / Commercial registry: Munich, HRA 88537
WEEE-Reg.-Nr.: DE 52984304
Persönlich haftende Gesellschafterin / General Partner: Nokia Siemens Networks
Management GmbH
Geschäftsleitung / Board of Directors: Lydia Sommer, Olaf Horsthemke
Vorsitzender des Aufsichtsrats / Chairman of supervisory board: Lauri Kivinen
Sitz der Gesellschaft: München / Registered office: Munich
Registergericht: München / Commercial registry: Munich, HRB 163416
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address