Giter VIP home page Giter VIP logo

dgrok's People

Contributors

joewhite avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dgrok's Issues

Failure to parse ZEROBASEDSTRINGS compiler directive

The examples that come with the Object Pascal Handbook yield the following parse error

	Unrecognized compiler directive 'ZEROBASEDSTRINGS' (1)
		.\StringMetaTestForm.pas:651

The offending line in ObjectPascalHandbook/06/StringMetaTest/StringMetaTestForm.pas is
31:{$ZEROBASEDSTRINGS ON}

This example can be found here on github:
https://github.com/MarcoDelphiBooks/ObjectPascalHandbook/tree/master/06/StringMetaTest
ZEROBASEDSTRINGS is described here:
http://docwiki.embarcadero.com/RADStudio/Rio/en/Zero-based_strings_(Delphi)

Assuming that we need to add
_directiveTypes["ZEROBASEDSTRINGS"] = DirectiveType.Ignored;
to the TokenFilter constructor in TokenFilter.cs

Failure to parse HIGHCHARUNICODE compiler directive

The examples that come with the Object Pascal Handbook yield the following parse error

ObjectPascalHandbook/06/CharTest/CharTestForm.pas
35:{$HIGHCHARUNICODE ON}

This example can be found here on github:
https://github.com/MarcoDelphiBooks/ObjectPascalHandbook/tree/master/06/CharTest
HIGHCHARUNICODE is described here:
http://docwiki.embarcadero.com/RADStudio/Sydney/en/HIGHCHARUNICODE_directive_(Delphi)

Assuming that we need to add
_directiveTypes["HIGHCHARUNICODE"] = DirectiveType.Ignored;
to the TokenFilter constructor in TokenFilter.cs

Regarding the previous open issue "Nested type causes failure"

Just change the following will solve the issue.

#region TypeDecl
AddRule(RuleType.TypeDecl, TokenSets.Ident.LookAhead, delegate

=>

#region TypeDecl
AddRule(RuleType.TypeDecl, delegate
{
return CanParseRule(RuleType.Ident) && !CanParseRule(RuleType.Visibility);
}, delegate

Nested Types cause parse failures

The examples that come with the Object Pascal Handbook yield the following parse error

Failing (1)
	Expected EqualSign but found ProcedureKeyword (1)
		.\NestedClass.pas:263

The Offending file is here on github?
https://github.com/MarcoDelphiBooks/ObjectPascalHandbook/tree/master/07/NestedTypes

Stripping down the code to this:

unit NestedClass;

interface

type
  TOne = class
  public
    type TInside = class
      type TInsideInside = class
      end;
    public
      procedure InsideHello;
    end;
  end;

end.

--- We still get the error

Failing (1)
	Expected EqualSign but found ProcedureKeyword (1)
		.\NestedClass.pas:145

Will need to study this some more

See: http://docwiki.embarcadero.com/RADStudio/Rio/en/Nested_Type_Declarations

I manually applied the pull request #2
Fix the wrong look-ahead for the TypeDecl rule #2
and it fixes the above issue ( Thanks tomalla5120x ! )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.