dll will not recignize using pure mode in phpcore
46 posts
• Page 4 of 5 • 1, 2, 3, 4, 5
Re: dll will not recignize using pure mode in phpcore
If you add file containing
.NET reg.expr. are greedy by default I assume, you would have to specify PCRE_UNGREEDY (\U) to make it ungreedy? Any unsupported modifier would be reported in runtime as a warning.
- Code: Select all
<?php [assembly:\Export]class someclassname{}
- Code: Select all
var parser = new WikiLingo.Parser();
var output = parser.parse("bold");
.NET reg.expr. are greedy by default I assume, you would have to specify PCRE_UNGREEDY (\U) to make it ungreedy? Any unsupported modifier would be reported in runtime as a warning.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: dll will not recignize using pure mode in phpcore
Is there no chance of using Perl-Compatible Regular Expressions, as php does for regexp?
- RobertPlummer
- Posts: 37
- Joined: April 7th, 2014, 1:45 pm
Re: dll will not recignize using pure mode in phpcore
Do you have any test case for preg_match that behave differently under PHP and Phalanger?RobertPlummer wrote:Is there no chance of using Perl-Compatible Regular Expressions, as php does for regexp?
Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: dll will not recignize using pure mode in phpcore
I'm to the point where I can parse, but no matches are being found. I'm so close! There is an attribute of the WikiLingo\Parser class, called "matches", it should be full of matches, but nothing is being matched from the regex that I am I using. None of the regex I'm using is too complex. How would I move forward to debug effectively?
Thanks for all your help Jakub!
Thanks for all your help Jakub!
- RobertPlummer
- Posts: 37
- Joined: April 7th, 2014, 1:45 pm
Re: dll will not recignize using pure mode in phpcore
Progress can be found here: https://github.com/wikiLingo/wikiLingo.net-examples
- RobertPlummer
- Posts: 37
- Joined: April 7th, 2014, 1:45 pm
Re: dll will not recignize using pure mode in phpcore
That looks great!
You can put a breakpoint on that regex (e.g. preg_match, not sure where it is exactly) if it is being executed and you can add some debug output to see the regular expression.
I would then try the same expression in PHP and in Phalanger, to see the difference.
Thanks,
You can put a breakpoint on that regex (e.g. preg_match, not sure where it is exactly) if it is being executed and you can add some debug output to see the regular expression.
I would then try the same expression in PHP and in Phalanger, to see the difference.
Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: dll will not recignize using pure mode in phpcore
An exception of type 'PHP.Core.PhpException' occurred in PhpNetCore.dll but was not handled in user code
The error:
Additional information: Call to undefined function: 'WikiLingo\ini_get'
And what throws it:
- Code: Select all
$this->pcreRecursionLimit = ini_get("pcre.recursion_limit");
What do I do now?
- RobertPlummer
- Posts: 37
- Joined: April 7th, 2014, 1:45 pm
Re: dll will not recignize using pure mode in phpcore
Hi,
you didn't add reference to PhpNetClasslibrary.dll (C:\Windows\Microsoft.NET\assembly\GAC_MSIL\PhpNetClassLibrary\v4.0_4.0.0.0__4af37afe3cde05fb )
you didn't add reference to PhpNetClasslibrary.dll (C:\Windows\Microsoft.NET\assembly\GAC_MSIL\PhpNetClassLibrary\v4.0_4.0.0.0__4af37afe3cde05fb )
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: dll will not recignize using pure mode in phpcore
Wanna bet?
- Code: Select all
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="PhpNetClassLibrary, Version=4.0.0.0, Culture=neutral, PublicKeyToken=4af37afe3cde05fb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Phalanger\Source\ClassLibrary\obj\Debug)\PhpNetClassLibrary.dll</HintPath>
</Reference>
<Reference Include="PhpNetCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Phalanger\Source\Core\obj\Debug)\PhpNetCore.dll</HintPath>
</Reference>
<Reference Include="PhpNetCore.CodeDom, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Phalanger\Source\Core.CodeDom\obj\Debug)\PhpNetCore.CodeDom.dll</HintPath>
</Reference>
<Reference Include="PhpNetCore.DuckTyping, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Phalanger\Source\Core.DuckTyping\obj\Debug)\PhpNetCore.DuckTyping.dll</HintPath>
</Reference>
<Reference Include="PhpNetCore.Parsers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Phalanger\Source\Core.Parsers\obj\Debug)\PhpNetCore.Parsers.dll</HintPath>
</Reference>
<Reference Include="PhpNetCurl, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Phalanger\Source\Extensions\Curl\obj\Debug)\PhpNetCurl.dll</HintPath>
</Reference>
<Reference Include="PhpNetGd2, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Phalanger\Source\Extensions\Gd2\obj\Debug)\PhpNetGd2.dll</HintPath>
</Reference>
<Reference Include="PhpNetMbstring, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Phalanger\Source\Extensions\mbstring\obj\Debug)\PhpNetMbstring.dll</HintPath>
</Reference>
<Reference Include="PhpNetZip, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Phalanger\Source\Extensions\Zip\obj\Debug)\PhpNetZip.dll</HintPath>
</Reference>
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="WikiLingo, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\wikiLingo.net\WikiLingo.dll</HintPath>
</Reference>
</ItemGroup>
- RobertPlummer
- Posts: 37
- Joined: April 7th, 2014, 1:45 pm
Re: dll will not recignize using pure mode in phpcore
The reference must be added for the PHP project as well.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
46 posts
• Page 4 of 5 • 1, 2, 3, 4, 5
Who is online
Users browsing this forum: No registered users and 7 guests