Home > lexical error > lexical error in string/character literal at end of input

Lexical Error In String/character Literal At End Of Input

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack haskell lexical error at character Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack haskell lexical error at character '\8217' Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Haskell: lexical error haskell multiline string in string/character literal at character 'i' up vote 5 down vote favorite I'm fairly new to Haskell programming and I'm having trouble understanding why I'm receiving this error in my code. My problem is as follows: Any positive integer i can be expressed as i = 2^n*k, where k is odd, that is, as a power of 2 times an odd number. We call n the exponent of 2 in i. For example, the exponent of 2 in 40 is 3 (because 40 = 2^3*5) whereas the exponent of 2 in 42 is 1. If i itself is odd, then n is zero. If, on the other hand, i is even, that means it can be divided by 2. Write a function exponentOfTwo for finding the exponent of 2 in its argument. I understand the psuedocode and it seems fairly simple: recursively divide i by 2 until result is odd, the number of times the division happens is n here is my code (line 31-32): exponentOfTwo :: Int -> Int exponentOfTwo i = if odd i then 0 else 1 + exponentOfTwo (i 'div' 2) I'm receiving the error "lexical error in string/character literal at character 'i'" on line 32 column 62. I've tried searching for a solution to this error everywhere and so far I've had no luck. haskell recursion lexical share|improve this question edited Feb 5 '11 at 22:14 delnan 71.1k6101185 asked Feb 5 '11 at 22:08 Gus 5514 add a comment| 2 Answers 2 active oldest votes up vote 5 down vote accepted To use a function in infix for, surround it with backticks (`), not with single quotes ('). The latter are for character literals, which, well are only one character long. share|improve this answer answered Feb 5 '11 at 22:13 delnan 71.1k6101185 add a comment| up vote 1 down vote Are the characters around div backquotes rather than normal quotes? They need to be to allow a function name to be used as an infix operator. I changed that in your definition and the code worked for me. share|improve this answer answered Feb 5 '11 at 22:12 Jeremiah Willcock 18.9k24869 Oh wow that was an easy fix, I feel kind of stupid now. I never knew that had to be that way. Thank you very much! &nda

support for Eclipse beta Brought to you by: jpmoresmau, leiffrenzel, serras, ttencate Summary Files Reviews Support Wiki Mailing Lists Backlog Discussion Create Topic Stats Graph Forums Help 267 Open Discussion 9 Help Formatting Help lexical error at end of input Forum: Help Creator: Han Joosten Created: 2011-08-05 Updated: 2012-12-06 Han Joosten - 2011-08-05 I have the version 2.0.4 installed. This works great, and the performance is much better than in a release I tried half a year ago. Ausum! However, in my project, some haskell files (not all of them…) show a problem at the end of the file. The problem says: lexical error in string/character literal at http://stackoverflow.com/questions/4910017/haskell-lexical-error-in-string-character-literal-at-character-i end of input. However, these files compile fine with ghc. No problem at all. I presume that the scanner/parser used to generate the messages is another than ghc uses. This specific error is annoying, so I would like to find out what causes it. I tried to 'solve' the problem by modifying my haskell source file, but I cannot find the cause. Can you tell anything about how this parsing is https://sourceforge.net/p/eclipsefp/discussion/371922/thread/a8ab3be2/ exactly done? If you would like to refer to this comment somewhere else in this project, copy and paste the following link: JP Moresmau - 2011-08-05 The parsing should be done by GHC itself. However, the lexing that is used for syntax highlighting does some processing on the source, so maybe the issue is here. Can you share an example of a source file that exhibits the error? The area to watch for is preprocessor commands, since these are stripped out before the source is passed to the lexer. If you would like to refer to this comment somewhere else in this project, copy and paste the following link: Han Joosten - 2011-08-06 No problem. It is online at https://sourceforge.net/apps/trac/ampersand/export/121/src/DatabaseDesign/Ampersand/Input/ADL1/CC.hs The project uses a subversion repo, which can be found at https://sourceforge.net/projects/ampersand/ (be careful however, it doesn't fully compile for the time being) If you would like to refer to this comment somewhere else in this project, copy and paste the following link: JP Moresmau - 2011-08-08 This is weird. It's nothing to do with our code, as I don't find the message anywhere, but can find trace of it on the web, so it's a GHC message. I've narrowed it down: it doesn't like list comprehensions when there

Sign in Pricing Blog Support Search GitHub This repository Watch 60 Star 770 Fork 238 haskell/haskell-mode Code Issues 93 Pull requests 3 Projects 0 Wiki Pulse Graphs New issue Multiline string literal not terminated by syntax highlighter #497 Closed eallik opened this https://github.com/haskell/haskell-mode/issues/497 Issue Mar 8, 2015 · 6 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 3 participants eallik commented Mar 8, 2015 Going through the RWH book, I ended up having the following 2 definitions: raw = "\ \#define X_FOOBAR /* a foobar */\n\ \#define X_QUUX /* a quux */\n\ \#define Y_BLAH /* a blah */\n\ \#define X_BLAH /* a blah */\n\ \" defs = map sndWord . (lines >>> filter lexical error ("#define X_" `isPrefixOf`)) where sndWord = (!! 1) . words (coincidentally, GitHub's markdown has the same bug :)) Inserting a space between the \ and " results in correct behavior (but obviously also a different string value stored in raw): Note that both snippets compile, i.e. \" as the last line of a multiline string is perfectly legal and not the same as ending a single-line string with a backslach. eallik changed the title from multiline string literal haskell lexical error incorrectly not terminated by syntax highlighter to multiline string literal not terminated by syntax highlighter Mar 8, 2015 eallik referenced this issue in github/markup Mar 8, 2015 Closed multiline string literal in haskell syntax highlighter not terminated #467 gracjan commented Mar 8, 2015 @eallik: After a quick test program: str = "\" gives error in compilation: T2.hs:3:10: lexical error in string/character literal at character '\n' Where this program compiles as it should: str = "\"" So if you backslash-escape last doublequote you get unterminated string constant and lexical error. Having said that I like the idea of treating unescaped newline as string terminating for the purpose of font-lock. I'm not sure though how hard it is to get in emacs as currently define dquote to be pair to another dquote and backslash as escape character and we just let emacs do the font locking. gracjan commented Mar 8, 2015 Note that other emacs modes highlight the same, for example c-mode: char *str = "unterimanted\" void main() { } will font-lock as string till the end of file. gracjan commented Mar 8, 2015 @eallik: I would love to see unterminated strings in error face font. Are you into emacs lisp enough to have a go at this problem? ivan-m commented Mar 9, 2015 @gracjan except that that's the correct syntax for multiline strings: test :: String test = "hello\n\ \" This is a valid definition

 

Related content

couchbase lexical error invalid char in json text

Couchbase Lexical Error Invalid Char In Json Text table id toc tbody tr td div id toctitle Contents div ul li a href Error In Parse string txt Bigint as char Lexical Error Invalid Char In Json Text a li li a href Lexical Error Invalid Char In Json Text Jsonlite a li li a href Jsonlite Lexical Error a li ul td tr tbody table p Export Tools Couchbase ServerMB- Error message is not user-friendly when user tries to compile a query and pass string for startkey and endkeyAgile Board ExportXMLWordPrintable Details Type Bug Status In Progress Priority Major

couchdb lexical error invalid char in json text

Couchdb Lexical Error Invalid Char In Json Text table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error Invalid Char In Json Text Chef a li li a href Error Lexical Error Invalid Char In Json Text H o a li ul td tr tbody table p Support Search GitHub This repository error lexical error invalid char in json text r Watch Star Fork oreilly couchdb-guide Code error in parse string txt bigint as char lexical error invalid char in json text Issues Pull requests Projects Wiki Pulse Graphs New issue Invalid jsonlite

c lexical error

C Lexical Error table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error Example a li li a href Lexical Error In English a li li a href Lexical Error Linguistics a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might relatedl have Meta Discuss the workings and policies of this c syntax error site About Us Learn more about Stack Overflow the company Business Learn more p h id Lexical Error Example p about hiring developers or

css lexical error

Css Lexical Error table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error Linguistics a li li a href Lexical Error In Pig a li li a href Lexical Error Invalid Character Inside String a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about relatedl Stack Overflow the company Business Learn more about hiring developers or posting parse error lexical error at line

grammar lexical error

Grammar Lexical Error table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error Linguistics a li li a href Lexical Error Vs Syntax Error a li li a href Example Of Lexical Error In Compiler Design a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About relatedl Us Learn more about Stack Overflow the company Business Learn more lexical error in english about hiring developers or posting

haskell lexical error

Haskell Lexical Error table id toc tbody tr td div id toctitle Contents div ul li a href Haskell Lexical Error At Character a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss relatedl the workings and policies of this site About Us Learn lexical error in string character literal at character n more about Stack Overflow the company Business Learn more about hiring developers or p h id Haskell Lexical Error At Character p posting ads with us Stack Overflow Questions

java lexical error

Java Lexical Error table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error In English a li li a href A Lexical Error Detected By The Scanner a li li a href Lexical Error Linguistics a li li a href Difference Between Lexical Error And Syntax Error a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed relatedl answers to any questions you might have Meta lexical error example in c Discuss the workings and policies of this site About Us Learn more p

lexicon error

Lexicon Error table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error Example Java a li li a href Lexical Error Linguistics a li li a href Static Semantic Error a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack relatedl Overflow the company Business Learn more about hiring developers or posting ads lexical error example with us Stack Overflow Questions Jobs

lexical error css

Lexical Error Css table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error Encountered a li li a href Html Validator a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies relatedl of this site About Us Learn more about Stack Overflow the p h id Lexical Error Encountered p company Business Learn more about hiring developers or posting ads with us Stack Overflow css validator Questions Jobs Documentation Tags Users

lexical error - unknown token type

Lexical Error - Unknown Token Type p HPC Platform Products PGI Products for Apple OS X PGI relatedl Products for Windows Free HPC Products Free PGI for OS X HPC Product Feature Comparison Services PGI Subscription Service PGI Premier Service Support Support Options Current Release Information Current Version Information Licensing Generate Permanent Keys Generate Trial License Keys Trial License FAQ Transfer License Locating Your PIN Licensing Troubleshooting FAQ Compatibility and Installation Licensing Compilation Linking Execution Portability Inter-language Support Request Download Free Trial Software Current Version Current Version Information Archive Releases Licensing Daemons Resources Documentation Porting Tuning Guides Tutorial Videos PGInsider

lexical error in string/character literal at character

Lexical Error In String character Literal At Character table id toc tbody tr td div id toctitle Contents div ul li a href Haskell Lexical Error At Character a li li a href Haskell Multiline String a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow relatedl the company Business Learn more about hiring developers or posting ads with p h id Haskell Lexical Error At Character p

lexical error in string/character literal utf-8 decoding error haskell

Lexical Error In String character Literal Utf- Decoding Error Haskell p Lists IRC The GHC Team Documentation GHC Status Info Building Guide Working conventions Commentary Debugging Infrastructure View Tickets My Tickets Tickets I Created By Milestone By OS By Architecture Patches for review Create Ticket New relatedl Bug New Task New Feature Req Wiki Title Index Recent lexical error in string character literal at character n Changes Wiki Notes Opened years ago Closed years ago closed bug fixed haskell lexical error at character Some unicode symbols are not allow in literal characters or strings Reported by ertai Owned by Priority

lexical error in string/character literal utf-8 decoding error

Lexical Error In String character Literal Utf- Decoding Error p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow relatedl the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up Haskell Error

lexical error at line 1

Lexical Error At Line table id toc tbody tr td div id toctitle Contents div ul li a href Encountered n After a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us relatedl Learn more about Stack Overflow the company Business Learn more about hiring lexical error at line encountered eof after developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask p h id Encountered n After

lexical error detected by the scanner

Lexical Error Detected By The Scanner table id toc tbody tr td div id toctitle Contents div ul li a href An Error That The Compiler Can Neither Catch Nor Easily Generate Code To Catch a li li a href What Is A Lexical Error a li li a href Static Semantic Error a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site relatedl About Us Learn more about Stack Overflow the company Business Learn

lexical error at line

Lexical Error At Line p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company relatedl Business Learn more about hiring developers or posting ads with us Stack Overflow lexical error at line encountered eof after Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow encountered n after is a community of million programmers just like you helping each other Join them it only takes a

lexical error invalid char in json text

Lexical Error Invalid Char In Json Text table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error Invalid Char In Json Text R a li li a href Error Lexical Error Invalid Char In Json Text H o a li li a href Lexical Error Invalid Char In Json Text Chef a li li a href Jsonlite Lexical Error a li ul td tr tbody table p here for a quick overview of the relatedl site Help Center Detailed answers to any questions error lexical error invalid char in json text in r

lexical error compiler construction

Lexical Error Compiler Construction table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Errors In Compiler Design a li li a href Lexical Error Example a li li a href Lexical Phase Errors In Compiler Design Pdf a li li a href Lexical Error In English a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more relatedl about Stack Overflow the company Business Learn

lexical error at line 1 column 10. encountered 58 after

Lexical Error At Line Column Encountered After table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error Encountered a li li a href Lexical Error In Java a li li a href Encountered eof After a li ul td tr tbody table p here encountered n after for a quick overview of the site Help p h id Lexical Error Encountered p Center Detailed answers to any questions you might have Meta Discuss the p h id Lexical Error In Java p workings and policies of this site About Us Learn more about

lexical error at line 1 column 13. encountered 58 after

Lexical Error At Line Column Encountered After p and to http spring io questions for a curated defaultspringsecuritycontextsource list of stackoverflow tags that Pivotal engineers and spring security ldap the community monitor Announcement Announcement Module Collapse No announcement yet BadLdapGrammarException Failed to parse DN Page Title Module Move Remove Collapse This topic is closedX X Conversation Detail Module Collapse Posts Latest Activity Search Forums Page of Filter Time All Time Today Last Week Last Month Show All Discussions only Photos only Videos only Links only Polls only Filtered by Clear All new posts griff Member Join Date Jan Posts BadLdapGrammarException

lexical error example

Lexical Error Example table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error Java a li li a href Lexical Error In English a li li a href Lexical Errors In Compiler Design a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss relatedl the workings and policies of this site About Us Learn lexical error definition more about Stack Overflow the company Business Learn more about hiring developers or posting p h id Lexical

lexical error

Lexical Error table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error Example Java a li li a href Static Semantic Error a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies relatedl of this site About Us Learn more about Stack Overflow lexical error example in c the company Business Learn more about hiring developers or posting ads with us Stack lexical error in english Overflow Questions Jobs Documentation Tags

lexical error invalid char in json text. n

Lexical Error Invalid Char In Json Text N table id toc tbody tr td div id toctitle Contents div ul li a href Error Lexical Error Invalid Char In Json Text R a li li a href Error Lexical Error Invalid Char In Json Text H o a li li a href Jsonlite Lexical Error a li li a href Fromjson Error Lexical Error Invalid Char In Json Text a li ul td tr tbody table p Sign in Pricing Blog Support Search GitHub option form This relatedl repository Watch Star Fork p h id Error Lexical Error Invalid Char

lexical error or unexpected token

Lexical Error Or Unexpected Token p get the following error at the link below I ran this relatedl passed the Novell GroupWise support team and they say it's an issue with the gui and not the gwcheck app I was wondering if anyone has seen this before and if so is there a fix I don't think it is hurting anything but wanted to make sure Thanks https forums novell com attachment php attachmentid d smflood -Jan- shesser Wrote in message While starting Novell's gwcheck application in a terminal window get the following error at the link below I ran

lexical error haskell

Lexical Error Haskell table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error In String character Literal At Character N a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any relatedl questions you might have Meta Discuss the workings and p h id Lexical Error In String character Literal At Character N p policies of this site About Us Learn more about Stack Overflow the haskell lexical error at character company Business Learn more about hiring developers or posting ads with

lexical error at line 1 column 1. encountered

Lexical Error At Line Column Encountered table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error At Line Encountered Eof After a li li a href Lexical Error In Java a li li a href Css Validator a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this relatedl site About Us Learn more about Stack Overflow the company Business p h id Lexical Error At Line Encountered Eof After

lexical error - unknown token type fortran

Lexical Error - Unknown Token Type Fortran p read this file in another relatedl fortran code When I tried to read the file 'press' it gave me the following error ---------------------------------------------------------- PGFIO-F- list-directed read unit lexical error-- unknown token type File name press formatted sequential access record In source file f d Linux PGI PGI MPI PROB D f at line number ---------------------------------------------------------- I generated the data file as follows ---------------------------------------------------------- open file 'press' write press i j ---------------------------------------------------------- I am reading the file 'press' into an array called press ---------------------------------------------------------- open file 'press' read press ---------------------------------------------------------- Please let me

lexical error compiler

Lexical Error Compiler table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error Vs Syntax Error a li li a href Example Of Lexical Error In Java a li li a href Lexical Phase Errors In Compiler Design a li li a href Lexical Phase Errors In Compiler Design Ppt a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us relatedl Learn more about Stack Overflow

lexical error invalid char in json text. yajl parseerror

Lexical Error Invalid Char In Json Text Yajl Parseerror table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error Invalid Char In Json Text Jsonlite a li li a href Error Lexical Error Invalid Char In Json Text H o a li li a href Jsonlite Lexical Error a li ul td tr tbody table p here relatedl for a quick overview of the error lexical error invalid char in json text r site Help Center Detailed answers to any questions you lexical error invalid char in json text chef might have Meta

lexical error at line 1 column 1

Lexical Error At Line Column table id toc tbody tr td div id toctitle Contents div ul li a href Css Validator a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies relatedl of this site About Us Learn more about Stack Overflow lexical error at line encountered eof after the company Business Learn more about hiring developers or posting ads with us Stack encountered n after Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss

lexical error in axapta

Lexical Error In Axapta p resources Windows Server resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel Documentation APIs and reference relatedl Dev centers Samples Retired content We re sorry The content you requested has been removed You ll be auto redirected in second X Language Programming Guide Functions and Macros Macros in X Macros in X How to Distinguish Between Precompile and Compile Error Messages How to Distinguish Between Precompile and Compile Error Messages How to Distinguish Between Precompile and Compile Error Messages How to Use

lexical error at line 1 column 1. encountered 60 after

Lexical Error At Line Column Encountered After p here for a quick lexical error at line encountered eof after overview of the site Help Center Detailed answers encountered n after to any questions you might have Meta Discuss the workings and policies of lexical error encountered this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with lexical error in java us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you

parse error lexical error at line 1 column 3

Parse Error Lexical Error At Line Column table id toc tbody tr td div id toctitle Contents div ul li a href Css Validator a li ul td tr tbody table p W C CSS Validation Service If this is your first visit be sure to check out relatedl the FAQ by clicking the link above You may lexical error encountered have to register before you can post click the register link p h id Css Validator p above to proceed To start viewing messages select the forum that you want to visit from the selection html validator below Results

parse error lexical error at line 1

Parse Error Lexical Error At Line p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow relatedl the company Business Learn more about hiring developers or posting ads with lexical error encountered us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow css validator Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up

python lexical error encountered r

Python Lexical Error Encountered R table id toc tbody tr td div id toctitle Contents div ul li a href Lexical Error In Java a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta relatedl Discuss the workings and policies of this site About encountered n after Us Learn more about Stack Overflow the company Business Learn more about hiring p h id Lexical Error In Java p developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask