Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

char(3o) [debian man page]

Char(3o)							   OCaml library							  Char(3o)

NAME
Char - Character operations. Module Module Char Documentation Module Char : sig end Character operations. val code : char -> int Return the ASCII code of the argument. val chr : int -> char Return the character with the given ASCII code. Raise Invalid_argument Char.chr if the argument is outside the range 0--255. val escaped : char -> string Return a string representing the given character, with special characters escaped following the lexical conventions of Objective Caml. val lowercase : char -> char Convert the given character to its equivalent lowercase character. val uppercase : char -> char Convert the given character to its equivalent uppercase character. type t = char An alias for the type of characters. val compare : t -> t -> int The comparison function for characters, with the same specification as Pervasives.compare . Along with the type t , this function compare allows the module Char to be passed as argument to the functors Set.Make and Map.Make . OCamldoc 2012-06-26 Char(3o)

Check Out this Related Man Page

Genlex(3)							   OCaml library							 Genlex(3)

NAME
Genlex - A generic lexical analyzer. Module Module Genlex Documentation Module Genlex : sig end A generic lexical analyzer. This module implements a simple ``standard'' lexical analyzer, presented as a function from character streams to token streams. It imple- ments roughly the lexical conventions of OCaml, but is parameterized by the set of keywords of your language. Example: a lexer suitable for a desk calculator is obtained by let lexer = make_lexer ["+";"-";"*";"/";"let";"="; ( ; ) ] The associated parser would be a function from token stream to, for instance, int , and would have rules such as: let parse_expr = parser [< 'Int n >] -> n | [< 'Kwd ( ; n = parse_expr; 'Kwd ) >] -> n | [< n1 = parse_expr; n2 = parse_remainder n1 >] -> n2 and parse_remainder n1 = parser [< 'Kwd + ; n2 = parse_expr >] -> n1+n2 | ... One should notice that the use of the parser keyword and associated notation for streams are only available through camlp4 extensions. This means that one has to preprocess its sources e. g. by using the -pp command-line switch of the compilers. type token = | Kwd of string | Ident of string | Int of int | Float of float | String of string | Char of char The type of tokens. The lexical classes are: Int and Float for integer and floating-point numbers; String for string literals, enclosed in double quotes; Char for character literals, enclosed in single quotes; Ident for identifiers (either sequences of letters, digits, under- scores and quotes, or sequences of ``operator characters'' such as + , * , etc); and Kwd for keywords (either identifiers or single ``spe- cial characters'' such as ( , } , etc). val make_lexer : string list -> char Stream.t -> token Stream.t Construct the lexer function. The first argument is the list of keywords. An identifier s is returned as Kwd s if s belongs to this list, and as Ident s otherwise. A special character s is returned as Kwd s if s belongs to this list, and cause a lexical error (exception Parse_error ) otherwise. Blanks and newlines are skipped. Comments delimited by (* and *) are skipped as well, and can be nested. OCamldoc 2014-06-09 Genlex(3)
Man Page

13 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help to extract a string delimited by any special character

I have a string as follows IS*blahblah TED~blahblah etc. I want to list down only IS and TED Can someone help me? (24 Replies)
Discussion started by: kumariak
24 Replies

2. Shell Programming and Scripting

Retreive string between two chars

I want to write a shell script in order to retreive some data from a log file that i have written into. The string that i want to get is the number 2849 (that is located between | | ). To explain further, this is the result i get after running "grep LOGIN filename.log" but i need to get the... (25 Replies)
Discussion started by: danland
25 Replies

3. Shell Programming and Scripting

Bourne Shell: Special characters Input Prevention

Environment: Sun UNIX Language: Bourne Shell Problem: I am writing a script that allows user to key in a directory. Example: /root/tmp. Since the user can key in anything he/she wants, I need to validate to make sure that he/she does not key in anything funny i.e.... (37 Replies)
Discussion started by: totziens
37 Replies

4. Shell Programming and Scripting

Want to remove the last characters from each row of csv using shell script

Hi, I've a csv file seperated by '|' from which I'm trying to remove the excess '|' characters more than the existing fields. My CSV looks like as below. HRLOAD|Service|AddChange|EN PERSONID|STATUS|LASTNAME|FIRSTNAME|ITDCLIENTUSERID|ADDRESSLINE1 10000001|ACTIVE|Testazar1|Testore1|20041|||... (24 Replies)
Discussion started by: rajak.net
24 Replies

5. Shell Programming and Scripting

How to replace special characters?

Hi Unix Guru, I have an requirement for replace some specail characters in a file, my file came from mainframe. please see below example: when open it with vi 17896660|89059215|04/24/1998 00:00:00.000000| abc 123-453-1312^M<85>^M<85>|124557 if I run cat -v I got following:... (25 Replies)
Discussion started by: ken002
25 Replies

6. UNIX for Dummies Questions & Answers

Characters in a single read

Hi, I have the file which has the data : accctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaac cctaacccaaccctaaccctaaccctaaccctaaccctaaccctaacccc taaccctaaccctaaccctaaccctaacctaaccctaaccctaaccctaa ccctaaccctaaccctaaccctaaccctaacccctaaccctaaccctaaa... (24 Replies)
Discussion started by: rajivn786
24 Replies

7. Shell Programming and Scripting

Replace double quotes with a single quote within a double quoted string

Hi Froum. I have tried in vain to find a solution for this problem - I'm trying to replace any double quotes within a quoted string with a single quote, leaving everything else as is. I have the following data: Before: ... (32 Replies)
Discussion started by: pchang
32 Replies

8. Shell Programming and Scripting

Replace Special Character With Next Present Byte

Hi, First find the special character, from the special character take next two bytes convert the bytes to decimal and replace with next present byte of decimal value times. E.g. Input: 302619ú1A? Output: 302619(3 spaces for ú1A)?????????????????????????? Thanks, Dines (27 Replies)
Discussion started by: dineshnak
27 Replies

9. Shell Programming and Scripting

How to replace all but the first 3 characters with sed?

This seems like it should be an easy problem, but for some reason I am struggling with the solution. I simply want to replace all characters after the first 3 characters with another character, preferably with sed. Thanks in advance. Like this, but producing the proper number of *'s: sed... (30 Replies)
Discussion started by: leolson
30 Replies

10. Shell Programming and Scripting

Sed: -e expression #1, char 16: unterminated address regex

I am trying to grep for a particular text (Do action on cell BL330) in a text file(sample.gz) which is searched in the content filtered by date+timestamp (2016-09-14 01:09:56,796 to 2016-09-15 04:10:29,719) on a remote machine and finally write the output into a output file on a local machine. ... (23 Replies)
Discussion started by: rbadveti
23 Replies

11. UNIX for Beginners Questions & Answers

Print byte position of extended ascii character

Hello, I am on AIX. When I encounter extended ascii characters and special characters on a file I need to print.. Byte position, actual character and line number. Is there a simple command that can give me the above result ? Thanks in advance (38 Replies)
Discussion started by: rosebud123
38 Replies

12. UNIX for Advanced & Expert Users

Need help to delete special characters exists only at the end of the each record in UNIX file?

Hi, I have a file in unix with 15 columns.It consists special characters(#,$,^M,@,*,% etc)at the end of the each record.I want to remove these special characters.I used the following: Sed -e 's/ /g;s/ */ /g' . But It is removing special characters exists everywhere in the file(begining,middle... (24 Replies)
Discussion started by: rakeshp
24 Replies

13. OS X (Apple)

Undeletable file

Greetings, I'm trying to delete a file with a weird name from within Terminal on a Mac. It's a very old file (1992) with null characters in the name: “␀␀Word FinderÂŽ Plus™”. Here are some examples of what I've tried: 12FX009:5 dpontius$ ls ␀␀Word FinderÂŽ Plus™ 12FX009:5 dpontius$ rm... (29 Replies)
Discussion started by: dpontius
29 Replies