public static ExternInterfaceDeclarationsStatement Parse(ParserContext context) {
            var res = new ExternInterfaceDeclarationsStatement();

            context.ReadOpenBracket();

            do {
                var token = context.PeekNextToken();
                if (token.Type == VRML97TokenType.CloseBracket) {
                    context.ReadCloseBracket();
                    break;
                }
                switch (token.Text) {
                    case "eventIn":
                        var eventIn = ExternEventInStatement.Parse(context);
                        res.EventsIn.Add(eventIn);
                        break;
                    case "eventOut":
                        var eventOut = ExternEventOutStatement.Parse(context);
                        res.EventsOut.Add(eventOut);
                        break;
                    case "field":
                        var field = ExternFieldStatement.Parse(context);
                        res.Fields.Add(field);
                        break;
                    case "exposedField":
                        var exposedField = ExternExposedFieldStatement.Parse(context);
                        res.ExposedFields.Add(exposedField);
                        break;
                    default:
                        throw new InvalidVRMLSyntaxException();
                }
            } while (true);

            return res;
        }
        public static ExternInterfaceDeclarationsStatement Parse(ParserContext context)
        {
            var res = new ExternInterfaceDeclarationsStatement();

            context.ReadOpenBracket();

            do
            {
                var token = context.PeekNextToken();
                if (token.Type == VRML97TokenType.CloseBracket)
                {
                    context.ReadCloseBracket();
                    break;
                }
                switch (token.Text)
                {
                case "eventIn":
                    var eventIn = ExternEventInStatement.Parse(context);
                    res.EventsIn.Add(eventIn);
                    break;

                case "eventOut":
                    var eventOut = ExternEventOutStatement.Parse(context);
                    res.EventsOut.Add(eventOut);
                    break;

                case "field":
                    var field = ExternFieldStatement.Parse(context);
                    res.Fields.Add(field);
                    break;

                case "exposedField":
                    var exposedField = ExternExposedFieldStatement.Parse(context);
                    res.ExposedFields.Add(exposedField);
                    break;

                default:
                    throw new InvalidVRMLSyntaxException();
                }
            } while (true);

            return(res);
        }