Questions tagged [lexical]

The "Lexical" tag is used to denote a connection with words of a language, its grammar or the dictionary. Alternatively, it is also used in the context of "lexical scope," the context in which certain values are valid.

Broadly, Lexical is used to refer to words of a language. (The terms in applicable to natural (human) languages, as well as to computer programming languages. Lexical is derived from "Lexicon" and therefore the tag is also applied to questions relating to the dictionary for a language.

Finally, the tag is used in a computer programming context: Lexical Scoping. A lexical scope is the "context" within with certain rules/values apply (Example the "scope" of a local variable.)

204 questions
4
votes
1 answer

Lexical error after : ""

I'm using this css and nothing is showing up. It was working earlier today and has now just stopped. The html is still present but when I inspect element the height is set to 0px. How do I resolve this error? error: Lexical error at line 571, column…
5kud
  • 327
  • 2
  • 6
  • 19
4
votes
1 answer

What is the difference between corpus and lexicon in NLTK (python)

Can someone tell me the difference between a Corpora ,corpus and lexicon in NLTK ? What is the movie data set ? what is Wordnet ?
Kumar
  • 1,017
  • 1
  • 11
  • 16
4
votes
3 answers

One all-encompassing definition of JavaScript closure

I have read 10s of SO references on closures, MDN references and other blog articles. They all seem to define closures in their own ways. For example, From MDN documentation: function makeFunc() { var name = "Mozilla"; function displayName() { …
Athapali
  • 1,091
  • 4
  • 25
  • 48
4
votes
0 answers

issue accessing lexical scope using B

For debugging purposes I'd like to Access the lexical scope of different subroutines with a specific Attribute set. That works fine. I get a Problem when the first variable stores a string, then I get a empty string. I do something like this: $pad =…
user2875983
  • 303
  • 2
  • 6
4
votes
1 answer

How to change my .m file to a .mm file?

How can I change my .m file to a .mm file? I'm getting the error: cassert file not found I have researched and found that I need to change my files to .mm? How can I do this?
Surz
  • 984
  • 3
  • 11
  • 36
4
votes
2 answers

Why does "\9" give "9" while "\7" is empty?

I have read the lexical grammar of the String literals. I found out that both "\9" and "\7" are considered invalid string literals. But why does alert("\9") give 9 while alert("\7") is empty (I expected \7)?
user1039304
  • 365
  • 5
  • 10
3
votes
2 answers

Creating a simple lexical analyser in Java

I am creating a lexical analyser that must read a text input and output tokens for a basic 'created' language and should output a token when called. I would like it to distinguish between identifiers, constants etc.. from a list of which I…
user1023875
  • 31
  • 1
  • 2
3
votes
2 answers

Find all matching text and apply styling in Lexical

I want to find text* in Lexical JS and apply a highlight style to all matches. import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext"; import {$createRangeSelection, $getRoot, $isParagraphNode, ParagraphNode} from…
OrderAndChaos
  • 3,547
  • 2
  • 30
  • 57
3
votes
1 answer

Can we store metadata on every words and let user modify it and still keep it?

I’m new to lexcal and I’m developing annotation tool for speech-to-text. I have used draftjs. I use entity and decorator to store and manage metadata on each words. every single words are entities and each entity has timestamp as metadata. example:…
Ko Ohhashi
  • 844
  • 1
  • 11
  • 23
3
votes
1 answer

Lexical error: Encountered: "" (0), after : ""

I needed to start dealing with foreign characters, and in doing so, I think I royally screwed up a file's encoding. The error I'm getting is: Lexical error at line 1, column 8. Encountered: "" (0), after : "" The first line of the file is: import…
Jonathan Drake
  • 270
  • 1
  • 4
  • 13
3
votes
1 answer

Compiling a (flex/bison) parser with NDK

UPDATE I know now that parser.h should be generated by the make system from parser.y. The Android.mk file even has an entry like this: edify_src_files := \ lexer.l \ parser.y \ expr.c But I still can't seem to get the…
Bilthon
  • 2,461
  • 8
  • 36
  • 44
3
votes
1 answer

Distinguishing between lexical error and semantic error

What is the difference between these two errors, lexical and semantic? int d = "orange"; inw d = 4; Would the first one be a semantic error? Since you can't assign a literal to an int? As for the second one the individual tokens are messed up so…
user181421
  • 57
  • 3
  • 11
3
votes
2 answers

How to combine Regexp and keywords in Scala parser combinators

I've seen two approaches to building parsers in Scala. The first is to extends from RegexParsers and define your won lexical patterns. The issue I see with this is that I don't really understand how it deals with keyword ambiguities. For example,…
Michael Tiller
  • 9,291
  • 3
  • 26
  • 41
3
votes
1 answer

Definition of the adjective lexical

On the internet I've read the general meaning of the adjective lexical: the meaning of a word in relation to the physical world or to abstract concepts, without reference to any sentence in which the word may occur. I've seen this word been used in…
user1534664
  • 3,258
  • 8
  • 40
  • 66
3
votes
4 answers

C++ parser generator

I'm writing my own scripting language and I need a software tool which generates C++ code for parsing my language. I need a lexical analyzer and a parser generator which generates C++ code. It would be nice for me to be able also to generate a…
Salvatore
  • 1,145
  • 3
  • 21
  • 42
1 2
3
13 14