Opened 15 years ago

Closed 9 years ago

#4 closed defect (fixed)

BNF wrong for leading solidus

Reported by: Gunther Schadow Owned by:
Priority: major Milestone: Revision 1.9
Component: Keywords:

Description (last modified by Gunther Schadow)

Eric Russell points out:

Is the definition unit for the Oersted "/[pi].A/m" valid in UCUM?

In the BNF grammar, it appears that a solidus that is not preceeded by anything may only be followed by a <component>, which would mean the ".A/m" in the Oersted's definition unit couldn't be valid unless it were parenthesized. However, the pushdown-state automaton does not appear to contain the same restriction on the initial solidus. Are the two actually inconsistent, or am I misunderstanding something?

Let's see, the intent is:

§7 algebraic unit terms ![...] ■3 The division operator can be used as a binary and unary operator, i.e. a leading solidus will invert the unit that directly follows it.

so /a.b/c is clear the same as 1/a.b/c or a-1.b.c-1.

The BNF seems not to reflect that:

<component> ::=	<annotatable><annotation>
            | <annotatable>
            | <annotation>
            | <factor>
            | “(”<term>“)”

<term> 	::= “/”<component>
        | <component>“.”<term>
        | <component>“/”<term>
        | <component>

That's wrong. I must not have been thinking clearly.

Change History (4)

comment:1 Changed 15 years ago by Gunther Schadow

Description: modified (diff)

comment:2 Changed 12 years ago by Gunther Schadow

Description: modified (diff)

comment:3 Changed 10 years ago by Gunther Schadow

Milestone: Revision 1.9

comment:4 Changed 9 years ago by Gunther Schadow

Description: modified (diff)
Resolution: fixed
Status: newclosed

so at a minimum

<term> ::= "/" <term>

but that would generate "/1" as well.

we can fix the Oersted definition, but it is clearly intended to allow the leading / in front. How do we denote that?

OK, adding main-term as the start symbol.

Note: See TracTickets for help on using tickets.