I'm trying to write a grammar rule to specify that smake-line opening brace and next-line opening brace are unimportant differences e.g.
module A1_3_data_classes_prov_ext_2 {
/* Anonymous documentation */
and
module A1_3_data_classes_prov_ext_2
{
// Anonymous documentation
I can get the expression to detect space + { + newline for the top one but putting the rule in for the bottom one - which would be newline + { + newline doesn't work. Here are the two regexps I've used:
\s+[{]\xd\s*
That one works
[{]\xd+
That's what I'm having to use for the second one but really I want it to look like this:
\xd[{]\xd+
so that it detects the newline before the brace.
Am I doing something wrong or is BC3 not able to handle this sort of thing?
Many thanks for any help you can provide
module A1_3_data_classes_prov_ext_2 {
/* Anonymous documentation */
and
module A1_3_data_classes_prov_ext_2
{
// Anonymous documentation
I can get the expression to detect space + { + newline for the top one but putting the rule in for the bottom one - which would be newline + { + newline doesn't work. Here are the two regexps I've used:
\s+[{]\xd\s*
That one works
[{]\xd+
That's what I'm having to use for the second one but really I want it to look like this:
\xd[{]\xd+
so that it detects the newline before the brace.
Am I doing something wrong or is BC3 not able to handle this sort of thing?
Many thanks for any help you can provide
Comment