Lexer - CompWisdom
About us  |  Why use us?  |  Press  |  Contact us

 

Topic: Lexer



  
 Lexical analysis - Wikipedia, the free encyclopedia
Lexical analysis is the process of taking an input string of characters (such as the source code of a computer program) and producing a sequence of symbols called "lexical tokens", or just "tokens", which may be handled more easily by a parser.
The Lex programming tool and its compiler is designed to generate code for fast lexical analysers based on a formal description of the lexical syntax.
However, since the lexical analyzer is the subsystem that must examine every single character of the input, it can be a compute-intensive step whose performance is critical, such as when used in a compiler.
http://en.wikipedia.org/wiki/Lexer   (668 words)

  
 com.Ostermiller.Syntax.Lexer
A CToken is a token that is returned by a lexer that is lexing a C source file.
A JavaToken is a token that is returned by a lexer that is lexing a java source file.
A PlainToken is a token that is returned by a lexer that is lexing a plain text file.
http://ostermiller.org/syntax/docs/com/Ostermiller/Syntax/Lexer/package-summary.html   (162 words)

  
 A lexical analyzer generator for Standard ML. Version 1.6.0, October 1994
The lexer tries to read a large number of characters from the input function at once, and it is desirable that the input function return as many as possible.
Lookahead is not implemented and cannot be used, because there is a bug in the algorithm for generating lexers with lookahead.
The function "eof" is called by the lexer when the end of the input stream is reached.
http://www.smlnj.org/doc/ML-Lex/manual.html   (2254 words)

  
 The Lexer Interface
This lexer object is expected to have a constructor taking three parameters: the begin and end iterators of the underlying input stream to analyse and the file_position of the point in the input stream, which corresponds to the first of the given iterators.
Additionally it contains a static functions, through which a new instance of the lexer object should be instantiated.
structure needs to be implemented besides the actual lexer object.
http://spirit.sourceforge.net/distrib/spirit_1_7_0/wave/doc/class_reference_lexer.html   (503 words)

  
 Info: (cppinternals) Lexer
The lexer does not make an initial pass to strip out trigraphs and escaped newlines, but handles them as they are encountered in a single pass of the input file.
The Lexer ********* Overview ======== The lexer is contained in the file `cpplex.c'.
The lexer does not consider whitespace to be a token in its own right.
http://www.cse.msu.edu/cgi-bin/info2html?(cppinternals)Lexer   (2304 words)

  
 Indexing, 5 of 11
Any processing the lexer does to tokens before indexing (for example, removal of characters, and base-letter conversion) are also performed on query terms at query time.
At query time, the multi-lexer examines the language setting and uses the sub-lexer preference for that language to parse the query.
Otherwise, the query is parsed and run as usual.
http://www.ucs.louisiana.edu/~oracle9i/text.901/a90121/cdatadi5.htm   (2264 words)

  
 A lexer generator
In general, a lexer must be able to handle all characters that can appear in the input.
It is better to let the lexer scan keywords the same way as identifiers and then use an auxiliary function to distinguish between them.
Return the absolute position in the input text of the beginning of the matched string.
http://www.dina.kvl.dk/~sestoft/manual/node18.html   (646 words)

  
 [No title]
For example, a lexer might create a header line for the first line of a function definition rather than the last.
Parameters The lexer for language LLL has the following prototype: static void ColouriseLLLDoc (unsigned int startPos, int length, int initStyle, WordList *keywordlists[], Accessor &styler); The styler parameter is an Accessor object.
Present lexers use a helper function called classifyWordLLL to recognize keywords.
http://www.scintilla.org/Lexer.txt   (1189 words)

  
 3.2 pyggy.lexer - The lexing engine
The lexer class provides an extensible lexer class capable of lexing tokens from an input source based on tables generated by PyLly.
is returned by the lexer whenever a character is encountered which cannot be lexed.
The class can be subclassed to provide lexers with different input behaviors.
http://www.lava.net/~newsham/pyggy/html/module-pyggy.lexer.html   (212 words)

  
 PyLR maual
The one time it's common to use the flags is when you want the lexer to match something but not return anything until the next match.
The reason it is there is that the token value of EOF is expected to be one greater than any other token value by the parser.
In PyLR, a lexer is part of a parser.
http://starship.python.net/crew/scott/manual.html   (1418 words)

  
 PEAR :: PEPr :: Comments :: Lexer
Looking at the code again (http://cvs.sourceforge.net/viewcvs.py/simpletest/simpletest/parser.php?rev=1.66) the SimpleTest lexer offers an API to end users which is working at a higher level, the state machine being "bundled" with the lexing capabilities.
I gave a little more thought to this, and due to interface conflicts, the FSM version would have to be a completetely independent class, as it's interface would be split in two(the grammar in the generator and the tokenizing in the compiled class).
I'd also move it into the Lexer class because it depends more on that implementation than on Grammar itself.
http://pear.php.net/pepr/pepr-comments-show.php?id=197   (1589 words)

  
 PyGgy - Python GLR Parser and Lexer
There is a lexer engine that uses the tables to tokenize an input stream.
The PyLly program is used to pregenerate tables for a finite state machine from a lexer specification.
Because GLR parsing is used, the parser can deal with arbitrary grammars, even if they are recursive or ambiguous.
http://lava.net/~newsham/pyggy   (329 words)

  
 Entropy Overload
Compilers are programs that translate source code from one language (the input language) to another (the output language).
This is done by a lexical analyzer, also known as a lexer.
The lexer's job is to split the input into discrete lumps of text, with each lump annotated with kind, such as IDENTIFIER, NUMBER or PLUS.
http://barrkel.blogspot.com   (1744 words)

  
 6 Lexer
The lexer may loop indefinitely if a token can match an empty string since empty strings are everywhere.
The lexer first splits the input string into a list of tokens and then the parser parses this list.
The lexer split the input string according to the token definitions (see 
http://christophe.delord.free.fr/soft/tpg/doc/tpgch6.html   (1729 words)

  
 Language Implemtation Tools - make-lexer
The return value of the procedure is returned from the lexer.
If two cases both match, the lexer will use the one that occurs first in the specification.
If an action is a procedure, the procedure is called with two arguments -- the lexeme string and the input port.
http://ofb.net/gnu/guile/lang_9.html   (280 words)

  
 ToHTML
The type of syntax highlighting done will be determined first by the class name for the lexer, then by the mime type, then by the file extension.
The type of syntax highlighting to use will depend on the lexerType that is set, the mime type that is given, and the file extension that is given.
http://ostermiller.org/syntax/docs/com/Ostermiller/Syntax/ToHTML.html   (2334 words)

  
 Lexer Project Specification
depending on whether the lexer is currently reading from a file or from standard input.
In addition to implementing the Lexer class, you should write a main program that instantiates a Lexer object, then instantiates a LexerTexter object, and then calls the LexerTexter's Run method.
Special note: for reasons that will be made clear in project 2, the Lexer object must be global (declared outside of main()).
http://www-cse.ucsd.edu/classes/fa00/cse131a/lexer.htm   (1101 words)

  
 The Mason Book
By the way, you may be wondering why the Lexer isn't called a Parser, since its main job seems to be to parse the source of a component.
The main job of the Resolver is to accept a component path as input and return various properties of the component such as its source, time of last modification, unique identifier, and so on.
In this chapter we'll discuss four of the persistent objects in the Mason framework: the Interpreter, Resolver, Lexer, and Compiler.
http://www.masonbook.com/book/chapter-6.mhtml   (3344 words)

  
 Open Directory - Computers: Programming: Compilers: Lexer and Parser Generators
LRgen Lexer and Parser Generator from Parsetec - LRgen is an LALR parser generator and LALR lexer generator, featuring TBNF grammar notation and LALR lexers for parser and compiler development.
oolex (object-oriented lexer) - Approaches lexical analysis by basing the scanner strictly on the object-oriented paradigm.
JB2CSharp - A port of the Java-Bison/Flex software developed by the Serl project at the University of Colorado, Boulder.
http://dmoz.org/Computers/Programming/Compilers/Lexer_and_Parser_Generators   (1715 words)

  
 Elkhound Tutorial
Specifically, we wrap the lexer with a version that just yields the nonterminal name, and substitute the given actions with actions that build a parse tree.
The lexer interface includes functions that return information about the tokens, mainly to assist in debugging.
While it is possible to put the lexer definition right into the grammar file (using the
http://www.cs.berkeley.edu/~smcpeak/elkhound/sources/elkhound/tutorial.html   (3970 words)

  
 RunCC Parsergenerator
The lexer was loaded with the input to parse, it represents the input of the parser.
Mind that the Lexer reads all input it needs to verify its rules before calling the semantic (so no XML SAX processor can be written at the time, i am thinking about it).
You want to parse top-down using the lexer (like in XML example), this evaluates the input (which means the Lexer returns false if there is more input to read!):
http://runcc.sourceforge.net   (3127 words)

  
 Lojban Reference Grammar: Chapter 21
They have been tested for ambiguity at various levels in the YACC grammar, but are in the recursive descent lexer in the current parser.
Order of inserting lexer tokens *IS* significant, since some shorter strings that would be marked with a lexer token may be found inside longer strings.
These rules are defined with the lexer tokens inserted, with the result that it can be verified that the language is LALR1 under option b.
http://www.lojban.org/files/reference-grammar/chap21.html   (4039 words)

  
 jGuru: What is a "protected" lexer rule?
class L extends Lexer; /** This rule is "visible" to the parser * and a Token object is sent to the * parser when an INT is matched.
The interface could distinquish between input stream of characters or tokens and thus differentiate "lexers" from "parsers".
You have no explicit encapsulation syntax so you have used the implicit notion of captilization to identify visible/invisible.
http://www.jguru.com/faq/view.jsp?EID=125   (477 words)

  
 Parser (HTML Parser 1.5)
The current NodeFactory is transferred to (set on) the given lexer, since the lexer owns the node factory object.
This item is set from the HTTP header but may be overridden by meta tags in the head, so this may change after the head has been parsed.
The parser is in a safe but useless state parsing an empty string.
http://htmlparser.sourceforge.net/javadoc/org/htmlparser/Parser.html   (1398 words)

  
 CSCI 4627 lexer assignment
This creates file lexer, containing the executable code of the lexer.
You will need an account on the Unix computers in the lab.
I will test your program on the assumption that it uses the definitions in lexer.h as I have given them to you.
http://www.cs.ecu.edu/~karl/4627/spr02/lexer.html   (327 words)

  
 SERL: jb -- Bison Parser and Lexer Generating Java
(0) Dropped the example version of the java parser that uses the generic lexer, and added an example version of the IDL parser that uses the generic lexer.
Jb then scans various template files specified by the user and inserts the extracted information at specified points in the templates.
Jb then scans various template Java files specified by the user and inserts the extracted information at specified points in the templates.
http://serl.cs.colorado.edu/~serl/misc/jb.html   (898 words)

  
 CUJ > A Lexer for Java in C++
My use of the words lexer and lexeme signify the extension of the scanner and token concept to include isolating whitespace and errors.
One consequence of this extension is that any text can be lexed, and the concatenation of the lexemes found is identical to the original input source text.
McKeeman gives us a lexer for Java that's reusable in all sorts of interesting ways.
http://www.cuj.com/documents/s=8069/cuj9801mckeeman/mckeeman.htm   (778 words)

  
 develop:simple_test_lexer_notes [phpPatterns]
Of course this a very undemanding language but from messing around so far, get the feeling that Simple Tests Lexer could scale nicely to a pretty complex language (HTML, which Marcus uses it for, is none too easy to parse).
That regex also makes my mind bend (Jeffs mind bends to this) so exploring the possibilities of a more manageable approach to parsing the template expression language.
* @param string the matched text * @param int lexer state (ignored here) */ function writePlainText($match,$state) { $this->output.= $match; return TRUE; } /** * Callback for template variable references.
http://www.phppatterns.com/docs/develop/simple_test_lexer_notes   (381 words)

  
 [No title]
An actual code generator would arrange to place these literals into a table in the generated lexer, so that actions in the generated lexer could match token text against the literals.
This action will appear at the top of all generated files.
/* empty header */ *** End of Header Action *** Lexer Preamble Action.
http://www.antlr.org/grammar/multiParser/SimpleLexer.txt   (881 words)

  
 Comp.compilers: Buffered input for a lexer?
the lexer recognize it as several tokens that you then paste together in
This has the disadvantage of preventing the null character from being
Are there any well known techniques that are useful to provide buffered input
http://compilers.iecc.com/comparch/article/02-03-162   (234 words)

  
 [No title]
fun eof () called by lexer when end of input stream is reached.
ID(foobar) or ID(foo) ID(bar) if ==> ID(if) or IF ¡˜ MR M„ ÿÿþ5ÿÿþªbj   óŸ¨Lexer ImplementationªŸ¨ÚImplementation Options: Write Lexer from scratch Boring and error-prone Use Lexical Analyzer Generator Quick and easy ml-lex is a lexical analyzer generator for ML.
How do we tokenize: foobar ==> ID(foobar) or ID(foo) ID(bar) if ==> ID(if) or IF ¡˜ MR M„ ÿÿþ5ÿÿþªbj   óŸ¨Lexer ImplementationªŸ¨ÚImplementation Options: Write Lexer from scratch Boring and error-prone Use Lexical Analyzer Generator Quick and easy ml-lex is a lexical analyzer generator for ML.
http://www.cs.princeton.edu/courses/archive/spring05/cos320/notes/3-lexing.ppt   (2211 words)

  
 Paul's 8051 Code Library, Fixed String Lexer
The most likely use for this simple lexer is an 8051 based system which receives commands from a computer, probably while performing other tasks.
Each string may be a different length, and it's pretty easy to add strings to the list or to change the string texts it will detect.
This simple fixed string lexer searches for any number of fixed strings of any length (with some limitations) in a stream of characters.
http://www.pjrc.com/tech/8051/lexer-fixed-string.html   (256 words)

  
 REGEX/CLAWK/LEXER Packages
This is a tar file containing the REGEX, CLAWK, and LEXER packages, as well as some test code.
Many of the optimizations in the recent rewrite of the regex engine went into optimizing the sorts of patterns generated by DEFLEX.
The LEXER package implements a lexical-analyzer-generator called DEFLEXER, which is built on top of both REGEX and CLAWK.
http://www.geocities.com/mparker762/clawk.html   (2674 words)

  
 Lexer (IntelliJ IDEA Open API)
Returns the token at the current position of the lexer.
Interface for breaking a file into a sequence of tokens.
Returns the current position and state of the lexer.
http://www.jetbrains.com/idea/openapi/5.0/com/intellij/lexer/Lexer.html   (260 words)

  
 Perl - encyclopedia article about Perl.
Instead, it implements its own lexer, which coordinates with a modified GNU bison parser to resolve ambiguities in the language.
Perl has a context-free grammar; however, it cannot be parsed by a straight Yacc/Lex parser/lexer combination.
It is said that "only perl can parse Perl", meaning that only the perl interpreter can parse the Perl language.
http://encyclopedia.thefreedictionary.com/Perl   (6648 words)

  
 lexer Computer Encyclopedia Enterprise Resource Directory Complete Guide to Internet
lexer Computer Encyclopedia Enterprise Resource Directory Complete Guide to Internet
http://www.jaysir.com/computer-encyclopedia/l/lexer-computer-terms.htm   (20 words)

  
 : Class lexer
This class implements a small scanner (aka lexical analyzer or lexer) for the JavaCup specification.
This scanner reads characters from standard input (System.in) and returns integers corresponding to the terminal number of the next Symbol.
This is normally called from next_token(), but for debugging purposes can be called indirectly from debug_next_token().
http://cag.lcs.mit.edu/~elliotw/sift/java_cup/lexer.html   (604 words)

  
 SourceForge.net CVS Repository - diff - cvs: tidy/tidy/src/lexer.c
fprintf(stderr, "lexer UTF-8 encoding error for U+%x : ", c);
tidy_out(errout, "lexer UTF-8 encoding error for U+%x : ", c); /* debug */
/* Lexer uses bigger memory chunks than pprint as
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tidy/tidy/src/lexer.c.diff?r1=1.74&r2=1.75   (782 words)

  
 Lexer
Action to be taken when regular expression is matched.
Here is a complete example of a simple lexing job.
is a C++ function that needs to be defined separately; it is not part of the lexer generator.)
http://www-sal.cs.uiuc.edu/~kamin/Jr/lexer.html   (807 words)

  
 [antlr-interest] Re: A simple prepocessor with a lexer?
Simplest thing to do is create another lexer that > handles that text and then, using a SharedLexerInputState (or whatever > it's called), create an instance of the new lexer in the outer lexer > and then make a while loop around it's nextToken().
[antlr-interest] Re: A simple prepocessor with a lexer?
I believe there is no way to do that with only 1 lexer/parser with ANTLR because it has to be able to predict statically what the alternatives are.
http://www.antlr.org:8080/pipermail/antlr-interest/2003-October/005132.html   (388 words)

  
 lexer : Java Glossary
The most famous lexer is LEX which came with early versions of Unix.
Lexers can also be used to implement finite state automata.
Parsing is done in two stages, breaking letters up into groups called tokens, then analysing the syntax of those tokens.
http://mindprod.com/jgloss/lexer.html   (159 words)

  
 [No title]
Specifically, this lexer will remove headers which are in the BOW_EMAIL_HEADERS_TO_REMOVE array.
/* A lexer with special features for handling e-mail and newsgroup messages.
http://www.cs.cmu.edu/afs/cs.cmu.edu/project/theo-11/www/naive-bayes/bow-0.8/lex-email.c   (610 words)

  
 Lexer.h Source File
00041 ~Lexer(); 00042 00043 // Get the next object from the input stream.
streamSetPos(pos, dir); } 00064 00065 private: 00066 00067 int getChar(); 00068 int lookChar(); 00069 00070 Array *streams; // array of input streams 00071 int strPtr; // index of current stream 00072 Object curStr; // current stream 00073 GBool freeArray; // should lexer free the streams array?
00034 Lexer(XRef *xref, Stream *str); 00035 00036 // Construct a lexer for a stream or array of streams (assumes obj 00037 // is either a stream or array of streams).
http://www.cs.cmu.edu/~lemur/doxygen/lemur-3.1/html/Lexer_8h-source.html   (239 words)

  
 Lexer
The separator/operator tokens you are to recognize are given in
Your lexer is to ignore whitespace and comments.
http://www.cs.wm.edu/~noonan/cs442/homework/lexer   (97 words)

  
 Lexer.hs
Return deriving (Show) type Name = String -- main lexer function: traverses the input string and returns -- a list of tokens.
token lexer (';':restStr) = Semicolon : (lexer restStr) lexer (c:restStr)
isDigit c = -- if c is a alphabetical letter then lexer restStr -- TODO: fix this -- if it is any other character, it's not part of the language lexer (c:restStr) = Unrecognized : (lexer restStr)
http://www.cse.unsw.edu.au/~cs3161/tutes/02/Lexer.html   (215 words)

  
 Cached.net - The place to get 0wned.
Unfortunately for Daler, there simply wasn't enough time left, and LeXer went on to win the match 12-10 in what turned out to be quite an exciting match.
LeXer tried to do what he did in the early game, chasing him around the map, using rocket jumps to his advantage to be where Daler would not expect him to be.
It sounds like an extremely close match from what had been described, lexer says gg with like a good minute to go, daler is running his pants off to pick up those easy frags.
http://www.cached.net/?go=main/eventcoverage/single/943   (1630 words)

  
 [C2hs] Re: support for 6.4
> > The output is exactly the same as for the existing lexer on my test file > of gtk.i (cpp output of gtk/gtk.h) which is 1014K.
When I originally wrote the lexer, I benchmarked a number of variants.
I > used ghc -O for the lexer modules and all relevant dependent modules.
http://www.haskell.org/pipermail/c2hs/2005-May/000290.html   (453 words)

  
 The Haskell Dynamic Lexer Engine
The Design Document: [pdf] [MS Word] - This is the big document that describes the internals of the library, the programatic interface to the library, and also includes several detailed examples.
This library is a simple regular expression lexer/scanner for the Haskell programming language.
It is "interesting" because it is completely dynamic: the lexer may be modified at runtime, and string buffers may be lexed by different lexers at different times.
http://www.nondot.org/sabre/Projects/HaskellLexer   (522 words)

  
 CYBERFIGHT.ORG / Demos @ Cyberfight.ru
I would like to see a FFA between Zero4, LeXer, and Fata1ity.
I rate it at the top because LeXer is having fun, in a championship match.
To finish, LeXer pulls the machine gun and with two pellets, the first frag is his and he practically tears off to get in position for his next play.
http://www.cyberfight.org/site/demos/4381   (860 words)

  
 JavaScript 2.0 Lexer
as a division or division-assignment token if either of these tokens would be allowed by the syntactic grammar as the next token; otherwise, the lexer treats a
The lexer recognizes several nonreserved words that have special meanings in some contexts but can be used as identifiers.
See the stages and lexer semantics sections in the formal description chapter for the details.
http://www.mozilla.org/js/language/js20-2000-07/core/lexer.html   (544 words)

Compwisdom
 About us   |  Why use us?   |  Press   |  Contact us

 Copyright © 2006 CompWisdom.com Usage implies agreement with terms.