marvin-zhao / pyang

Automatically exported from code.google.com/p/pyang
0 stars 0 forks source link

Problem with 'input' and output statements' grammar #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
input-stmt             = input-keyword optsep 
                         "{" stmtsep 
                             ;; these stmts can appear in any order 
                             *((typedef-stmt /  grouping-stmt) stmtsep) 
                             1*(data-def-stmt stmtsep) 
                         "}" 

So, the cardinality of the 'data-def-stmt' statement must be at least one.
pyang allows to define input statements without a data definition
statement. The test case is attached.

Original issue reported on code.google.com by kur...@gmail.com on 20 Apr 2009 at 9:58

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by mbj4...@gmail.com on 21 Apr 2009 at 7:25

GoogleCodeExporter commented 9 years ago
Hmm, IMO this is a bug in the spec - we should allow input/output without any 
data
definition statements, since this is equal to not specifying the input/output
statement at all.  I will investigate.

Original comment by mbj4...@gmail.com on 21 Apr 2009 at 9:35

GoogleCodeExporter commented 9 years ago
The spec is fine.  I have fixed pyang to detect this error.

Original comment by mbj4...@gmail.com on 7 May 2009 at 7:30