When I try to build the FNF Kade Engine's source code it won't work (lime test and build wise) - haxe

C:\HaxeToolkit\haxe\std/eval/_std/haxe/Exception.hx:39: characters 4-53 : Array<haxe.StackItem> should be haxe.CallStack
C:\HaxeToolkit\haxe\std/eval/_std/haxe/Exception.hx:42: characters 4-48 : Array<haxe.StackItem> should be haxe.CallStack
C:\HaxeToolkit\haxe\std/eval/_std/haxe/Exception.hx:57: characters 27-44 : Class<haxe.CallStack> has no field exceptionToString
C:\HaxeToolkit\haxe\std/eval/_std/haxe/Exception.hx:82: characters 20-27 : haxe.CallStack has no field asArray
C:\HaxeToolkit\haxe\std/eval/_std/haxe/Exception.hx:4: lines 4-89 : Field stack has different type than in core type
C:\HaxeToolkit\haxe\std/eval/_std/haxe/Exception.hx:4: lines 4-89 : haxe.CallStack should be haxe.CallStack
export/release/windows/haxe/ApplicationMain.hx:298: characters 1-8 : Build failure
It creates the export folder but it's missing the exe.
How do I fix this?

Related

I need a regular expression to replace a syntax

I am new to sublime text3 but started to like working in it.
I am using its search and replace to achieve as below:
I have a list of hundreds of items like the below :
5149 : Kaliana
5427 : Kalo Chorio
5036 : Kalo Chorio Kapouti
5071 : Kalo Chorio Sleas
5466 : Kalopanagiotis
But I want to replace these with
5149-
5427-
5036-
5071-
5466-
So basically the colon and the words should be replaced by a hyphen(-) symbol
I tried few regular expressions.
for example : (?<=WORD).*$
but things aren't working.
I tried myself and finally got the expression that works for my requirement.
In the find area type:
: [a-zA-Z\d" "]+
And in the replace area type:
-
This gives you the numbers followed by a hiphen and eliminating the words.

How can I search the special characters in Solr

I'm used Solr 6.6.2
I need to search the special characters and highlight it in Solr,
But it does not work,
my data :
[
{
"id" : "test1",
"title" : "test1# title C# ",
"dynamic_s": 5
},
{
"id" : "test2",
"title" : "test2 title C#",
"dynamic_s": 10
},
{
"id" : "test3",
"title" : "test3 title",
"dynamic_s": 0
}
]
When I search "C#",
Then it will just response like this "test1# title C# ",
It just highlights "C" this word...and "#" will not searching and highlight.
How can I make the search and highlight work for special characters?
The StandardTokenizer splits tokens on special characters, meaning that # will split the content into separate tokens - the first token will be C - and that's what's being highlighted. You'll probably get the exact same result if you just search for C.
The tokenization process will make your tokens end up being test2 title C .
Using a field type with a WhitespaceTokenizer that only splits on whitespace will probably be a better choice for this exact use case, but it's impossible to say if that'll be a good match for your regular search behavior (i.e. if you actually want to match 'C' to `C-99' etc., splitting by those characters can be needed). But - you can use a specific field for highlighting, and that fields analysis chain will be used to determine what to highlight. And you can ask for both the original and the more specific field to be highlighted, and then use the best result in your frontend application.

The lexer chooses the wrong Token

Hi I am new to antrl and have a problem that I am not able to solve during the last days:
I wanted to write a grammar that recognizes this text (in reality I want to parse something different, but for the case of this question I simplified it)
100abc
150100
200def
Here each rows starts with 3 digits, that identifiy the type of the line (header, content, trailer), than 3 characters follow, that are the payload of the line.
I thought I could recogize this with this grammar:
grammar Types;
file : header content trailer;
A : [a-z|A-Z|0-9];
NL: '\n';
header : '100' A A A NL;
content: '150' A A A NL;
trailer: '200' A A A NL;
But this does not work. When the lexer reads the "100" in the second line ("150100") it reads it into one token with 100 as the value and not as three Tokens of type A. So the parser sees a "100" token where it expects an A Token.
I am pretty sure that this happens because the Lexer wants to match the longest phrase for one Token, so it cluster together the '1','0','0'. I found no way to solve this. Putting the Rule A above the parser Rule that contains the string literal "100" did not work. And also factoring the '100' into a fragement as follows did not work.
grammar Types;
file : header content trailer;
A : [a-z|A-Z|0-9];
NL: '\n';
HUNDRED: '100';
header : HUNDRED A A A NL;
content: '150' A A A NL;
trailer: '200' A A A NL;
I also read some other posts like this:
antlr4 mixed fragments in tokens
Lexer, overlapping rule, but want the shorter match
But I did not think, that it solves my problem, or at least I don't see how that could help me.
One of your token definitions is incorrect: A : [a-z|A-Z|0-9]; Don't use a vertical line inside a range [] set. A correct definition is: A : [a-zA-Z0-9];. ANTLR with version >= 4.6 will notify about duplicated chars | inside range set.
As I understand you mixed tokens and rules concept. Tokens defined with UPPER first letter unlike rules that defined with lower case first letter. Your header, content and trailer are tokens, not rules.
So, the final version of correct grammar on my opinion is
grammar Types;
file : Header Content Trailer;
A : [a-zA-Z0-9];
NL: '\r' '\n'? | '\n' | EOF; // Or leave only one type of newline.
Header : '100' A A A NL;
Content: '150' A A A NL;
Trailer: '200' A A A NL;
Your input text will be parsed to (file 100abc\n 150100\n 200def)

How do we replace spaces with dashes in a permalink that Autoroute generates from a pattern?

I would like to generate the following URL for a 'My Type' content type.
mywebsite.com/my-type/some-item
I have tried the following patterns:
{Content.ContentType}/{Content.Slug} : My Type/some-item
{Content.ContentType.Slug}/{Content.Slug} : some-item
{Content.ContentType.Text.Slug}/{Content.Slug} : some-item
{Text.Slug}{Content.ContentType}/{Content.Slug} : My Type/some-item

Inconsistent token handling in ANTLR4

The ANTLR4 book references a multi-mode example
https://github.com/stfairy/learn-antlr4/blob/master/tpantlr2-code/lexmagic/ModeTagsLexer.g4
lexer grammar ModeTagsLexer;
// Default mode rules (the SEA)
OPEN : '<' -> mode(ISLAND) ; // switch to ISLAND mode
TEXT : ~'<'+ ; // clump all text together
mode ISLAND;
CLOSE : '>' -> mode(DEFAULT_MODE) ; // back to SEA mode
SLASH : '/' ;
ID : [a-zA-Z]+ ; // match/send ID in tag to parser
https://github.com/stfairy/learn-antlr4/blob/master/tpantlr2-code/lexmagic/ModeTagsParser.g4
parser grammar ModeTagsParser;
options { tokenVocab=ModeTagsLexer; } // use tokens from ModeTagsLexer.g4
file: (tag | TEXT)* ;
tag : '<' ID '>'
| '<' '/' ID '>'
;
I'm trying to build on this example, but using the « and » characters for delimiters. If I simply substitute I'm getting error 126
cannot create implicit token for string literal in non-combined grammar: '«'
In fact, this seems to occur as soon as I have the « character in the parser tag rule.
tag : '«' ID '>';
with
OPEN : '«' -> pushMode(ISLAND);
TEXT : ~'«'+;
Is there some antlr foo I'm missing? This is using antlr4-maven-plugin 4.2.
The wiki mentions something along these lines, but the way I read it that's contradicting the example on github and anecdotal experience when using <. See "Redundant String Literals" at https://theantlrguy.atlassian.net/wiki/display/ANTLR4/Lexer+Rules
One of the following is happening:
You forgot to update the OPEN rule in ModeTagsLexer.g4 to use the following form:
OPEN : '«' -> mode(ISLAND) ;
You found a bug in ANTLR 4, which should be reported to the issue tracker.
Have you specified the file encoding that ANTLR should use when reading the grammar? It should be okay with European characters less than 255 but...

Resources