Pieter Goetschalckx
99224a96b7
Quoted extensions in comments, ocamllex and ocamlyacc ( #9166 )
...
* Support quoted extensions in comments
* Support quoted extensions in ocamllex
* Support quoted extensions in ocamlyacc
* Fix copying of comments in ocamlyacc
2020-02-03 10:55:28 +01:00
Andreas Abel
0d97917cd2
Make sure ocamlyacc can handle 255 entry points ( #9210 )
...
The previous promised limit of ocamlyacc was 256 entry points, but
on some platforms (x86 at least) the actual limit was 127 due to representation of
bucket->entry as char. Switching to unsigned char extends the limit to 255.
I introduced a constant MAX_ENTRY_POINT as a synonym of MAXCHAR to
handle checks against the limit consistently over the different modules
of ocamlyacc.
Extensions beyond 255 entry points would require a bit more work (which
looks unrewarding) since entry points are currently identified by a single byte
at the beginning of the input stream.
Fixes : #9207
2019-12-26 11:02:13 +01:00
David Allsopp
7f96c82fda
Windows Unicode handling for ocamlyacc
...
This deals with the command line processing only (i.e. filenames) -
ocamlyacc continues to process .mly files as before.
2019-04-16 17:37:17 +01:00
David Allsopp
fd9e7b2ee8
Convert line_format to a #define
...
Using an extern disables error checking of the parameters in "modern"
compilers.
2019-04-16 17:30:57 +01:00
Pieter Goetschalckx
30fbae7265
Octal character literals and apostrophes in ocamlyacc actions ( #1932 )
2019-09-06 16:12:54 +02:00
Fourchaux
1946594bd7
Fixing typos in various files ( #2246 )
...
Note: Typos found with https://github.com/codespell-project/codespell
Here is the (semi-manual) command used to get (and correct) the typos:
$ codespell -i 3 -w --skip=".png,.gif,./ocaml/boot,./ocaml/.git,./ocaml/manual/styles,./ocaml/manual/manual/htmlman" -L minimise,instal,contructor,"o'caml",cristal,pres,clos,cmo,uint,iff,te,objext,nto,nd,mut,upto,larg,exten,leage,mthod,delte,tim,atleast,langage,hten,iwth,mke,contant,succint,methids,eles,valu,clas,modul,que,classe,missings,froms,defaut,correspondance,differents,configury,reachs,cas,approche,normale,dur,millon,amin,oje,transfert
2019-02-13 14:04:56 +01:00
Demi Obenour
472ee2c0ff
Fix build on MSVC
2017-05-17 09:48:41 +01:00
Demi Obenour
13fe590602
Partial testcase and bug fix
...
This adds a partial testcase for the better lexing of
OCaml code by ocamlyacc, as well as a bug fix.
2017-05-17 09:48:41 +01:00
Demi Obenour
28767a90ae
Fix parsing for a corner case in ocamlyacc
...
A'"'" was misparsed (the ' was not associated with the A as it should
be)
2017-05-17 09:48:41 +01:00
Demi Obenour
795f1bb37a
Fix the parsing of comments by ocamlyacc
2017-05-17 09:48:41 +01:00
Demi Obenour
af55037229
Check for balanced parentheses and curly braces in ocamlyacc
...
This uses an explicit stack to keep track of parentheses and curly
braces in actions.
2017-05-17 09:48:41 +01:00
Demi Obenour
f081bc399d
Fix parsing of raw strings
...
This adds support for parsing of raw OCaml strings.
2017-05-17 09:48:41 +01:00
Demi Obenour
83a90593b2
Refactor the ocamlyacc reader
...
The processing of apostrophes, quoted strings and comments was
duplicated in at least two places. This refactors both into
functions.
Also move the bitmap code, for use by later changes.
2017-05-17 09:48:41 +01:00
Demi Obenour
897711b40e
Delete some superfluous code
...
The %ident and %union directives don't make sense for OCaml,
and generated broken OCaml code. Just drop support for them.
2017-05-17 09:48:41 +01:00
David Allsopp
fffde17d52
Make ocamlyacc and make_opcodes ignore \r on Unix
...
ocamlyacc doesn't correctly handle \r on Unix meaning that long strings
with escaped newlines cause unterminated string warnings.
Similarly, the make_opcodes script in the build system cannot cope with
a CRLF checkout of the header files.
2017-02-15 13:02:11 +00:00
Damien Doligez
5401ce8473
Update headers for the new license.
...
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
Gabriel Scherer
64eed3f20f
fix an issue spotted by the Clang analyzer (assigned value never read)
...
yacc/reader.c:922:9: warning: Value stored to 'value' is never read
value = UNDEFINED;
^ ~~~~~~~~~
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16334 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-04 20:32:12 +00:00
Gabriel Scherer
1714cfa5ec
fix an issue spotted by the Clang analyzer (leak in yacc/reader.c)
...
yacc/reader.c:1328:7: warning: Potential leak of memory pointed to by 'a_line'
fprintf(f, ")\n# 0\n ");
^~~~~~~
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16333 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-04 20:32:11 +00:00
Damien Doligez
def31744f9
remove all $Id keywords
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Damien Doligez
3b507dd1aa
renaming of Objective Caml to OCaml and cleanup of copyright headers
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Damien Doligez
71b94fa3e8
merge changes from ocaml3111rc0 to ocaml3111
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9319 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-07-20 11:51:50 +00:00
Jacques Garrigue
0f10b6d6ce
PR#3802: detect polymorphic object and variant types in entry points
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7105 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-10-06 06:34:51 +00:00
Damien Doligez
a4a3c10e70
fusion des modifs de 3.08.4
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7019 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-08-13 20:59:37 +00:00
Damien Doligez
e6007f6057
fusion des changements jusqu'a 3.08.3
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6824 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-03-24 17:20:54 +00:00
Damien Doligez
d9ad8992f2
parser_env -> __caml_parser_env
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6668 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-11-06 20:16:10 +00:00
Xavier Leroy
dbc670d5f0
L'argument de isdigit, etc, doit etre unsigned (PR#2514)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6390 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-06-12 11:59:11 +00:00
Damien Doligez
7405556404
directives #line pour lex et yacc
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6244 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-04-21 23:26:06 +00:00
Damien Doligez
d17755ef49
pour que ca marche mieux avec -dtypes
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5730 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-07-23 23:03:00 +00:00
Xavier Leroy
7617bb244a
Rejeter les points d'entree ayant un type polymorphe (PR#1583)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5709 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-07-17 14:51:43 +00:00
Damien Doligez
2570312432
PR#63
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5245 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-11-05 16:33:46 +00:00
Damien Doligez
123fb9f713
changement des locations, deuxieme tranche
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5232 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-11-02 22:36:46 +00:00
Damien Doligez
fc53c99cda
detabisation
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3573 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-07-12 12:54:24 +00:00
Damien Doligez
8d180f7ae3
fix bug #44
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2898 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-03-03 15:15:43 +00:00
Damien Doligez
85d1bfc111
bug de %type multiligne
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2757 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-01-13 18:15:10 +00:00
Damien Doligez
44c244d311
tabs -> spaces
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2638 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-29 19:04:56 +00:00
Xavier Leroy
cc0f32b054
Changement de la licence
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-17 18:59:06 +00:00
Xavier Leroy
f341128930
Emettre une declaration # lineno quand on copie le prelude du fichier .mly dans le .ml
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2151 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1998-11-05 10:49:16 +00:00
Xavier Leroy
f301b1418f
Ajout contraintes de types sur points d'entree dans fichier .ml genere
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2019 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1998-07-29 11:54:19 +00:00
Xavier Leroy
dfeaa0596e
Utiliser le codage 0 pour le token EOF
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2001 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1998-06-29 08:49:53 +00:00
Xavier Leroy
56fafddd87
Generation de messages # lineno
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1930 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1998-04-23 08:24:50 +00:00
Xavier Leroy
1ebfd06999
Corrige le probleme de '->' dans un type de token ou de production.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1764 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-11-13 09:57:52 +00:00
Xavier Leroy
1517cea772
Sources C convertis en ANSI C
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1696 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-09-02 12:55:01 +00:00
Xavier Leroy
a7ed1abb5b
Lier par "let" les $i dans les actions.
...
Patch de A.Frey pour les ' en fin de ligne.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1631 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-06-30 14:02:55 +00:00
Xavier Leroy
4150ff6148
Meilleur traitement des constantes de caracteres '...'
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1018 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-09-24 14:23:31 +00:00
Damien Doligez
30f1bdfd9e
"|" optionnel devant la première production
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@960 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-09-05 17:36:14 +00:00
Xavier Leroy
2301d778e7
Renommage en Objective Caml
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@782 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-04-30 14:53:58 +00:00
Xavier Leroy
89055b054e
Rendons a Cesar...
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@196 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-08-09 15:25:52 +00:00
Xavier Leroy
e4066357b1
Ajout des notices de copyright
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@195 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-08-09 15:06:35 +00:00
Xavier Leroy
260bb413e9
Nettoyages pour supprimer bien des warnings
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@186 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-08-08 16:44:29 +00:00
Xavier Leroy
414572e80b
MAJ par-rapport a Caml Light 0.7
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@182 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-08-08 13:37:34 +00:00