Skip to content

Broken formatting in Reflection guide #4023

Closed

Description

@ChrisMaddock

https://docs.microsoft.com/en-us/dotnet/framework/reflection-and-codedom/specifying-fully-qualified-type-names

On this page the table "Backus-Naur Form Grammar for Type Names" is rendering incorrectly. Here's what it previously looked like on msdn: https://msdn.microsoft.com/it-it/library/yfsftwz6(v=vs.110).aspx

OLD
image

NEW
image

Activity

  1. mairaw commented on Jan 4, 2018

    @mairaw
    Contributor

    Thanks for letting us know @ChrisMaddock! We'll address it shortly. It's probably due to the use of pipes.

  2. self-assigned this
    on Jan 4, 2018
  3. BillWagner commented on Jan 4, 2018

    @BillWagner
    Member

    @terrajobst One solution would be to translate from BNF to ANTLR, and use the ANTLR grammar syntax highlighter. See example from the C# grammar

    Thoughts?

  4. terrajobst commented on Jan 19, 2018

    @terrajobst
    Contributor

    Like this? Yep, looks very readable to me. 👍

    TypeSpec
    	: ReferenceTypeSpec
    	| SimpleTypeSpec
    	;
    
    ReferenceTypeSpec
    	: SimpleTypeSpec '&'
    	;
    
    SimpleTypeSpec
    	: PointerTypeSpec
    	| ArrayTypeSpec
    	| TypeName
    	;
    
    PointerTypeSpec
    	: SimpleTypeSpec '*'
    	;
    
    ArrayTypeSpec
    	: SimpleTypeSpec '[ReflectionDimension]'
    	| SimpleTypeSpec '[ReflectionEmitDimension]'
    	;
    
    ReflectionDimension
    	: '*'
    	| ReflectionDimension ',' ReflectionDimension
    	| NOTOKEN
    	;
    
    ReflectionEmitDimension
    	: '*'
    	| Number '..' Numero
    	| Number '…'
    	| ReflectionDimension ',' ReflectionDimension
    	| NOTOKEN
    	;
    
    Number
    	: [0-9]+
    	;
    
    TypeName
    	: NamespaceTypeName
    	| NamespaceTypeName ',' AssemblyNameSpec
    	;
    
    NamespaceTypeName
    	: NestedTypeName
    	| NamespaceSpec '.' NestedTypeName
    	;
    
    NestedTypeName
    	: IDENTIFIER
    	| NestedTypeName '+' IDENTIFIER
    	;
    
    NamespaceSpec
    	: IDENTIFIER
    	| NamespaceSpec '.' IDENTIFIER
    	;
    
    AssemblyNameSpec
    	: IDENTIFIER
    	| IDENTIFIER ',' AssemblyProperties
    	;
    
    AssemblyProperties
    	: AssemblyProperty
    	| AssemblyProperties ',' AssemblyProperty
    	;
    
    AssemblyProperty
    	: AssemblyPropertyName '=' AssemblyPropertyValue
    	;
  5. BillWagner commented on Mar 13, 2018

    @BillWagner
    Member

    @mairaw Do you want help with this one?

  6. mairaw commented on Mar 13, 2018

    @mairaw
    Contributor

    Hey @BillWagner, thanks for the offer. I'm not particularly attached to this issue, so feel free to take over if you'd like.

  7. self-assigned this
    on Mar 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions