* * *

Author Topic: Wiki stub: Make your own compiler, interpreter, parser, or expression analyzer  (Read 506 times)

avra

  • Hero Member
  • *****
  • Posts: 1346
    • Additional info
I wanted to make a starting point for anyone interested in doing it with FreePascal and Lazarus:

http://wiki.freepascal.org/Make_your_own_compiler,_interpreter,_parser,_or_expression_analyzer

Lex/Yacc and Gold are covered. Help is needed for AntLR, Coco-R or any other tool not on the list.

Feel free to update, expand and correct.

Have fun!    :D 8-) :D
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Edson

  • Hero Member
  • *****
  • Posts: 928
Interesting. Maybe I can include information about SynFacilSyn wich is a highlighter and lexer, I have used in my compilers.
Lazarus 1.6 - FPC 3.0.0 - x86_64-win64 on  Windows 7

avra

  • Hero Member
  • *****
  • Posts: 1346
    • Additional info
Interesting. Maybe I can include information about SynFacilSyn wich is a highlighter and lexer, I have used in my compilers.
Please do. I would appreciate if you follow the current layout: you add short info about SynFacilSyn on the main page, then if needed you add a separate page with all the SynFacilSyn details. Please let me know if you have a better proposal then this.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

avra

  • Hero Member
  • *****
  • Posts: 1346
    • Additional info
Thank you marcov for adding fcl-passrc, fcl-xml, symbolic, and TFPExpressionParser to the wiki stub. I believe that those are specialized, not general tools. For example first is specialized for pascal sources, and second for XML files. Therefore maybe we should make 2 categories: General Tools, and Specialized Tools. If anyone has a better idea, please say so.
« Last Edit: September 15, 2018, 05:25:52 pm by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Edson

  • Hero Member
  • *****
  • Posts: 928
Updated with SynFacilSyn information.  :)
Lazarus 1.6 - FPC 3.0.0 - x86_64-win64 on  Windows 7

avra

  • Hero Member
  • *****
  • Posts: 1346
    • Additional info
Updated with SynFacilSyn information.
Thank you!
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

avra

  • Hero Member
  • *****
  • Posts: 1346
    • Additional info
Just couldn't resist adding to wiki  :-[
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6498
Thank you marcov for adding fcl-passrc, fcl-xml, symbolic, and TFPExpressionParser to the wiki stub. I believe that those are specialized, not general tools. For example first is specialized for pascal sources, and second for XML files. Therefore maybe we should make 2 categories: General Tools, and Specialized Tools. If anyone has a better idea, please say so.

Parsing is only part of making a compiler. And LALR parsers only a part of that. Most commercial compilers have recursive descent parsers afaik.
And as said fcl-passrc is being used for a pascal-to-js compiler.

Maybe the title is simply wrong for what you had in mind.  Make a topic "parser generators" or so, move the parser generators there, and then link that on the "compiler creation" page?
« Last Edit: Today at 09:23:22 pm by marcov »

Leledumbo

  • Hero Member
  • *****
  • Posts: 7947
  • Programming + Glam Metal + Tae Kwon Do = Me
You make me wanna finish my handcoded compiler tutorial, as what's currently covered in the wiki are all generated by tools instead of coded from scratch by hand (except the fpc packages, of course, those are nice handwritten ones).

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus